wtanaka.praya.config
Class ConfigItem
java.lang.Object
|
+--wtanaka.praya.config.ConfigItem
- Direct Known Subclasses:
- ChoiceConfigItem, IntegerConfigItem, StringConfigItem, StringListConfigItem
- public abstract class ConfigItem
- extends java.lang.Object
The abstract base class for representations of single configuration
elements within praya.
Return to
or the Praya Homepage
- Version:
- $Name: $ $Date: 2001/10/03 07:34:14 $
- Author:
- $Author: wtanaka $
|
Constructor Summary |
ConfigItem(java.lang.String name)
|
| Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
m_name
protected java.lang.String m_name
m_listeners
protected java.util.Vector m_listeners
m_broadcastEvent
private ConfigItemChangeEvent m_broadcastEvent
- This is the instance of the event that we most recently started
broadcasting. We use this to allow ConfigItemChangeListener instances to
be able to call setValue (for instance if we set a choice to connected,
and the protocol cannot connect, it can set the choice back to
disconnected). If we are in the middle of broadcasting an event and ever
notice that this is not the same as the event we are broadcasting, we
immediately stop. (this prevents two different listeners from setting
the value to two different values and getting into an infinite recursion
fight.)
The reason this came up is that (e.g.) the user would set the choice to
"Connected", YahooClient would set everything to disconnected, but when
the JComboBox saw the "Connected" event and it's currently "Disconnected"
state, it would repeat the event and attempt to reset back to "Connected"
ConfigItem
public ConfigItem(java.lang.String name)
addConfigItemChangeListener
public void addConfigItemChangeListener(ConfigItemChangeListener list)
removeConfigItemChangeListener
public void removeConfigItemChangeListener(ConfigItemChangeListener list)
setValue
public abstract void setValue(java.lang.Object newValue)
fireValueChanged
protected void fireValueChanged(java.lang.Object newValue)
getValue
public abstract java.lang.Object getValue()
getName
public java.lang.String getName()