org.openbp.jaspira.option.widget
Class ColorWidget

java.lang.Object
  extended by org.openbp.jaspira.option.OptionWidget
      extended by org.openbp.jaspira.option.widget.ColorWidget

public class ColorWidget
extends OptionWidget

Option widget that supports the selection of a color.

Author:
Baumgartner Michael

Field Summary
 
Fields inherited from class org.openbp.jaspira.option.OptionWidget
option
 
Constructor Summary
ColorWidget(Option option)
          Constructor.
 
Method Summary
 java.lang.Object getValue()
          Get the selected color.
 javax.swing.JComponent getWidgetComponent()
          Get the panel for the color widget.
 void setValue(java.lang.Object o)
          Set a new color.
 
Methods inherited from class org.openbp.jaspira.option.OptionWidget
createHeading, getDescriptionComponent, getOption, notifyOptionMgrOfOptionChange
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColorWidget

public ColorWidget(Option option)
Constructor.

Parameters:
option - Option the widget refers to
Method Detail

getValue

public java.lang.Object getValue()
Get the selected color.

Specified by:
getValue in class OptionWidget
Returns:
A Color object

getWidgetComponent

public javax.swing.JComponent getWidgetComponent()
Get the panel for the color widget. It contains a text with the color and a button to change it.

Specified by:
getWidgetComponent in class OptionWidget
Returns:
the panel

setValue

public void setValue(java.lang.Object o)
Set a new color.

Specified by:
setValue in class OptionWidget
Parameters:
o - The Color object to set


Copyright © 2011. All Rights Reserved.