|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.tree.DefaultMutableTreeNode
org.jgraph.graph.DefaultGraphCell
tico.board.components.TComponent
tico.board.components.TGrid
public class TGrid
Defines a TGrid
, its attributes and its children grid cells.
Field Summary | |
---|---|
static int |
COLUMNS
Columns grid order value. |
static int |
CUSTOM
Custom grid order value. |
static double |
DEFAULT_HORIZONTAL_GAP
Default horizontal distance between cells |
static double |
DEFAULT_VERTICAL_GAP
Default vertical distance between cells |
static int |
ROWS
Rows grid order value. |
static int |
SEQUENTIAL
Sequential grid order value. |
static java.lang.String |
TYPE
The TGrid type used as attribute in XML encoding and decoding. |
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
---|
EMPTY_ENUMERATION |
Constructor Summary | |
---|---|
TGrid(TGridCell[] childs)
Creates a new TGrid with the specified childs . |
Method Summary | |
---|---|
TGridCell |
getCell(int row,
int column)
Returns the gridCell in the specified position. |
int |
getColumnDimension(int column)
Returns the number of gridCells in the specified column . |
int |
getColumnsCount()
Gets the positions all its grid cells and gets the maximum column value. |
TGridCell |
getFollowingColumnCell(int column,
int position)
Returns the following gridCell of the specified
position in the specified column . |
TGridCell |
getFollowingRowCell(int row,
int position)
Returns the following gridCell of the specified
position in the specified row . |
int |
getLastColumnRow(int row)
Returns the last column in the specified row . |
int |
getLastRowColumn(int column)
Returns the last row in the specified column . |
int |
getRowDimension(int row)
Returns the number of gridCells in the specified row . |
int |
getRowsCount()
Gets the positions all its grid cells and gets the maximum row value. |
java.lang.String |
newId()
Generates a new id for this component. |
java.util.Map |
reorderColumns()
Returns a map with the pairs gridCell -
attributeMap to be aplied that must be used when you want
to change the order of the grid to COLUMNS. |
java.util.Map |
reorderRows()
Returns a map with the pairs gridCell -
attributeMap to be aplied that must be used when you want
to change the order of the grid to ROWS. |
static TGrid |
XMLDecode(org.w3c.dom.Element element)
Returns a TGrid object from the data contained in
the XML Element . |
org.w3c.dom.Node |
XMLEncode(org.w3c.dom.Document doc)
Generates an XML Element that contains the component information. |
Methods inherited from class tico.board.components.TComponent |
---|
getId, toString, XMLDecodeType |
Methods inherited from class org.jgraph.graph.DefaultGraphCell |
---|
changeAttributes, clone, getAttributes, getChildren, setAttributes |
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode |
---|
add, breadthFirstEnumeration, children, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static java.lang.String TYPE
TGrid
type used as attribute in XML encoding and decoding.
public static final int SEQUENTIAL
public static final int ROWS
public static final int COLUMNS
public static final int CUSTOM
public static final double DEFAULT_HORIZONTAL_GAP
public static final double DEFAULT_VERTICAL_GAP
Constructor Detail |
---|
public TGrid(TGridCell[] childs)
TGrid
with the specified childs
.
childs
- The specified childs
Method Detail |
---|
public java.lang.String newId()
TComponent
newId
in class TComponent
public TGridCell getCell(int row, int column)
gridCell
in the specified position.
row
- The specified row
column
- The specified column
TGridCell
in the specified row
and
column
public int getColumnsCount()
public int getRowsCount()
public int getLastColumnRow(int row)
column
in the specified row
.
row
- The specified row
column
in the specified row
public int getLastRowColumn(int column)
row
in the specified column
.
column
- The specified column
row
in the specified column
public int getColumnDimension(int column)
column
.
column
- The specified column
column
public int getRowDimension(int row)
row
.
row
- The specified row
row
public TGridCell getFollowingRowCell(int row, int position)
gridCell
of the specified
position
in the specified row
.
row
- The specified row
position
- The specified position
gridCell
of the specified
position
in the specified row
public TGridCell getFollowingColumnCell(int column, int position)
gridCell
of the specified
position
in the specified column
.
column
- The specified column
position
- The specified position
gridCell
of the specified
position
in the specified column
public java.util.Map reorderRows()
map
with the pairs gridCell
-
attributeMap
to be aplied that must be used when you want
to change the order of the grid
to ROWS.
map
to apply when the grid
order
changed to ROWSpublic java.util.Map reorderColumns()
map
with the pairs gridCell
-
attributeMap
to be aplied that must be used when you want
to change the order of the grid
to COLUMNS.
map
to apply when the grid
order
changed to COLUMNSpublic org.w3c.dom.Node XMLEncode(org.w3c.dom.Document doc)
TComponent
Element
that contains the component information.
XMLEncode
in class TComponent
doc
- The Document
represents that represents the
entire XML document
Element
generatedpublic static TGrid XMLDecode(org.w3c.dom.Element element) throws InvalidFormatException
TGrid
object from the data contained in
the XML Element
.
element
- The XML Element
that contains the grid data
TGrid
InvalidFormatException
- If Element
has an invalid format
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |