| |
|
| com.jeta.forms.store.properties.JETAProperty com.jeta.forms.store.properties.ColorProperty
ColorProperty | public class ColorProperty extends JETAProperty (Code) | | A ColorProperty object defines a 'dynamic' color value for
some components in this architecture. A dynamic color is one that depends on
the current look and feel. For example, the background for a JButton has a
different color for the Windows Look and Feel than it does for the Metal Look
and Feel. This is important for effects such as gradients that need to fade
out to the current background (which can change if the look and feel
changes). The designer allows the user to select a color based on its
resource name. This class uses the resource name to get the actual color from
the ColorManager.
See Also: com.jeta.forms.colormgr.ColorManager.getColor(Stringjava.awt.Color) author: Jeff Tassin |
Constructor Summary | |
public | ColorProperty() Creates a ColorProperty instance that specifies a
constant, black color. | public | ColorProperty(Color c) | public | ColorProperty(String colorKey) Creates a dynamic ColorProperty instance with the
specified color resource name as defined by the UIManager. |
CONSTANT_COLOR | final public static String CONSTANT_COLOR(Code) | | Color key name for a constant color
|
DEFAULT_BRIGHTNESS | final public static int DEFAULT_BRIGHTNESS(Code) | | |
DEFAULT_COLOR | final public static String DEFAULT_COLOR(Code) | | This is for those components/borders that define their colors based on
parent components or any associated components (in the case of borders).
|
DEFAULT_FACTOR | final public static float DEFAULT_FACTOR(Code) | | The default brightness factor
|
PROPERTY_ID | final public static String PROPERTY_ID(Code) | | The property name
|
VERSION | final public static int VERSION(Code) | | The version of this class
|
serialVersionUID | final static long serialVersionUID(Code) | | |
ColorProperty | public ColorProperty()(Code) | | Creates a ColorProperty instance that specifies a
constant, black color.
|
ColorProperty | public ColorProperty(Color c)(Code) | | Creates a constant ColorProperty instance with the
specified color
Parameters: c - the color to set. |
ColorProperty | public ColorProperty(String colorKey)(Code) | | Creates a dynamic ColorProperty instance with the
specified color resource name as defined by the UIManager.
Parameters: colorKey - the name of the color resource. See Also: javax.swing.UIManager.getColor(String) |
darker | public Color darker(Color c, float factor)(Code) | | Creates a darker color given a color and a factor.
Parameters: c - the color to darken Parameters: factor - the brightness factor See Also: java.awt.Color.darker |
equals | public boolean equals(Object object)(Code) | | Object equals implementation.
|
getBrightness | public int getBrightness()(Code) | | Returns the brightness value for this color
the brightness value for this color |
getBrightnessFactor | public float getBrightnessFactor()(Code) | | Returns the brightness factor for this color
the brightness factor for this color |
getColor | public Color getColor()(Code) | | Returns the color specified by this property. If the this property
represents a constant color, then the constant color is returned.
Otherwise, the color is retrieved from the color manager. Currently, the
color manager merely forwards the call to the UIManager.
the color specified by this property. |
getColorKey | public String getColorKey()(Code) | | the resource name for the color. This is the name passed to theColorManager. |
isConstant | public boolean isConstant()(Code) | | true if the property represents a constant color |
setBrightness | public void setBrightness(int ival)(Code) | | |
setBrightnessFactor | public void setBrightnessFactor(float fval)(Code) | | |
setConstantColor | public void setConstantColor(Color c)(Code) | | |
setValue | public void setValue(Object prop)(Code) | | Sets this property to that of another property.
|
updateBean | public void updateBean(JETABean jbean)(Code) | | Updates the bean
|
Fields inherited from com.jeta.forms.store.properties.JETAProperty | final public static int VERSION(Code)(Java Doc) final static long serialVersionUID(Code)(Java Doc)
|
|
|
|