ij2x.gui
Class ColorChooser
java.lang.Object
ij2x.gui.ColorChooser
- All Implemented Interfaces:
- java.util.EventListener, javax.swing.event.ChangeListener, javax.swing.event.DocumentListener
public class ColorChooser
- extends java.lang.Object
- implements javax.swing.event.DocumentListener, javax.swing.event.ChangeListener
Displays a dialog that allows the user to select a color using three sliders.
Constructor Summary |
ColorChooser(java.lang.String title,
java.awt.Color initialColor,
boolean useHSB)
Constructs a ColorChooser using the specified title and initial color. |
Method Summary |
void |
changedUpdate(javax.swing.event.DocumentEvent e)
|
java.awt.Color |
getColor()
Displays a color selection dialog and returns the color selected by the user. |
void |
insertUpdate(javax.swing.event.DocumentEvent e)
|
void |
removeUpdate(javax.swing.event.DocumentEvent e)
|
void |
stateChanged(javax.swing.event.ChangeEvent e)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ColorChooser
public ColorChooser(java.lang.String title,
java.awt.Color initialColor,
boolean useHSB)
- Constructs a ColorChooser using the specified title and initial color.
getColor
public java.awt.Color getColor()
- Displays a color selection dialog and returns the color selected by the user.
insertUpdate
public void insertUpdate(javax.swing.event.DocumentEvent e)
- Specified by:
insertUpdate
in interface javax.swing.event.DocumentListener
removeUpdate
public void removeUpdate(javax.swing.event.DocumentEvent e)
- Specified by:
removeUpdate
in interface javax.swing.event.DocumentListener
changedUpdate
public void changedUpdate(javax.swing.event.DocumentEvent e)
- Specified by:
changedUpdate
in interface javax.swing.event.DocumentListener
stateChanged
public void stateChanged(javax.swing.event.ChangeEvent e)
- Specified by:
stateChanged
in interface javax.swing.event.ChangeListener