com.sdm.quasar.client.swing.states.adapters
Class GlassPaneBlockingBooleanStateAdapter

java.lang.Object
  extended bycom.sdm.quasar.client.core.states.AbstractBooleanStateAdapter
      extended bycom.sdm.quasar.client.swing.states.adapters.AbstractSwingBooleanStateAdapter
          extended bycom.sdm.quasar.client.swing.states.adapters.GlassPaneBlockingBooleanStateAdapter
All Implemented Interfaces:
BooleanStateAdapter, Disposable

public class GlassPaneBlockingBooleanStateAdapter
extends AbstractSwingBooleanStateAdapter

Adapts the value of a BooleanState to a blocking of user events: If the state value is true all input events are blockt by a glass pane.

Version:
1.0
Author:
Thomas Wolf

Constructor Summary
GlassPaneBlockingBooleanStateAdapter()
          Creates a new GlassPaneBlockingBooleanStateAdapter.
GlassPaneBlockingBooleanStateAdapter(java.lang.String name)
          Creates a new GlassPaneBlockingBooleanStateAdapter.
 
Method Summary
 void addJComponent(javax.swing.JComponent jcomponent)
          Adds a JComponent, whos enablement should be adapted from the state.
 void addJComponentInverse(javax.swing.JComponent jcomponent)
          Adds a JComponent, whos enablement should be adapted inverse from the state.
 void removeJComponent(javax.swing.JComponent jcomponent)
          Removes a previously added JComponent from adapting its enablement.
protected  void setAdaptedValue(java.lang.Object target, boolean value)
          Sets the adapted value for the given target object (that was added before to this adapter).
 
Methods inherited from class com.sdm.quasar.client.swing.states.adapters.AbstractSwingBooleanStateAdapter
updateAdaptedValue
 
Methods inherited from class com.sdm.quasar.client.core.states.AbstractBooleanStateAdapter
addTarget, addTarget, addTargetInverse, dispose, getBooleanState, getName, removeTarget, setAdaptedValue, setBooleanState, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlassPaneBlockingBooleanStateAdapter

public GlassPaneBlockingBooleanStateAdapter()
Creates a new GlassPaneBlockingBooleanStateAdapter.


GlassPaneBlockingBooleanStateAdapter

public GlassPaneBlockingBooleanStateAdapter(java.lang.String name)
Creates a new GlassPaneBlockingBooleanStateAdapter.

Parameters:
name - the name of the adapter
Method Detail

addJComponent

public void addJComponent(javax.swing.JComponent jcomponent)
Adds a JComponent, whos enablement should be adapted from the state.

Parameters:
jcomponent - the JComponent to add

addJComponentInverse

public void addJComponentInverse(javax.swing.JComponent jcomponent)
Adds a JComponent, whos enablement should be adapted inverse from the state.

Parameters:
jcomponent - the JComponent to add

removeJComponent

public void removeJComponent(javax.swing.JComponent jcomponent)
Removes a previously added JComponent from adapting its enablement.

Parameters:
jcomponent - the JComponent to remove

setAdaptedValue

protected void setAdaptedValue(java.lang.Object target,
                               boolean value)
Description copied from class: AbstractBooleanStateAdapter
Sets the adapted value for the given target object (that was added before to this adapter).

Specified by:
setAdaptedValue in class AbstractBooleanStateAdapter
Parameters:
target - the target to adapt the value to
value - the value to adapt
See Also:
AbstractBooleanStateAdapter.setAdaptedValue(java.lang.Object, boolean)