Package com.coswald.jtalker.gui
Class ColorChooserPanel.ColorUpdater
- java.lang.Object
-
- com.coswald.jtalker.gui.ColorChooserPanel.ColorUpdater
-
- All Implemented Interfaces:
EventListener
,ChangeListener
- Enclosing class:
- ColorChooserPanel
protected class ColorChooserPanel.ColorUpdater extends Object implements ChangeListener
Updates any color using the underlyingchooser's
current color. If you wish to use this class within aColorChosoerPanel
, usethis
method.- Since:
- JTalker 0.1.5
- Version:
- 0.0.1
- Author:
- C. William Oswald
-
-
Constructor Summary
Constructors Constructor Description ColorUpdater(Colorizer colorizer)
Constructs an updater that updates a given colorizer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
stateChanged(ChangeEvent e)
Updates the given colorizer to the given color.
-
-
-
Constructor Detail
-
ColorUpdater
public ColorUpdater(Colorizer colorizer)
Constructs an updater that updates a given colorizer. This will call theColorizer
'ssetColor
inside of thestateChange
method.- Parameters:
colorizer
- The colorizer to update.
-
-
Method Detail
-
stateChanged
public void stateChanged(ChangeEvent e)
Updates the given colorizer to the given color. This method is called whenever theJColorChooser
switches a color.- Specified by:
stateChanged
in interfaceChangeListener
- Parameters:
e
- Unused.- See Also:
ColorChooserPanel.colorChooser
,Colorizer
-
-