pl.netanel.swt.matrix
Class Grouping.Node

java.lang.Object
  extended by pl.netanel.swt.matrix.Grouping.Node
Enclosing class:
Grouping

public static class Grouping.Node
extends java.lang.Object

Represent a node in the grouping hierarchy. Implements Builder pattern.


Field Summary
static int COLLAPSED
          the node is initially collapsed
protected  Color lineColor
           
static int PERMANENT
          Makes the node not collapse-able.
static int REMAIN
          Makes the node to stay visible when the parent is collapsed.
protected  int separatorLineWidth
           
static int SUMMARY
          The node is visible only when node is collapsed
 
Constructor Summary
Grouping.Node(java.lang.String caption, Grouping.Node... children)
           
Grouping.Node(java.lang.String caption, int options, Grouping.Node... children)
           
 
Method Summary
 java.lang.String getCaption()
          Returns caption of this node.
 java.util.List<Grouping.Node> getChildren()
          Return list of children of this node.
 Grouping.Node getParent()
          Returns parent of this node.
 boolean hasChildren()
          Return true if this node has children, or false otherwise.
 boolean isCollapsed()
          Returns true if this node is collapsed, or false otherwise.
 Grouping.Node separator(int lineWidth, Color lineColor)
          Defines the line at the end of the current node
 Grouping.Node setCollapsed(boolean newState)
          Sets the collapsed state of this node to the given value.
 Grouping.Node setCollapsedAll(boolean newState)
          Sets the collapsed state of this node and all related nodes on the lower level to the given value.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REMAIN

public static final int REMAIN
Makes the node to stay visible when the parent is collapsed.

See Also:
Constant Field Values

SUMMARY

public static final int SUMMARY
The node is visible only when node is collapsed

See Also:
Constant Field Values

PERMANENT

public static final int PERMANENT
Makes the node not collapse-able.

See Also:
Constant Field Values

COLLAPSED

public static final int COLLAPSED
the node is initially collapsed

See Also:
Constant Field Values

separatorLineWidth

protected int separatorLineWidth

lineColor

protected Color lineColor
Constructor Detail

Grouping.Node

public Grouping.Node(java.lang.String caption,
                     Grouping.Node... children)

Grouping.Node

public Grouping.Node(java.lang.String caption,
                     int options,
                     Grouping.Node... children)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hasChildren

public boolean hasChildren()
Return true if this node has children, or false otherwise.

Returns:
true if this node has children, or false otherwise

getChildren

public java.util.List<Grouping.Node> getChildren()
Return list of children of this node.

Returns:
list of children of this node

getParent

public Grouping.Node getParent()
Returns parent of this node.

Returns:
parent of this node

getCaption

public java.lang.String getCaption()
Returns caption of this node.

Returns:
caption of this node

setCollapsed

public Grouping.Node setCollapsed(boolean newState)
Sets the collapsed state of this node to the given value.

Parameters:
newState - state to set for collapsed property
Returns:
this node

setCollapsedAll

public Grouping.Node setCollapsedAll(boolean newState)
Sets the collapsed state of this node and all related nodes on the lower level to the given value.

Parameters:
newState - state to set for collapsed property
Returns:
this node

isCollapsed

public boolean isCollapsed()
Returns true if this node is collapsed, or false otherwise.

Returns:
true if this node is collapsed, or false otherwise

separator

public Grouping.Node separator(int lineWidth,
                               Color lineColor)
Defines the line at the end of the current node

Parameters:
lineWidth -
lineColor -
Returns:
this node


Copyright © 2011 netanel.pl. All Rights Reserved.