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

Quick Search    Search Deep

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

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

public abstract class OptionAdapter
extends java.lang.Object
implements OptionListener

An abstract adapter class for receiving option events. The methods in this class are empty. This class exists as convenience for creating listener objects.

Extend this class to create a OptionEvent listener and override the methods for the events of interest. (If you implement the OptionListener interface, you have to define all of the methods in it. This abstract class defines null methods for them all, so you can only have to define methods for events you care about.)

Create a listener object using your class and then register it with a component using the OptionContainer's addOptionListener method. When the option's state changes, the relevant method in the listener object is invoked, and the ComponentOption is passed to it.


Field Summary
protected  AbstractOption option
          option
 
Constructor Summary
OptionAdapter(AbstractOption option)
          Creates a new instance of OptionAdapter
 
Method Summary
 AbstractOption getOption()
          Returns the name of the option in whihc this listener is interested.
 void optionStateChanged(OptionEvent e)
          This method gets called when an option's state is changed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

option

protected AbstractOption option
option

Constructor Detail

OptionAdapter

public OptionAdapter(AbstractOption option)
Creates a new instance of OptionAdapter

Method Detail

getOption

public AbstractOption getOption()
Returns the name of the option in whihc this listener is interested.

Specified by:
getOption in interface OptionListener

optionStateChanged

public void optionStateChanged(OptionEvent e)
This method gets called when an option's state is changed.

Specified by:
optionStateChanged in interface OptionListener