|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--au.edu.swin.synergy.plugin.packager.BPackageModelElement
This will contain a MetaElement and allow a means of editting the way this looks as well as displaying it as a hierarchy in a tree.
Field Summary | |
static int |
kPackageArc
Indicates that this is a package arc |
static int |
kPackageNode
Indicates that this is a package node |
static int |
kPackageTerminator
Indicates that this is a package terminator |
Constructor Summary | |
BPackageModelElement(BMetaElement metaElement,
int nodeType)
Creates a new BPackageModelElement based on the given meta element. |
Method Summary | |
Enumeration |
children()
Returns the children of the reciever as an Enumeration. |
boolean |
getAllowsChildren()
Returns true if the receiver allows children. |
BDrawable |
getBDrawable()
This will return the BGroup that represents this BMetaElement in this package. |
TreeNode |
getChildAt(int childIndex)
Returns the child TreeNode at index childIndex. |
int |
getChildCount()
Returns the number of children TreeNodes the receiver contains. |
int |
getIndex(TreeNode node)
Returns the index of node in the receivers children. |
int |
getNodeType()
This will indicate the type of node this node represents. |
TreeNode |
getParent()
Returns the parent TreeNode of the receiver. |
Object |
getUserObject()
Provides a reference to the meta element that this node represents. |
void |
insert(MutableTreeNode newNode,
int index)
This will insert the given MutableTreeNode into the element at the specified index. |
boolean |
isLeaf()
Returns true if the receiver is a leaf. |
void |
remove(int targetNodeIndex)
Removes the given node from the list of children of this node. |
void |
remove(MutableTreeNode targetNode)
Removes the given node from the list of children of this node. |
void |
removeFromParent()
This will remove this node from its parent node by calling the remove method on the parent object and passing this as the paramater to the call. |
void |
setParent(MutableTreeNode parentTreeNode)
Sets the parent node of this node to the given tree node. |
void |
setUserObject(Object metaElementObject)
This allows the user to |
String |
toString()
This will get the name of the meta element as the graphical representation on the screen |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public static final int kPackageNode
public static final int kPackageArc
public static final int kPackageTerminator
Constructor Detail |
public BPackageModelElement(BMetaElement metaElement, int nodeType)
metaElement
- The element to base this onnodeType
- The type of node creating, BPackageArc, BPackageNode, BPackageTerminatorMethod Detail |
public TreeNode getChildAt(int childIndex)
public int getChildCount()
public TreeNode getParent()
public int getIndex(TreeNode node)
public boolean getAllowsChildren()
public boolean isLeaf()
public Enumeration children()
public String toString()
public Object getUserObject()
public void setUserObject(Object metaElementObject)
public void setParent(MutableTreeNode parentTreeNode)
parentTreeNode
- The new parent of this nodepublic void removeFromParent()
public void remove(MutableTreeNode targetNode)
targetNode
- The node to removepublic void remove(int targetNodeIndex)
targetNode
- The node to removepublic void insert(MutableTreeNode newNode, int index)
newNode
- The node to insertindex
- The index to insert the new nodepublic BDrawable getBDrawable()
public int getNodeType()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |