|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.globalmentor.beans.BoundPropertyObject
com.guiseframework.model.AbstractModel
com.guiseframework.model.DefaultTreeModel
public class DefaultTreeModel
A default implementation of a tree model. If no root node is specified, the root node will be a dummy root node that will not be displayed. If a dummy root node is used, it will automatically be set to an expanded state.
DummyTreeNodeModel| Field Summary |
|---|
| Fields inherited from class com.globalmentor.beans.BoundPropertyObject |
|---|
NO_PROPERTY_CHANGE_LISTENERS, NO_VETOABLE_CHANGE_LISTENERS |
| Fields inherited from interface com.guiseframework.model.TreeModel |
|---|
ROOT_NODE_PROPERTY |
| Fields inherited from interface com.guiseframework.model.Model |
|---|
PLAIN_TEXT_CONTENT_TYPE, XHTML_CONTENT_TYPE, XHTML_FRAGMENT_CONTENT_TYPE |
| Constructor Summary | |
|---|---|
DefaultTreeModel()
Default constructor with a dummy root tree node. |
|
DefaultTreeModel(TreeNodeModel<?> rootNode)
Root node constructor. |
|
| Method Summary | |
|---|---|
void |
addActionListener(ActionListener actionListener)
Adds an action listener. |
protected void |
fireActionPerformed(ActionEvent actionEvent)
Fires a given action event to all registered action listeners. |
protected void |
fireActionPerformed(int force,
int option)
Fires an action event to all registered action listeners. |
java.lang.Iterable<ActionListener> |
getActionListeners()
|
TreeNodeModel<?> |
getRootNode()
|
void |
performAction()
Performs the action with default force and default option. |
void |
performAction(int force,
int option)
Performs the action with the given force and option. |
void |
removeActionListener(ActionListener actionListener)
Removes an action listener. |
void |
setAllExpanded(boolean newAllExpanded)
Sets whether all tree nodes are expanded. |
void |
setRootNode(TreeNodeModel<?> newRootNode)
Sets the root node of the tree model. |
| Methods inherited from class com.guiseframework.model.AbstractModel |
|---|
getEventListenerManager, getPlainText |
| Methods inherited from class com.globalmentor.beans.BoundPropertyObject |
|---|
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, createPostponedPropertyChangeEvent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getForwardPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeSupport, getRepeatPropertyChangeListener, getRepeatVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, getVetoableChangeSupport, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.globalmentor.beans.PropertyBindable |
|---|
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, hasPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener |
| Methods inherited from interface com.globalmentor.beans.PropertyConstrainable |
|---|
addVetoableChangeListener, addVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, hasVetoableChangeListeners, removeVetoableChangeListener, removeVetoableChangeListener |
| Constructor Detail |
|---|
public DefaultTreeModel()
public DefaultTreeModel(TreeNodeModel<?> rootNode)
session - The Guise session that owns this model.rootNode - The root node of the tree model.
java.lang.NullPointerException - if the given root node is null.| Method Detail |
|---|
public TreeNodeModel<?> getRootNode()
getRootNode in interface TreeModelpublic void setRootNode(TreeNodeModel<?> newRootNode)
setRootNode in interface TreeModelnewRootNode - The new root node of the tree model.
java.lang.NullPointerException - if the given root node is null.TreeModel.ROOT_NODE_PROPERTYpublic void setAllExpanded(boolean newAllExpanded)
TreeNodeModel.setAllExpanded(boolean).
setAllExpanded in interface TreeModelnewAllExpanded - true if all the nodes should be expanded, or false if they should be collapsed.public void addActionListener(ActionListener actionListener)
addActionListener in interface ActionListenableactionListener - The action listener to add.public void removeActionListener(ActionListener actionListener)
removeActionListener in interface ActionListenableactionListener - The action listener to remove.public java.lang.Iterable<ActionListener> getActionListeners()
getActionListeners in interface ActionModelpublic void performAction()
ActionEvent is fired to all registered ActionListeners.
This method delegates to performAction(int, int).
performAction in interface ActionModel
public void performAction(int force,
int option)
ActionEvent is fired to all registered ActionListeners.
performAction in interface ActionModelforce - The zero-based force, such as 0 for no force or 1 for an action initiated by from a mouse single click.option - The zero-based option, such as 0 for an event initiated by a mouse left button click or 1 for an event initiaged by a mouse right button click.
protected void fireActionPerformed(int force,
int option)
fireActionPerformed(ActionEvent).
force - The zero-based force, such as 0 for no force or 1 for an action initiated by from a mouse single click.option - The zero-based option, such as 0 for an event initiated by a mouse left button click or 1 for an event initiaged by a mouse right button click.ActionListener,
ActionEventprotected void fireActionPerformed(ActionEvent actionEvent)
actionEvent - The action event to fire.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||