net.sourceforge.hivegui.component
Class AlphaColorSelectionModel

java.lang.Object
  extended by javax.swing.colorchooser.DefaultColorSelectionModel
      extended by 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

Field Summary
 
Fields inherited from class javax.swing.colorchooser.DefaultColorSelectionModel
changeEvent, listenerList
 
Constructor Summary
AlphaColorSelectionModel()
           
 
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
 

Constructor Detail

AlphaColorSelectionModel

public AlphaColorSelectionModel()
Method Detail

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