public class VisualColor extends AbstractVisualObject
VisualColor
class represents a color as a button
with an icon of the color. When the button is pressed, a
JColorChooser
appears that allows the user to select
a color.VALUE_PROPERTY
Constructor and Description |
---|
VisualColor(java.awt.Color color)
Creates a new visual color object using the specified color.
|
Modifier and Type | Method and Description |
---|---|
java.awt.Component |
getComponent()
Gets the button used to represent the color.
|
java.lang.Object |
getValue()
Gets the color value.
|
static void |
main(java.lang.String[] argv)
Tests this class.
|
addPropertyChangeListener, firePropertyChange, firePropertyChange, hasChooser, refreshComponent, setRestrictions, showChooser
public VisualColor(java.awt.Color color)
public java.awt.Component getComponent()
public java.lang.Object getValue()
public static void main(java.lang.String[] argv)
argv
- the array of command line parameters.