com.tensegrity.palowebviewer.modules.widgets.client.treecombobox
Class DefaultTreeComboboxModel

java.lang.Object
  extended by com.tensegrity.palowebviewer.modules.widgets.client.combobox.AbstractComboboxModel
      extended by com.tensegrity.palowebviewer.modules.widgets.client.treecombobox.DefaultTreeComboboxModel
All Implemented Interfaces:
IComboboxModel, ITreeComboboxModel
Direct Known Subclasses:
SelectedElementComboboxModel

public class DefaultTreeComboboxModel
extends AbstractComboboxModel
implements ITreeComboboxModel

Default implementation for ITreeComboboxModel with tree instead of plain list. As the base ITreeModel may be partially loaded, the model have IValidator that is asked if the selected item is OK. The validator is given setter because it has not does not know which method to call to set the value.


Field Summary
protected  java.lang.Object selectedItem
           
 
Fields inherited from class com.tensegrity.palowebviewer.modules.widgets.client.combobox.AbstractComboboxModel
listenerCollection
 
Constructor Summary
DefaultTreeComboboxModel(ITreeModel treeModel, java.lang.Object selected)
           
DefaultTreeComboboxModel(ITreeModel treeModel, java.lang.Object selected, IValidator validator)
           
 
Method Summary
 java.lang.Object getSelectedItem()
           
 ITreeModel getTreeModel()
           
protected  boolean isItemValid(java.lang.Object item)
           
protected  void resetSelected()
           
protected  void setInitialSelection()
           
 void setSelectedItem(java.lang.Object node)
           
 
Methods inherited from class com.tensegrity.palowebviewer.modules.widgets.client.combobox.AbstractComboboxModel
addComboboxListener, removeComboboxListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.tensegrity.palowebviewer.modules.widgets.client.combobox.IComboboxModel
addComboboxListener, removeComboboxListener
 

Field Detail

selectedItem

protected java.lang.Object selectedItem
Constructor Detail

DefaultTreeComboboxModel

public DefaultTreeComboboxModel(ITreeModel treeModel,
                                java.lang.Object selected)

DefaultTreeComboboxModel

public DefaultTreeComboboxModel(ITreeModel treeModel,
                                java.lang.Object selected,
                                IValidator validator)
Method Detail

resetSelected

protected void resetSelected()

isItemValid

protected boolean isItemValid(java.lang.Object item)

getTreeModel

public ITreeModel getTreeModel()
Specified by:
getTreeModel in interface ITreeComboboxModel

getSelectedItem

public java.lang.Object getSelectedItem()
Specified by:
getSelectedItem in interface IComboboxModel

setSelectedItem

public void setSelectedItem(java.lang.Object node)
Specified by:
setSelectedItem in interface IComboboxModel

setInitialSelection

protected void setInitialSelection()