mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Make it possible to access the color of a color icon (for rdserver)
This commit is contained in:
@@ -1,21 +1,6 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.xml.util;
|
||||
|
||||
import java.util.HashMap;
|
||||
import com.intellij.util.containers.SoftFactoryMap;
|
||||
import com.intellij.util.ui.EmptyIcon;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -23,6 +8,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@@ -74,6 +60,14 @@ public class ColorIconCache {
|
||||
return new ColorIcon(this);
|
||||
}
|
||||
|
||||
public Color getColor() {
|
||||
return myColor;
|
||||
}
|
||||
|
||||
public Color[] getColours() {
|
||||
return myColours;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void paintIcon(final Component component, final Graphics g, final int i, final int j) {
|
||||
final int iconWidth = getIconWidth();
|
||||
|
||||
Reference in New Issue
Block a user