Arch4J 1.1

org.arch4j.statemonitoring
Class BeanStateManager

java.lang.Object
  |
  +--org.arch4j.statemonitoring.BeanStateManager

public class BeanStateManager
extends Object

Used to manage a collection of widgets state.

Author:
awick

Constructor Summary
BeanStateManager()
           
 
Method Summary
 List getBeanMonitors()
          Get the list of bean monitors.
 BeanStateMonitor getMonitorForBean(Object anObject)
          Gets the monitor for a given object.
 boolean hasBeanStateChanged(Object anObject)
          Gets whether or not the state of the bean has changed.
 void monitorWidget(JComboBox aComboBox)
          Start monitoring the combo box field.
 void monitorWidget(JTextField aTextField)
          Start monitoring the text field.
 void resetBeanStates()
          Reset the widget values from the cached values.
 void resetCachedValue(Object anObject)
          Reset the cached value for the given bean.
 void resetCacheValues()
          Reset the widget values from the cached values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanStateManager

public BeanStateManager()
Method Detail

monitorWidget

public void monitorWidget(JTextField aTextField)
Start monitoring the text field.

Parameters:
aTextField - The text field to manage state on.

monitorWidget

public void monitorWidget(JComboBox aComboBox)
Start monitoring the combo box field.

Parameters:
aComboBox - The combo box field to manage state on.

resetBeanStates

public void resetBeanStates()
Reset the widget values from the cached values.


resetCacheValues

public void resetCacheValues()
Reset the widget values from the cached values.


hasBeanStateChanged

public boolean hasBeanStateChanged(Object anObject)
Gets whether or not the state of the bean has changed.

Parameters:
anObject - The object to check for state changed on.
Returns:
true if the state has changed
Throws:
RuntimeException - Thrown if we are not monitoring this object.

resetCachedValue

public void resetCachedValue(Object anObject)
Reset the cached value for the given bean.

Throws:
RuntimeException - Thrown if we are not monitoring this object.

getMonitorForBean

public BeanStateMonitor getMonitorForBean(Object anObject)
Gets the monitor for a given object.

Parameters:
anObject - The object to find the monitor for.
Returns:
The monitor for the given object or null if no monitor is found

getBeanMonitors

public List getBeanMonitors()
Get the list of bean monitors.

Returns:
The list of bean monitors.

Arch4J 1.1

Copyright © 2000-2004 SpiderLogic, a service of Wipfli Ullrich Bertelson LLP.