tico.board.components
Class TGridCell

java.lang.Object
  extended by javax.swing.tree.DefaultMutableTreeNode
      extended by org.jgraph.graph.DefaultGraphCell
          extended by tico.board.components.TComponent
              extended by tico.board.components.TGridCell
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, javax.swing.tree.MutableTreeNode, javax.swing.tree.TreeNode, org.jgraph.graph.GraphCell

public class TGridCell
extends TComponent

Defines a TGridCell and its attributes. A TGridCell is allways part of a TGrid.

Version:
1.1 May 09, 2009
Author:
Pablo Muñoz
See Also:
Serialized Form

Field Summary
static java.lang.String TYPE
          The TGridCell type used as attribute in XML encoding and decoding.
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
EMPTY_ENUMERATION
 
Constructor Summary
TGridCell()
          Creates a new TGridCell.
TGridCell(int row, int column)
          Creates a new TGridCell with the specified initial row and column attributes.
 
Method Summary
 TGrid getGrid()
          Returns the grid cell parent grid.
 java.lang.String getId()
          Returns the component id.
 java.lang.String newId()
          Generates a new id for this component.
static TGridCell XMLDecode(org.w3c.dom.Element element)
          Returns a TGridCell 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
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

TYPE

public static java.lang.String TYPE
The TGridCell type used as attribute in XML encoding and decoding.

Constructor Detail

TGridCell

public TGridCell()
Creates a new TGridCell.


TGridCell

public TGridCell(int row,
                 int column)
Creates a new TGridCell with the specified initial row and column attributes.

Parameters:
row - The specified initial row
column - The specified initial column
Method Detail

newId

public java.lang.String newId()
Description copied from class: TComponent
Generates a new id for this component.

Specified by:
newId in class TComponent
Returns:
Returns the new id.

getId

public java.lang.String getId()
Description copied from class: TComponent
Returns the component id.

Overrides:
getId in class TComponent
Returns:
The component id

getGrid

public TGrid getGrid()
Returns the grid cell parent grid.

Returns:
The grid cell parent grid

XMLEncode

public org.w3c.dom.Node XMLEncode(org.w3c.dom.Document doc)
Description copied from class: TComponent
Generates an XML Element that contains the component information.

Specified by:
XMLEncode in class TComponent
Parameters:
doc - The Document represents that represents the entire XML document
Returns:
The XML Element generated

XMLDecode

public static TGridCell XMLDecode(org.w3c.dom.Element element)
                           throws InvalidFormatException
Returns a TGridCell object from the data contained in the XML Element.

Parameters:
element - The XML Element that contains the cell data
Returns:
The generated TGridCell
Throws:
InvalidFormatException - If Element has an invalid format