net.sourceforge.hivegui.component
Class AlphaColorSelectionModel
java.lang.Object
javax.swing.colorchooser.DefaultColorSelectionModel
net.sourceforge.hivegui.component.AlphaColorSelectionModel
- All Implemented Interfaces:
- java.io.Serializable, javax.swing.colorchooser.ColorSelectionModel
public class AlphaColorSelectionModel
- extends javax.swing.colorchooser.DefaultColorSelectionModel
Special ColorSelectionModel that supports the alpha channel.
It is supposed to be used in conjunction with special RGBAChooserPanel
(instead of swing DefaultRGBChooserPanel).
- Author:
- Jean-Francois Poilpret
- See Also:
- Serialized Form
Fields inherited from class javax.swing.colorchooser.DefaultColorSelectionModel |
changeEvent, listenerList |
Method Summary |
void |
setAlpha(int alpha,
boolean refresh)
Allows to explicitely set the alpha channel of the color (transparency). |
void |
setSelectedColor(java.awt.Color color)
|
Methods inherited from class javax.swing.colorchooser.DefaultColorSelectionModel |
addChangeListener, fireStateChanged, getChangeListeners, getSelectedColor, removeChangeListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AlphaColorSelectionModel
public AlphaColorSelectionModel()
setAlpha
public void setAlpha(int alpha,
boolean refresh)
- Allows to explicitely set the alpha channel of the color (transparency).
This is the only way to set the alpha (do not use
setSelectedColor
it will ignore the alpha channel of its
color
argument).
setSelectedColor
public void setSelectedColor(java.awt.Color color)
- Specified by:
setSelectedColor
in interface javax.swing.colorchooser.ColorSelectionModel
- Overrides:
setSelectedColor
in class javax.swing.colorchooser.DefaultColorSelectionModel