|
|||||||||
| 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.AbstractValueModel<V>
com.guiseframework.model.DefaultValueModel<V>
com.guiseframework.model.DefaultTreeNodeModel<V>
com.guiseframework.model.DynamicTreeNodeModel<V>
V - The type of value contained in the tree node.public abstract class DynamicTreeNodeModel<V>
A node in a tree model that can dynamically load its children when needed.
Child classes must override determineLeaf() and #determineChildNodes().
Property change events on one tree node will be bubbled up the hierarchy, with the source indicating the tree node on which the property change occurred.
| 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.TreeNodeModel |
|---|
EXPANDED_PROPERTY |
| Fields inherited from interface com.guiseframework.model.ValueModel |
|---|
VALIDATOR_PROPERTY, VALUE_PROPERTY |
| Fields inherited from interface com.guiseframework.model.Model |
|---|
PLAIN_TEXT_CONTENT_TYPE, XHTML_CONTENT_TYPE, XHTML_FRAGMENT_CONTENT_TYPE |
| Fields inherited from interface com.guiseframework.model.Selectable |
|---|
SELECTED_PROPERTY |
| Constructor Summary | |
|---|---|
DynamicTreeNodeModel(java.lang.Class<V> valueClass)
Constructs a tree node model indicating the type of value it can hold. |
|
DynamicTreeNodeModel(java.lang.Class<V> valueClass,
V initialValue)
Constructs a tree node model indicating the type of value it can hold, along with an initial value. |
|
| Method Summary | |
|---|---|
void |
clear()
Removes all of the child tree nodes from this tree node. |
protected abstract java.util.List<TreeNodeModel<?>> |
determineChildren()
Dynamically determines children. |
protected abstract boolean |
determineLeaf()
Dynamically determines whether this node is a leaf. |
boolean |
isLeaf()
Returns whether this node could be considered a leaf node. |
void |
setExpanded(boolean newExpanded)
Sets whether the node is expanded, showing its children, if any. |
| Methods inherited from class com.guiseframework.model.DefaultTreeNodeModel |
|---|
add, addActionListener, fireActionPerformed, fireActionPerformed, getActionListeners, getChildren, getDepth, getParent, getTreeNodeList, hasChild, hasChildren, isExpanded, isSelected, iterator, performAction, performAction, remove, removeActionListener, setAllExpanded, setChildren, setParent, setSelected |
| Methods inherited from class com.guiseframework.model.DefaultValueModel |
|---|
clearValue, getDefaultValue, getValue, resetValue, setValue |
| Methods inherited from class com.guiseframework.model.AbstractValueModel |
|---|
createPropertyVetoException, getValidator, getValueClass, isValidValue, setValidator, validateValue |
| 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.guiseframework.model.ValueModel |
|---|
clearValue, getDefaultValue, getValidator, getValue, getValueClass, isValidValue, resetValue, setValidator, setValue, validateValue |
| 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 DynamicTreeNodeModel(java.lang.Class<V> valueClass)
valueClass - The class indicating the type of value held in the model.
java.lang.NullPointerException - if the given value class is null.
public DynamicTreeNodeModel(java.lang.Class<V> valueClass,
V initialValue)
valueClass - The class indicating the type of value held in the model.initialValue - The initial value, which will not be validated.
java.lang.NullPointerException - if the given value class is null.| Method Detail |
|---|
public boolean isLeaf()
true if child nodes are not loaded and this is not a predictive dynamic tree node.
isLeaf in interface TreeNodeModel<V>isLeaf in class DefaultTreeNodeModel<V>true if this is a leaf node, else false if this node should not be considered a leaf.public void setExpanded(boolean newExpanded)
Boolean.
setExpanded in interface TreeNodeModel<V>setExpanded in class DefaultTreeNodeModel<V>newExpanded - true if the node is expandedTreeNodeModel.EXPANDED_PROPERTYpublic void clear()
clear in interface TreeNodeModel<V>clear in class DefaultTreeNodeModel<V>protected abstract boolean determineLeaf()
protected abstract java.util.List<TreeNodeModel<?>> determineChildren()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||