com.sdm.quasar.client.swing.states
Class TreeModelSelectedBooleanState

java.lang.Object
  extended bycom.sdm.quasar.client.core.states.AbstractState
      extended bycom.sdm.quasar.client.core.states.AbstractBooleanState
          extended bycom.sdm.quasar.client.swing.states.TreeModelSelectedBooleanState
All Implemented Interfaces:
BooleanState, Disposable, java.util.EventListener, State, javax.swing.event.TreeSelectionListener

public class TreeModelSelectedBooleanState
extends AbstractBooleanState
implements BooleanState, javax.swing.event.TreeSelectionListener

A BooleanState representing the selection/deselection state of a TreeSelectionModel.

Author:
Martin Haft

Constructor Summary
TreeModelSelectedBooleanState(javax.swing.tree.TreeSelectionModel treeSelectionModel)
          Constructs the BooleanState representing the selection state of the given TreeSelectionModel.
TreeModelSelectedBooleanState(javax.swing.tree.TreeSelectionModel treeSelectionModel, java.lang.String name)
          Constructs the BooleanState representing the selection state of the given TreeSelectionModel.
 
Method Summary
 void valueChanged(javax.swing.event.TreeSelectionEvent e)
           
 
Methods inherited from class com.sdm.quasar.client.core.states.AbstractBooleanState
getValue, isValueTrue, setValue, setValueWithoutNotification
 
Methods inherited from class com.sdm.quasar.client.core.states.AbstractState
addStateListener, appendParametersToString, dispose, fireStateChanged, getName, removeStateListener, setName, stateValueToString, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.sdm.quasar.client.core.states.BooleanState
isValueTrue
 
Methods inherited from interface com.sdm.quasar.client.core.states.State
addStateListener, getName, getValue, removeStateListener, setName
 
Methods inherited from interface com.sdm.quasar.client.core.common.Disposable
dispose
 

Constructor Detail

TreeModelSelectedBooleanState

public TreeModelSelectedBooleanState(javax.swing.tree.TreeSelectionModel treeSelectionModel)
Constructs the BooleanState representing the selection state of the given TreeSelectionModel.

Parameters:
treeSelectionModel - the TreeSelectionModel we use as selection source

TreeModelSelectedBooleanState

public TreeModelSelectedBooleanState(javax.swing.tree.TreeSelectionModel treeSelectionModel,
                                     java.lang.String name)
Constructs the BooleanState representing the selection state of the given TreeSelectionModel.

Parameters:
treeSelectionModel - the TreeSelectionModel we use as selection source
name - name of the state
Method Detail

valueChanged

public void valueChanged(javax.swing.event.TreeSelectionEvent e)
Specified by:
valueChanged in interface javax.swing.event.TreeSelectionListener