com.guiseframework.model.urf
Class URFResourceDynamicTreeNodeModel<V extends com.globalmentor.urf.URFResource>
java.lang.Object
com.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>
com.guiseframework.model.urf.AbstractURFDynamicTreeNodeModel<V>
com.guiseframework.model.urf.URFResourceDynamicTreeNodeModel<V>
- Type Parameters:
V - The type of value contained in the tree node.
- All Implemented Interfaces:
- com.globalmentor.beans.PropertyBindable, com.globalmentor.beans.PropertyConstrainable, ActionListenable, ActionModel, Model, Selectable, TreeNodeModel<V>, Valued<V>, ValueModel<V>, java.lang.Iterable<TreeNodeModel<?>>
public class URFResourceDynamicTreeNodeModel<V extends com.globalmentor.urf.URFResource>
- extends AbstractURFDynamicTreeNodeModel<V>
A dynamic tree node model that represents an URF resource.
Any properties will be dynamically loaded
This class has special support for URF lists and sets, the contents of which are by default displayed as children of the given resource.
- Author:
- Garret Wilson
| Fields inherited from class com.globalmentor.beans.BoundPropertyObject |
NO_PROPERTY_CHANGE_LISTENERS, NO_VETOABLE_CHANGE_LISTENERS |
| 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.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 |
RESOURCE_CHILDREN_INCLUDED_PROPERTY
public static final java.lang.String RESOURCE_CHILDREN_INCLUDED_PROPERTY
- The bound property of whether resource children are included in the node.
RESOURCE_PROPERTIES_INCLUDED_PROPERTY
public static final java.lang.String RESOURCE_PROPERTIES_INCLUDED_PROPERTY
- The bound property of whether resource properties are included in the node.
URFResourceDynamicTreeNodeModel
public URFResourceDynamicTreeNodeModel(java.lang.Class<V> valueClass)
- Value class constructor with no initial value.
- Parameters:
valueClass - The class indicating the type of value held in the model.
URFResourceDynamicTreeNodeModel
public URFResourceDynamicTreeNodeModel(java.lang.Class<V> valueClass,
V initialValue)
- Initial value constructor.
- Parameters:
valueClass - The class indicating the type of value held in the model.initialValue - The initial value, which will not be validated.
URFResourceDynamicTreeNodeModel
public URFResourceDynamicTreeNodeModel(java.lang.Class<V> valueClass,
java.net.URI propertyURI,
V initialValue)
- Property and initial value constructor.
- Parameters:
valueClass - The class indicating the type of value held in the model.propertyURI - The URI of the URF property of which this URF resource is an object, or null if this resource should not be considered the object of any property.initialValue - The initial value, which will not be validated.
getPropertyURI
public java.net.URI getPropertyURI()
- Returns:
- The URI of the URF property of which this URF resource is an object, or
null if this resource should not be considered the object of any property.
isResourceChildrenIncluded
public boolean isResourceChildrenIncluded()
- Returns:
- Whether resource children are included in the node.
setResourceChildrenIncluded
public void setResourceChildrenIncluded(boolean newChildrenIncluded)
- Sets whether resource children are included in the node.
This is a bound property of type
Boolean.
- Parameters:
newChildrenIncluded - true if resource children should be included as children of this node.- See Also:
RESOURCE_CHILDREN_INCLUDED_PROPERTY
isResourcePropertiesIncluded
public boolean isResourcePropertiesIncluded()
- Returns:
- Whether resource properties are included in the node.
setResourcePropertiesIncluded
public void setResourcePropertiesIncluded(boolean newPropertiesIncluded)
- Sets whether resource properties are included in the node.
This is a bound property of type
Boolean.
- Parameters:
newPropertiesIncluded - true if resource properties should be included as children of this node.- See Also:
RESOURCE_PROPERTIES_INCLUDED_PROPERTY
determineLeaf
protected boolean determineLeaf()
- Dynamically determines whether this node is a leaf.
This version determines if resource properties are included and there are properties, or if resource children are included and there are children.
This version ignores URF type properties and properties of a
URFCollectionResource.
- Specified by:
determineLeaf in class DynamicTreeNodeModel<V extends com.globalmentor.urf.URFResource>
- Returns:
- Whether this node should be considered a leaf with no children.
determineChildren
protected java.util.List<TreeNodeModel<?>> determineChildren()
- Dynamically determines children.
This version ignores URF type properties and properties of an
URFCollectionResource.
- Specified by:
determineChildren in class DynamicTreeNodeModel<V extends com.globalmentor.urf.URFResource>
- Returns:
- The dynamically loaded list of children.
Copyright © 2005-2010 GlobalMentor, Inc. All Rights Reserved.