|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ConForM.CoopnTools.Constraint.ConstraintNode
This class symbolizes a node in the constraint tree of the constraints editor. All nodes of the tree have to extends this class in order to inherit the functionalities of a node.
Field Summary | |
protected boolean |
allowsChildren
|
protected java.lang.String[] |
arg
|
protected java.util.List |
childNodeList
|
protected ConstraintsMgr |
consMgr
|
protected java.lang.String |
consTitle
|
protected ConsEnv |
env
|
protected java.text.MessageFormat |
fmt
|
protected ConstraintNode |
parent
|
protected javax.swing.JPopupMenu |
popup
|
protected boolean |
readOnly
|
protected java.lang.String |
removeText
|
protected java.lang.String |
removeTitle
|
static java.lang.String |
ResourceFile
|
protected java.lang.String |
title
|
protected ConstraintTree |
tree
|
Constructor Summary | |
ConstraintNode(ConstraintTree tree,
ConstraintNode parent,
ConstraintsMgr consMgr,
ConsEnv env)
|
Method Summary | |
protected void |
acceptEditions(ConsPanel consPanel)
This method is called each time the contents of the edit panel must be used to set the values of the node's elements. |
protected void |
buildTexts(java.util.ResourceBundle texts)
This routine is called at the creation of the node, by "super". |
java.util.Enumeration |
children()
|
java.lang.Object |
clone()
|
protected ConsPanel |
createConsPanel()
This method is called each time the edit panel is about to be displayed. |
protected abstract ConstraintNode |
createNodeFromElement(ConstraintsElement element)
Create a node from an element, if possible. |
protected void |
createPopup()
This method must be called by the sub-classed to create the popup, after the creation of the edit panel. |
protected boolean |
editable()
Return true iff the node accept editions with an edit panel. |
boolean |
getAllowsChildren()
|
javax.swing.tree.TreeNode |
getChildAt(int childIndex)
|
int |
getChildCount()
|
ConstraintNode |
getConsNodeAt(int childIndex)
|
int |
getIndex(javax.swing.tree.TreeNode node)
|
protected abstract java.lang.String |
getLabel()
This routine must return the label of the node, as a String. |
javax.swing.tree.TreeNode |
getParent()
|
ConstraintNode |
getParentConsNode()
|
javax.swing.JPopupMenu |
getPopupMenu()
|
protected abstract ConstraintsElement |
getTextElement()
This routine must deliver the coopn text element corresponing to this node. |
protected javax.swing.tree.TreePath |
getTreePath()
This method return a treePath from root to node |
void |
insert(ConstraintNode child)
Insert a node, at its standard position. |
void |
insert(ConstraintsElement child)
Insert an element, at its standard position. |
void |
insert(ConstraintsElement child,
int index)
Insert an element, at a specified position. |
void |
insert(javax.swing.tree.MutableTreeNode child,
int index)
|
boolean |
insertAble(ConstraintNode child,
int index)
Return true if the node can be inserted at the given location, or merged to the current node at the given location. |
boolean |
insertAble(ConstraintsElement child,
int index)
Return true if the element can be inserted at the given location, or merged to the current node at the given location. |
protected boolean |
insertAbleObject(java.lang.Object child,
int index)
Return true if the object can be inserted at the given location, or merged to the current node at the given location. |
boolean |
isLeaf()
|
boolean |
mergeAble(ConstraintNode child,
int index)
Return true if the node can be merged to the current node, at the given location. |
boolean |
mergeAble(ConstraintsElement child,
int index)
Return true if the element can be merged to the current node, at the given location. |
protected boolean |
mergeAbleObject(java.lang.Object child,
int index)
Return true if the object can be merged to the current node, at the given location. |
protected abstract void |
notifyInsertRemove()
This method is called each time children are inserted or removed. |
protected void |
openAll()
This method is called when all the child node need to be expanded |
void |
remove()
Remove the current node, as well as its childs, iff the user confirm the command. |
void |
remove(int index)
|
void |
remove(javax.swing.tree.MutableTreeNode node)
|
void |
removeFromParent()
|
void |
setParent(javax.swing.tree.MutableTreeNode newParent)
|
void |
setUserObject(java.lang.Object object)
|
void |
showConsPanel()
|
int |
standardInsertIndex(ConstraintNode child)
Return the standard location of a node to insert. |
int |
standardInsertIndex(ConstraintsElement child)
Return the standard location of an element to insert. |
protected abstract int |
standardInsertIndexObject(java.lang.Object child)
Return the standard location of an object to insert. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String ResourceFile
protected boolean allowsChildren
protected ConstraintNode parent
protected ConstraintTree tree
protected java.util.List childNodeList
protected java.text.MessageFormat fmt
protected java.lang.String[] arg
protected java.lang.String title
protected java.lang.String consTitle
protected java.lang.String removeTitle
protected java.lang.String removeText
protected boolean readOnly
protected ConsEnv env
protected ConstraintsMgr consMgr
protected javax.swing.JPopupMenu popup
Constructor Detail |
public ConstraintNode(ConstraintTree tree, ConstraintNode parent, ConstraintsMgr consMgr, ConsEnv env)
Method Detail |
public java.lang.String toString()
toString
in class java.lang.Object
public void showConsPanel()
public javax.swing.JPopupMenu getPopupMenu()
protected abstract ConstraintNode createNodeFromElement(ConstraintsElement element)
element
- a textual elementpublic boolean mergeAble(ConstraintNode child, int index)
public boolean mergeAble(ConstraintsElement child, int index)
protected boolean mergeAbleObject(java.lang.Object child, int index)
public boolean insertAble(ConstraintNode child, int index)
public boolean insertAble(ConstraintsElement child, int index)
protected boolean insertAbleObject(java.lang.Object child, int index)
public int standardInsertIndex(ConstraintNode child)
public int standardInsertIndex(ConstraintsElement child)
protected abstract int standardInsertIndexObject(java.lang.Object child)
protected abstract void notifyInsertRemove()
public ConstraintNode getConsNodeAt(int childIndex)
public ConstraintNode getParentConsNode()
public void insert(ConstraintNode child)
java.lang.IllegalArgumentException
- the child cannot be inserted in this node.public void insert(ConstraintsElement child)
java.lang.IllegalArgumentException
- the child cannot be inserted in this node.public void insert(ConstraintsElement child, int index) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
- the child cannot be inserted in this node.public void remove()
public java.util.Enumeration children()
children
in interface javax.swing.tree.TreeNode
public boolean getAllowsChildren()
getAllowsChildren
in interface javax.swing.tree.TreeNode
public javax.swing.tree.TreeNode getChildAt(int childIndex)
getChildAt
in interface javax.swing.tree.TreeNode
public int getChildCount()
getChildCount
in interface javax.swing.tree.TreeNode
public int getIndex(javax.swing.tree.TreeNode node)
getIndex
in interface javax.swing.tree.TreeNode
public javax.swing.tree.TreeNode getParent()
getParent
in interface javax.swing.tree.TreeNode
public boolean isLeaf()
isLeaf
in interface javax.swing.tree.TreeNode
public void insert(javax.swing.tree.MutableTreeNode child, int index) throws java.lang.IllegalArgumentException
insert
in interface javax.swing.tree.MutableTreeNode
public void remove(int index)
remove
in interface javax.swing.tree.MutableTreeNode
public void remove(javax.swing.tree.MutableTreeNode node)
remove
in interface javax.swing.tree.MutableTreeNode
public void removeFromParent()
removeFromParent
in interface javax.swing.tree.MutableTreeNode
public void setParent(javax.swing.tree.MutableTreeNode newParent)
setParent
in interface javax.swing.tree.MutableTreeNode
public void setUserObject(java.lang.Object object)
setUserObject
in interface javax.swing.tree.MutableTreeNode
protected void buildTexts(java.util.ResourceBundle texts)
protected abstract java.lang.String getLabel()
protected abstract ConstraintsElement getTextElement()
protected void createPopup()
protected boolean editable()
protected ConsPanel createConsPanel()
protected javax.swing.tree.TreePath getTreePath()
protected void openAll()
protected void acceptEditions(ConsPanel consPanel)
public java.lang.Object clone()
clone
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |