Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.paradoxpoint.libitina.option
Class OptionComponentEnabler  view OptionComponentEnabler download OptionComponentEnabler.java

java.lang.Object
  extended bycom.paradoxpoint.libitina.option.OptionAdapter
      extended bycom.paradoxpoint.libitina.option.OptionComponentEnabler
All Implemented Interfaces:
java.util.EventListener, OptionListener

public class OptionComponentEnabler
extends OptionAdapter

Automatically (de)selects an AbstractButton based upon changes in an option using an OptionEditorStateMap to determine option and button state correlation.


Field Summary
protected  java.awt.Component component
          button that reacts to changes in the option's state
protected  OptionEditorStateMap stateMap
          map defining the selection state for the button for each option state
 
Fields inherited from class com.paradoxpoint.libitina.option.OptionAdapter
option
 
Constructor Summary
OptionComponentEnabler(java.awt.Component component, AbstractOption option, OptionEditorStateMap stateMap)
          Creates a new instance of OptionButton
 
Method Summary
 java.awt.Component getComponent()
          Getter for property button.
 OptionEditorStateMap getStateMap()
          Getter for property relationship.
 void optionStateChanged(OptionEvent e)
          This method gets called when an option's state is changed and sets the button according to the option state and the button's OptionEditorStateMap
 
Methods inherited from class com.paradoxpoint.libitina.option.OptionAdapter
getOption
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

component

protected java.awt.Component component
button that reacts to changes in the option's state


stateMap

protected OptionEditorStateMap stateMap
map defining the selection state for the button for each option state

Constructor Detail

OptionComponentEnabler

public OptionComponentEnabler(java.awt.Component component,
                              AbstractOption option,
                              OptionEditorStateMap stateMap)
Creates a new instance of OptionButton

Method Detail

getComponent

public java.awt.Component getComponent()
Getter for property button.


getStateMap

public OptionEditorStateMap getStateMap()
Getter for property relationship.


optionStateChanged

public void optionStateChanged(OptionEvent e)
This method gets called when an option's state is changed and sets the button according to the option state and the button's OptionEditorStateMap

Specified by:
optionStateChanged in interface OptionListener
Overrides:
optionStateChanged in class OptionAdapter