|
www.element4solution.com | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface E4TreeNode_Intf
Node of a tree, holds the data. The E4TreeNode_Intf defines the required functions for the D2S environment to handle tree functionality, this does not require construction of nodes.
| Example_Tree.java |
E4TreeElement,
E4TreeNode,
E4Tree,
E4ModuleTreeHandling| Method Summary | |
|---|---|
void |
addNode(E4TreeNode_Intf node)
Add a node to the current node. |
void |
collectScripts(E4ScriptsVec v,
E4ServletImplementation_Intf servlet)
Append the current script to the Vector, each script is identified by a name and can only appear onece in the Vector. |
void |
collectStylesForEditing(E4StylesHash vec,
E4ServletImplementation_Intf servlet)
Build a list (Vector) with style definitions used so far during display of this page. |
void |
collectTranslationsForEditing(E4TranslationsVec v,
E4ServletImplementation_Intf servlet)
|
E4TreeNode_Intf |
copy()
|
int |
countNodes()
|
java.lang.Object |
findAdditionalElement(java.lang.Class clazz)
|
E4TreeNode_Intf |
findSubnode(long nodeId)
Find a subnode within a tree. |
E4TreeNode_Intf |
findSubnodeText(E4String text)
Find a subnode within a tree. |
E4TreeNode_Intf |
findSubnodeText(java.lang.String text)
Find a subnode within a tree. |
java.lang.Object |
getAction()
Get the associated action. |
java.util.Enumeration |
getAdditionalElements()
|
E4Color |
getBgColor()
|
FONT |
getFONT()
|
java.lang.String |
getFormattedText(Language dest_lang)
Get the displayed text, formatted. |
long |
getId()
Get the identification for a tree node. |
IMG |
getImage()
Get the associated image for the node, depending on the isActive() state. |
IMG |
getImage(boolean mode)
Get the associated image for the node. |
java.lang.Object |
getObj()
Get the associated object. |
CLASS_Name |
getSTYLE()
Get the E4CSS definition for this tree node. |
java.util.Enumeration |
getSubNodes()
Get an enumeration of all direct associated sub-nodes in the next level (not recursivley deeper). |
E4TreeNode_Intf[] |
getSubNodesArray()
Get an array of all direct associated sub-nodes in the next level (not recursivley deeper). |
E4Label_Intf |
getText()
Get the associated text. |
boolean |
hasSubnodes()
Determine, if a node has subnodes. |
boolean |
isActive()
Get the active state of a tree node. |
boolean |
isOpen()
Get the open state of a tree node. |
void |
removeAllNodes()
Removes all subnodes from this node. |
boolean |
removeNode(E4TreeNode_Intf node)
Remove a node. |
boolean |
removeNode(long nodeId)
Remove a node. |
void |
setActive(long node_id)
Sets the active state of this node to true (active) and resets all subnodes to false (inactive). |
void |
setId(long id)
Set's the ID of an node. |
void |
setImage(IMG image)
|
void |
setImage(IMG image0,
IMG image1)
|
void |
setObj(java.lang.Object obj)
set the associated object. |
void |
setOpen(boolean open)
Defines the open state of only this node. |
void |
setOpen(boolean open,
int levels)
Defines the open state of this and deeper node. |
void |
sort(Language language)
Sort the sub-elements of this node ascending. |
void |
sort(Language language,
boolean ascending)
Sort the sub-elements of this node. |
| Method Detail |
|---|
long getId()
void setId(long id)
id - the new idE4Tree.renumberNodes(),
getId()E4Label_Intf getText()
getFormattedText(e4s.application.Language)java.lang.String getFormattedText(Language dest_lang)
getText(). But for example, an implementation
could hold a text but display it with some markups.
getText()java.lang.Object getObj()
setObj(Object)void setObj(java.lang.Object obj)
obj - the object to be stored.getObj()IMG getImage(boolean mode)
isActive() and setActive(long node_id)). In the case, that
two images are defined (e.g. one for the closed inactive and another for the active node)
the parameter mode defines which image to be displayed. In the case, that only one image
is defined (regardless if the node is active or not), this image will be displayed.
Note that the definition of images is part of the implementation, not of the interface.
mode - false: return the first image defined, true: return the second image if defined, or
return the first image if only one is defined.
setImage(IMG),
setImage(IMG,IMG),
isOpen()
void setImage(IMG image0,
IMG image1)
void setImage(IMG image)
IMG getImage()
isActive() state.
This function is equal to getImage(isActive()).
See also getImage(boolean mode)
java.lang.Object getAction()
E4Method.findMethod(int).
Note, that the definition of the E4Method is part of the implementation and not
of the interface.
E4TreeNode.setAction(A_Multiple),
E4TreeNode.setAction(E4Method)boolean isOpen()
isActive() state. Note, that there can be many or all nodes in
a tree having this isOpen() state, depending on the user's choice.
See also setOpen(boolean open)
setOpen(boolean),
getImage(boolean),
setImage(IMG,IMG)boolean isActive()
setActive(long node_id)
to do so. This has nothing to do with the isOpen() state.
setActive(long)boolean hasSubnodes()
isOpen(), a tree can have subnodes.
Subnodes are defined as objects from (implementing-)type E4TreeNode_Intf.
Note that the declaration of sub nodes is part of the implementation, not of the interface.
void setOpen(boolean open)
E4ModuleTreeHandling.
When the user clicks on a [+] or [-] symbol near by a node, the subnodes are displayed (opened)
or not displayed (not opened).
isOpen(),
setOpen(boolean,int)
void setOpen(boolean open,
int levels)
E4ModuleTreeHandling.
When the user clicks on a [+] or [-] symbol near by a node, the subnodes are displayed (opened)
or not displayed (not opened).
open - true sets the node open, false sets the node closedlevels - go throught sub levels, repeat levels - 1 recursive. A value of MAX_INTEGER means all.isOpen()void setActive(long node_id)
getId() value, then this one node is set to true (active).
By default, tree handling is associated within module E4ModuleTreeHandling.
node_id - the node-ID (see getId()) to be changed to activeisActive()E4TreeNode_Intf findSubnode(long nodeId)
nodeId - the node-ID (see getId()) to be searched for
E4TreeNode_Intf findSubnodeText(java.lang.String text)
text - the text of a tree node
E4TreeNode_Intf findSubnodeText(E4String text)
text - the text of a tree node
java.util.Enumeration getSubNodes()
addNode(e4s.html.tree.E4TreeNode_Intf)E4TreeNode_Intf[] getSubNodesArray()
getSubNodes()void addNode(E4TreeNode_Intf node)
node - the subnode to add (this can be an end node - leaf - or it can
recursive have subnodes either.getSubNodes(),
findSubnode(long),
removeAllNodes()boolean removeNode(long nodeId)
nodeId - the ID of the node
boolean removeNode(E4TreeNode_Intf node)
node - the node to be removed
removeNode(long)void removeAllNodes()
addNode(e4s.html.tree.E4TreeNode_Intf),
getSubNodes(),
findSubnode(long)
void collectScripts(E4ScriptsVec v,
E4ServletImplementation_Intf servlet)
v - the Vector where scripts are added.E4JavaScript
void collectStylesForEditing(E4StylesHash vec,
E4ServletImplementation_Intf servlet)
E4StyleUsage.
v - the Vector where the styles will be collected, may not be nullE4ServletImplementation_Intf.sessionCanEditStyles(),
#collectStylesForEditing( e4s.html.style.E4StylesHash, STYLE_Name, boolean)java.util.Enumeration getAdditionalElements()
java.lang.Object findAdditionalElement(java.lang.Class clazz)
E4Color getBgColor()
FONT getFONT()
CLASS_Name getSTYLE()
E4TreeNode.setSTYLE(e4s.html.style.CLASS_Name)
void collectTranslationsForEditing(E4TranslationsVec v,
E4ServletImplementation_Intf servlet)
void sort(Language language)
sort( e4s.application.Language, boolean)
void sort(Language language,
boolean ascending)
ascending - true = sort ascending, false = descendingsort( e4s.application.Language )int countNodes()
E4TreeNode_Intf copy()
|
www.element4solution.com | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||