|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.tree.DefaultMutableTreeNode | +--javatools.swing.tree.IndexedTypedTreeNode | +--medi.swing.tree.MediTreeNode
It's a tree node specifically designed for Medi.
Field Summary |
Fields inherited from class javatools.swing.tree.IndexedTypedTreeNode |
beingCut, deleteWhenCut, dupWhenClipped, expanded, ID, tree, type |
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject |
Constructor Summary | |
MediTreeNode()
Creates new MediTreeNode |
|
MediTreeNode(javax.swing.JTree pTree,
java.lang.Object userObject)
Creates a new node with the given object. |
|
MediTreeNode(javax.swing.JTree pTree,
java.lang.Object userObject,
boolean allowsChildren)
Creates a new node with the given object. |
|
MediTreeNode(java.lang.Object userObject)
Creates a new node with the given object. |
|
MediTreeNode(java.lang.Object userObject,
boolean allowsChildren)
Creates a new node with the given object. |
Method Summary | |
void |
attach(Clippable newSon)
Attaches an object to this one. |
boolean |
canBeAttached(Clippable newSon)
Checks whether an object can be attached to this one. |
boolean |
canBeCopied()
Checks whether this object can be copied or not. |
boolean |
canBeCut()
Checks whether this object can be cut or not. |
Clippable |
copy()
Copies this object into the clipboard. |
Clippable |
cut()
Cuts this object into the clipboard. |
Clippable |
duplicate()
Duplicates (clones) this object. |
java.lang.Object[] |
getID()
Returns the ID. |
java.lang.String |
getType()
Returns the type of the node. |
java.lang.Object |
getValue()
Returns the value of this object. |
static void |
init()
Initializes some generic lists. |
void |
paste(Clippable newFather)
Pastes this object into another. |
void |
setID(java.lang.Object[] pID)
Sets the ID for the node. |
void |
setType(java.lang.String pType)
Sets the type of node. |
void |
unclip()
Resets the status of this object. |
Methods inherited from class javatools.swing.tree.IndexedTypedTreeNode |
add, conditionalSetPlace, expand, getDeleteWhenCut, getDuplicateWhenClipped, getPlace, insert, isExpanded, reload, remove, remove, removeAllChildren, removeFromParent, setDeleteWhenCut, setDuplicateWhenClipped, setExpanded, setPlace, setPlaceForChildren |
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode |
add, breadthFirstEnumeration, children, clone, 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, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, setAllowsChildren, setParent, setUserObject, toString |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public MediTreeNode()
public MediTreeNode(java.lang.Object userObject)
userObject
- The object.public MediTreeNode(java.lang.Object userObject, boolean allowsChildren)
userObject
- The object to use.allowsChildren
- true
: it allows children;
false
: it DOES NOT allow children.public MediTreeNode(javax.swing.JTree pTree, java.lang.Object userObject)
pTree
- The tree that contains this node.userObject
- The object.public MediTreeNode(javax.swing.JTree pTree, java.lang.Object userObject, boolean allowsChildren)
pTree
- The tree that contains this node.userObject
- The object.allowsChildren
- true
: it allows children;
false
: it DOES NOT allow children.Method Detail |
public static void init()
public void setID(java.lang.Object[] pID)
setID
in class IndexedTypedTreeNode
pID
- An array of object representing the ID.public java.lang.Object[] getID()
getID
in class IndexedTypedTreeNode
public void setType(java.lang.String pType)
setType
in class IndexedTypedTreeNode
pType
- The type.public java.lang.String getType()
getType
in interface Clippable
getType
in class IndexedTypedTreeNode
public void attach(Clippable newSon)
attach
in interface Clippable
attach
in class IndexedTypedTreeNode
newSon
- The object to be attached. It must be MediTreeNode
.public Clippable copy()
copy
in interface Clippable
copy
in class IndexedTypedTreeNode
public Clippable cut()
cut
in interface Clippable
cut
in class IndexedTypedTreeNode
public java.lang.Object getValue()
getValue
in interface Clippable
getValue
in class IndexedTypedTreeNode
public void paste(Clippable newFather)
paste
in interface Clippable
paste
in class IndexedTypedTreeNode
newFather
- The object to paste this object into. It must be MediTreeNode
to
really work.public boolean canBeAttached(Clippable newSon)
canBeAttached
in interface Clippable
canBeAttached
in class IndexedTypedTreeNode
newSon
- The object that is going to be attached to this one.
true
: the object can be attached;
false
: otherwise.public Clippable duplicate()
duplicate
in interface Clippable
duplicate
in class IndexedTypedTreeNode
public void unclip()
unclip
in interface Clippable
unclip
in class IndexedTypedTreeNode
public boolean canBeCut()
canBeCut
in interface Clippable
canBeCut
in class IndexedTypedTreeNode
true
: the object can be cut;
false
: otherwise.public boolean canBeCopied()
canBeCopied
in interface Clippable
canBeCopied
in class IndexedTypedTreeNode
true
: the object can be copied;
false
: otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |