public class GralTable.NodeTableLine
extends <any>
GralTable.TableLineData
which presents a line as a node in a tree.
Therefore it implements the TreeNodeBase
interface. A line as parent node can be presented folded (default)
or unfolded in several levels to present a tree instead a simple table.
GralTable.rootLine
is a pure instance of this class The root line is never visible. It is the root.
All other lines are instances of GralTable.TableLineData
derived from this class.Modifier and Type | Field and Description |
---|---|
(package private) boolean |
tbl_lineCanHaveChildren
True if it is known that the node has children.
|
(package private) boolean |
tbl_showChildren
True if the children are shown in representation.
|
(package private) int |
tbl_treeDepth
The deepness in the tree presentation of the data.
|
(package private) int |
tbl_zLineUnfolded
Number of lines for this line and all visible children.
|
Constructor and Description |
---|
NodeTableLine(java.lang.String key,
UserData data) |
Modifier and Type | Method and Description |
---|---|
GralTable.TableLineData |
addChildLine(java.lang.String lineKey,
java.lang.String[] lineTexts,
UserData userDataP)
Inserts a line as child of this.
|
GralTable.TableLineData |
addNextLine(java.lang.String lineKey,
java.lang.String[] lineTexts,
UserData userDataP)
Inserts a line behind the current line.
|
GralTable.TableLineData |
addPrevLine(java.lang.String lineKey,
java.lang.String[] lineTexts,
UserData userDataP)
Inserts a line before the current line.
|
(package private) void |
adjCountChildrenInParent(int nCorr) |
(package private) void |
clear() |
(package private) void |
countChildren(boolean bLeftGrandChildrenOpen,
int nrParent) |
(package private) void |
countChildren(boolean bLeftGrandChildrenOpen,
int nrParent,
int recurs)
Counts the children and checks whether their childs should be shown.
|
void |
deleteLine() |
int tbl_zLineUnfolded
int tbl_treeDepth
boolean tbl_lineCanHaveChildren
#childLines
are null.boolean tbl_showChildren
NodeTableLine(java.lang.String key, UserData data)
void clear()
public GralTable.TableLineData addChildLine(java.lang.String lineKey, java.lang.String[] lineTexts, UserData userDataP)
addPrevLine(String, String[], Object)
or addNextLine(String, String[], Object)
in respect to a given child line too.lineKey
- The key for the linelineTexts
- maybe null, elsewhere texts for the cells (column texts) of the line.userDataP
- public GralTable.TableLineData addPrevLine(java.lang.String lineKey, java.lang.String[] lineTexts, UserData userDataP)
lineKey
- The key for the linelineTexts
- maybe null, elsewhere texts for the cells (column texts) of the line.userDataP
- public GralTable.TableLineData addNextLine(java.lang.String lineKey, java.lang.String[] lineTexts, UserData userDataP)
lineKey
- The key for the linelineTexts
- maybe null, elsewhere texts for the cells (column texts) of the line.userDataP
- public void deleteLine()
void countChildren(boolean bLeftGrandChildrenOpen, int nrParent)
void countChildren(boolean bLeftGrandChildrenOpen, int nrParent, int recurs)
tbl_showChildren
lineParent
- bLeftGrandChildrenOpen
- false then set tbl_showChildren
= false, true: count the grand children.recurs
- more than 100 - prevent it.void adjCountChildrenInParent(int nCorr)