Class FIXGRIDTreeItem
java.lang.Object
org.eclnt.jsfserver.elements.impl.FIXGRIDItem
org.eclnt.jsfserver.elements.impl.FIXGRIDTreeItem
- All Implemented Interfaces:
Serializable
,Comparable
,IFIXGRIDItem
- Direct Known Subclasses:
DynBeanTreeUI.TreeNode
,ServerFileBrowser.TreeNode
,StreamStoreTreeUI.TreeNode
,WorkplaceFunctionTree.FunctionNode
Base class for all items that are managed within a FIXGRIDTreeBinding
scenario. The FIXGRIDTreeItem internally provides the following functions:
(A) It may hold one ore more children.
(B) It has a certain status - this is the either open/closed for "folder nodes" or endnode for "leaf nodes"
(C) If has a certain level - this is the hierarchy level starting with "0" for top nodes.
(A) It may hold one ore more children.
(B) It has a certain status - this is the either open/closed for "folder nodes" or endnode for "leaf nodes"
(C) If has a certain level - this is the hierarchy level starting with "0" for top nodes.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
Fields inherited from class org.eclnt.jsfserver.elements.impl.FIXGRIDItem
ROWHEIGHT_DEFAULT
-
Constructor Summary
ConstructorDescriptionFIXGRIDTreeItem
(FIXGRIDTreeItem parentNode) Creates an item that is added as child to the parentNode item.FIXGRIDTreeItem
(FIXGRIDTreeItem parentNode, boolean asFirst) Creates an item that is added as child to the parentNode item. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addSubNode
(FIXGRIDTreeItem subNode, boolean asFirst) void
addSubNode
(FIXGRIDTreeItem subNode, int index) void
appendVisibleSubNodes
(List<FIXGRIDTreeItem> list, int counter, int maxCounter) boolean
checkIfNodeHasAsParent
(FIXGRIDTreeItem potentialParent) Checks if the node that is passed as paramter is a parent of this node.void
Recursively closes this node and all nodes below.void
Collapses this node.void
Collapses all sub nodes for this tree item.int
Compare operation for sorting.void
Expands this node.void
Expands all sub nodes for this tree item.getImage()
getLevel()
int
Hierarchy level the item has within the tree hierarchy.Internal use only.int
Status of node, one of the STATUS_* constants defined for this class.getText()
Text that is used when exporting the corresponding tree - e.g. to PDF.void
moveSubNodeBehind
(FIXGRIDTreeItem subNode, FIXGRIDTreeItem refSubNode) Change sequence of nodes within the parent node.void
moveSubNodeInFront
(FIXGRIDTreeItem subNode, FIXGRIDTreeItem refSubNode) Change sequence of nodes within the parent node.void
moveSubNodeOneDown
(FIXGRIDTreeItem subNode) SeemoveSubNodeOneUp(FIXGRIDTreeItem)
- this is just the opposite direction of moving...void
moveSubNodeOneUp
(FIXGRIDTreeItem subNode) Moves one child node up within its parent.void
moveSubNodesOneDown
(Set<FIXGRIDTreeItem> subNodes) Move a set of nodes within its parent.void
moveSubNodesOneUp
(Set<FIXGRIDTreeItem> subNodes) Move operation with a set of subNodes.void
moveSubNodeToFirst
(FIXGRIDTreeItem subNode) Moves on subNode within its parent to the first child position.void
moveSubNodeToLast
(FIXGRIDTreeItem subNode) Moves on subNode within its parent to the last child position.void
onToggle()
Event that is passed from the client when the user open/close a folder node.void
Opens all nodes that are parent nodes of this node.void
processTREENDOEAction
(javax.faces.event.ActionEvent event) This is the central method that is called by default by client side TREENODE events.void
Removes all children of a certain node - without drill down.void
removeAllChildNodes
(boolean withDrillDown) void
void
Request the focus for the current tree node.void
Sets the image that is rendered for the node.void
setLevel
(int value) Internal use only.void
setStatus
(int value) Sets the status of the current node.void
Sets the text of the node.void
protected void
toggleNodeAndScroll
(javax.faces.event.ActionEvent event) Methods inherited from class org.eclnt.jsfserver.elements.impl.FIXGRIDItem
assignRowComponent, checkIfCellIsHighlighted, checkIfCellsAreHighlighted, getChangeIndex, getHighlightedCells, getOriginalIndex, getRequestFocus, getRowHeight, getSelected, highlightCell, onRowDeselect, onRowDrop, onRowExecute, onRowPopupMenuItem, onRowPopupMenuLoad, onRowSelect, setOriginalIndex, setRowHeight, setSelected, unhighlightAllCells, unhighlightCell, unrequestFocus, updateSelectedInternally
-
Field Details
-
STATUS_OPENED
public static final int STATUS_OPENED- See Also:
-
STATUS_CLOSED
public static final int STATUS_CLOSED- See Also:
-
STATUS_ENDNODE
public static final int STATUS_ENDNODE- See Also:
-
-
Constructor Details
-
FIXGRIDTreeItem
Creates an item that is added as child to the parentNode item. -
FIXGRIDTreeItem
Creates an item that is added as child to the parentNode item. Dependent on "asFirst" the new node is added either as last child ot as first child into the parent node.
-
-
Method Details
-
setLevel
public void setLevel(int value) Internal use only. -
getLevelInt
public int getLevelInt()Hierarchy level the item has within the tree hierarchy. Highest level of root node is -1, so that top level of contained nodes is level 0. -
getLevel
-
setText
Sets the text of the node. -
getText
-
getTextForExport
Text that is used when exporting the corresponding tree - e.g. to PDF. In this text the level of the tree node is reflected by prepenging a corresponding number of non-breakable spaces. -
setImage
Sets the image that is rendered for the node. Setting the image is optional. -
getImage
-
setStatus
public void setStatus(int value) Sets the status of the current node. The status either isSTATUS_CLOSED
,STATUS_OPENED
orSTATUS_ENDNODE
. -
getStatusInt
public int getStatusInt()Status of node, one of the STATUS_* constants defined for this class. Use the status to open/close folders from your logic. -
getStatus
-
getRequestfocus
Internal use only. -
requestFocus
public void requestFocus()Request the focus for the current tree node.- Specified by:
requestFocus
in interfaceIFIXGRIDItem
- Overrides:
requestFocus
in classFIXGRIDItem
-
getParentNode
-
getChildNodes
-
getAllContainedNodes
- Returns:
- All the nodes that are children of this node - with drilling down recursively - # and the node itself.
-
appendVisibleSubNodes
-
processTREENDOEAction
public void processTREENDOEAction(javax.faces.event.ActionEvent event) This is the central method that is called by default by client side TREENODE events. It automatically handles the event "toggle". In case of enhancing a TREENODE (e.g. adding drag & drop onto TREENODE level) you need to override this method and add the behavior for the specific event. In any case you need to call this super-implementation within your implementation! -
removeAllChildNodes
public void removeAllChildNodes()Removes all children of a certain node - without drill down.
Please pay attention: the selection of grid items is automatically affected with the removal of items - you have to explicitly call it (e.g. by callindFIXGRIDBinding.deselectCurrentSelection()
. -
removeAllChildNodes
public void removeAllChildNodes(boolean withDrillDown) - Parameters:
withDrillDown
- If true then the removing is also done for all children which are contained below the node. Otherwise, if false, then only the children below the node are removed - the removing is not drilled down to all child node levels.
Please pay attention: the selection of grid items is automatically affected with the removal of items - you have to explicitly call it (e.g. by callindFIXGRIDBinding.deselectCurrentSelection()
.
-
removeNode
public void removeNode() -
addSubNode
-
addSubNode
-
closeAllNodes
public void closeAllNodes()Recursively closes this node and all nodes below. -
openAllParentNodes
public void openAllParentNodes()Opens all nodes that are parent nodes of this node. This function is required if you want to ensure that one node is visible. The node can only be visible if all parent nodes have the statusSTATUS_OPENED
. -
moveSubNodeToFirst
Moves on subNode within its parent to the first child position. -
moveSubNodeToLast
Moves on subNode within its parent to the last child position. -
moveSubNodeOneUp
Moves one child node up within its parent. This means that if the parent node holds the children N1,N2,N3,N4 then after calling N3.moveSubNodeOneUp() the child sequence will be N1,N3,N2,N4. -
moveSubNodesOneUp
Move operation with a set of subNodes. SeemoveSubNodeOneUp(FIXGRIDTreeItem)
for more information. -
moveSubNodeOneDown
SeemoveSubNodeOneUp(FIXGRIDTreeItem)
- this is just the opposite direction of moving... -
moveSubNodesOneDown
Move a set of nodes within its parent. -
moveSubNodeInFront
Change sequence of nodes within the parent node. -
moveSubNodeBehind
Change sequence of nodes within the parent node. -
checkIfNodeHasAsParent
Checks if the node that is passed as paramter is a parent of this node. -
expandNodeAndSubNodes
public void expandNodeAndSubNodes()Expands all sub nodes for this tree item. This method simulates the normal toggle processing, i.e. corresponding calls "onToggle" are made to the application. It exactly simulated the user opening one tree item after the other, recursively. -
expandNode
public void expandNode()Expands this node. The normal onToggle() method will be called as result. -
collapseNode
public void collapseNode()Collapses this node. The normal onToggle() method will be called as result. -
collapseNodeAndSubNodes
public void collapseNodeAndSubNodes()Collapses all sub nodes for this tree item. Counterpart of theexpandNodeAndSubNodes()
method. -
onToggle
public void onToggle()Event that is passed from the client when the user open/close a folder node. You may read sub-items into the tree as reaction. OVerride this method in your implementation. -
compareTo
Compare operation for sorting.- Specified by:
compareTo
in interfaceComparable
-
getLineDrawing
-
toggleNodeAndScroll
protected void toggleNodeAndScroll(javax.faces.event.ActionEvent event) -
toggleNode
public void toggleNode()
-