public class Grouping
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
Grouping.CellPainter |
static class |
Grouping.Node
Represent a node in the grouping hierarchy.
|
static class |
Grouping.NodeVisitor
Traverses the given node or array of nodes and all the related nodes at the lower levels.
|
Constructor and Description |
---|
Grouping(Zone<java.lang.Integer,java.lang.Integer> zone,
int axisDirection,
Grouping.Node root)
Creates groups in the given zone that are spanning in the giving direction
according to the given node hierarchy.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Disposes the grouping.
|
Matrix<java.lang.Integer,java.lang.Integer> |
getMatrix()
Returns the matrix the grouping is created for.
|
Grouping.Node |
getNodeByCellIndex(int indexX,
int indexY)
Returns the grouping node in the given cell.
|
Grouping.Node |
getNodeByTreeIndex(int... index) |
Grouping.Node |
getRoot()
Return the root of the grouping hierarchy.
|
java.lang.String |
getText(java.lang.Integer indexX,
java.lang.Integer indexY)
Returns the text of the cell at the given indexes.
|
void |
layout()
Merges cells in the zone according to the grouping hierarchy.
|
void |
setToggleImages(org.eclipse.swt.graphics.Image collapseImage,
org.eclipse.swt.graphics.Image expandImage) |
public Grouping(Zone<java.lang.Integer,java.lang.Integer> zone, int axisDirection, Grouping.Node root)
Sets the count of items in the zone sections automatically.
zone
- zone at which grouping should happenaxisDirection
- direction of grouping: SWT.HORIZONTAL or SWT.VERTICALroot
- root Node of the grouping hierarchypublic void dispose()
public java.lang.String getText(java.lang.Integer indexX, java.lang.Integer indexY)
indexX
- cell index on the horizontal axisindexY
- cell index on the vertical axispublic void layout()
public Grouping.Node getRoot()
public Matrix<java.lang.Integer,java.lang.Integer> getMatrix()
public Grouping.Node getNodeByCellIndex(int indexX, int indexY)
indexX
- cell index on the horizontal axisindexY
- cell index on the vertical axispublic Grouping.Node getNodeByTreeIndex(int... index)
public void setToggleImages(org.eclipse.swt.graphics.Image collapseImage, org.eclipse.swt.graphics.Image expandImage)
Copyright © 2011 netanel.pl. All Rights Reserved.