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'scurrent color. If you wish to use this class within aColorChosoerPanel, usethismethod.- 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 voidstateChanged(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'ssetColorinside of thestateChangemethod.- 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 theJColorChooserswitches a color.- Specified by:
stateChangedin interfaceChangeListener- Parameters:
e- Unused.- See Also:
ColorChooserPanel.colorChooser,Colorizer
-
-