|
CubeTwister 2.0alpha142 2012-02-11 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.tree.DefaultMutableTreeNode
ch.randelshofer.cubetwister.doc.EntityModel
public class EntityModel
Holds an entity which can be managed by a DocumentModel.
Requires that the root node of the tree managed by DocumentModel is an Entity Model and that its UserObject is the DocumentMdel. This is used to ensure proper listener notifications for object insertion and removal.
| Field Summary | |
|---|---|
static java.lang.String |
PROP_CHILD_COUNT
|
| Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
|---|
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject |
| Constructor Summary | |
|---|---|
EntityModel()
Creates a new EntityModel. |
|
EntityModel(java.lang.Object userObject,
boolean allowsChildren)
Creates a new EntityModel. |
|
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
|
java.util.Enumeration |
children()
Enumerates the children of this entity. |
java.lang.Object |
clone()
Returns a shallow copy of this model. |
void |
dispose()
|
void |
fireNodeChanged()
|
void |
fireNodeStructureChanged()
|
protected void |
firePropertyChange(java.lang.String propertyName,
boolean oldValue,
boolean newValue)
|
protected void |
firePropertyChange(java.lang.String propertyName,
int oldValue,
int newValue)
|
protected void |
firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
|
protected void |
fireUndoableEditHappened(javax.swing.undo.UndoableEdit edit)
Notify all listeners that have registered interest at the DocumentModel for notification on this event type. |
DocumentModel |
getDocument()
Returns the DocumentMdel which holds this model or null if this EntityModel is not part of a document. |
protected boolean |
hasPropertyListeners()
|
void |
insert(javax.swing.tree.MutableTreeNode newChild,
int childIndex)
|
boolean |
isDefaultCube()
|
boolean |
isDefaultNotation()
|
boolean |
isRemovable()
Returns true if the node may be removed from its parent. |
void |
remove(int childIndex)
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
|
void |
setRemovable(boolean b)
Sets the 'removable' property. |
java.lang.String |
toString()
|
void |
undoableEditHappened(javax.swing.event.UndoableEditEvent e)
|
| Methods inherited from class javax.swing.tree.DefaultMutableTreeNode |
|---|
add, breadthFirstEnumeration, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String PROP_CHILD_COUNT
| Constructor Detail |
|---|
public EntityModel()
public EntityModel(java.lang.Object userObject,
boolean allowsChildren)
| Method Detail |
|---|
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
protected void firePropertyChange(java.lang.String propertyName,
boolean oldValue,
boolean newValue)
protected void firePropertyChange(java.lang.String propertyName,
int oldValue,
int newValue)
protected void firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
protected boolean hasPropertyListeners()
public DocumentModel getDocument()
protected void fireUndoableEditHappened(javax.swing.undo.UndoableEdit edit)
public void fireNodeStructureChanged()
public void fireNodeChanged()
public java.lang.Object clone()
clone in class javax.swing.tree.DefaultMutableTreeNodepublic java.util.Enumeration children()
children in interface javax.swing.tree.TreeNodechildren in class javax.swing.tree.DefaultMutableTreeNodepublic boolean isRemovable()
public void setRemovable(boolean b)
isRemovable()public java.lang.String toString()
toString in class javax.swing.tree.DefaultMutableTreeNodepublic void undoableEditHappened(javax.swing.event.UndoableEditEvent e)
undoableEditHappened in interface javax.swing.event.UndoableEditListenerpublic void dispose()
public void insert(javax.swing.tree.MutableTreeNode newChild,
int childIndex)
insert in interface javax.swing.tree.MutableTreeNodeinsert in class javax.swing.tree.DefaultMutableTreeNodepublic void remove(int childIndex)
remove in interface javax.swing.tree.MutableTreeNoderemove in class javax.swing.tree.DefaultMutableTreeNodepublic boolean isDefaultCube()
public boolean isDefaultNotation()
|
(c) Werner Randelshofer. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||