|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.core.data.property.ColorAttr
public final class ColorAttr
This class holds a Color
value as property for view objects and
supports colors for selection, hilite, selection-hilite, border, and
background. A ColorAttr
is only created once for each color.
Color
Field Summary | |
---|---|
static Color |
BACKGROUND
The color for background as Color.WHITE . |
static Color |
BORDER
The color for border as Color.DARK_GRAY . |
static ColorAttr |
DEFAULT
The default color attribute value, used when no color attribute set. |
static Color |
HILITE
The color for hilite as new Color(255, 181, 0) . |
static Color |
INACTIVE
The color for inactive points, "grayed out", as Color.LIGHT_GRAY . |
static Color |
INACTIVE_SELECTED
The color for inactive points, "grayed out", but selected as Color.GRAY . |
static Color |
SELECTED
The color for selection as new Color(179, 168, 143) . |
static Color |
SELECTED_HILITE
The color for selection as new Color(255, 240, 204) . |
Method Summary | |
---|---|
boolean |
equals(ColorAttr ca)
Compares this ColorAttr with the given one and returns
true if both have the same color value. |
boolean |
equals(Object obj)
Compares this ColorAttr with the given
Object and returns
true if the other is an instance of ColorAttr
and both have the same color value. |
static Color |
getBackground()
Returns the preferred background color. |
Color |
getBorderColor(boolean selected,
boolean hilite)
Returns the border color for this object under certain constrains. |
Color |
getColor()
Returns this attribute's color value. |
Color |
getColor(boolean selected,
boolean hilite)
Returns the color value for this object under certain constrains. |
static Color |
getInactiveColor()
Returns the preferred color for inactive points. |
static ColorAttr |
getInstance(Color color)
Creates a new color attribute with the given color. |
int |
hashCode()
Hash code of the underlying color value. |
String |
toString()
A String representation for this color attribute including the simple class name, attribute color, hilite, selected, selected-hilite, border, and background color. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final ColorAttr DEFAULT
public static final Color SELECTED
new Color(179, 168, 143)
.
public static final Color HILITE
new Color(255, 181, 0)
.
public static final Color SELECTED_HILITE
new Color(255, 240, 204)
.
public static final Color INACTIVE
Color.LIGHT_GRAY
.
public static final Color INACTIVE_SELECTED
Color.GRAY
.
public static final Color BORDER
Color.DARK_GRAY
.
public static final Color BACKGROUND
Color.WHITE
.
Method Detail |
---|
public static ColorAttr getInstance(Color color)
color
- the color for this object
ColorAttr
object for the given
Color
IllegalArgumentException
- if the Color
is
null
public Color getColor()
getColor(boolean, boolean)
public Color getColor(boolean selected, boolean hilite)
selected
- if selected property is sethilite
- if hilite property is set
getColor()
public Color getBorderColor(boolean selected, boolean hilite)
selected
- if the border is selectedhilite
- if the border is hilite
public static Color getBackground()
public static Color getInactiveColor()
public boolean equals(ColorAttr ca)
ColorAttr
with the given one and returns
true
if both have the same color value.
ca
- the other ColorAttr
to compare this one with
true
if the color values are equal otherwise
false
Color.equals(java.lang.Object)
public boolean equals(Object obj)
ColorAttr
with the given
Object
and returns
true
if the other is an instance of ColorAttr
and both have the same color value.
equals
in class Object
obj
- the other ColorAttr
to compare this one with
true
if the color values are equal otherwise
false
equals(ColorAttr)
public int hashCode()
hashCode
in class Object
Color.hashCode()
public String toString()
toString
in class Object
Color.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |