JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.higrid
Class FormatNode

java.lang.Object
  |
  +--javax.swing.tree.DefaultMutableTreeNode
        |
        +--com.klg.jclass.datasource.DataSourceTreeNode
              |
              +--com.klg.jclass.higrid.FormatNode
All Implemented Interfaces:
Cloneable, MutableTreeNode, Serializable, TreeNode

public class FormatNode
extends DataSourceTreeNode

The FormatNode class aggregates all of the information necessary to render a given table. It contains RowFormat objects for each of the five basic RowFormat subclasses: Record, Header, Footer, BeforeDetails, AfterDetails. FormatNodes are stored in a tree structure called the FormatTree The FormatTree serves as a design-time template for the run-time rendering of an instance of HiGrid.

See Also:
Serialized Form

Field Summary
static int AFTER_DETAILS_FORMAT
          Specifies a AfterDetailsFormat
static int ANY_FORMAT
          Specifies any RowFormat
static int AUTO_TRAVERSE_CALLBACK
          Rely on callback to specify if this row has children
static int AUTO_TRAVERSE_DETECT_CHILDREN
          Expand and collapse any of this row's children
static int AUTO_TRAVERSE_EXPAND
          Always expand any of this row's children
static int AUTO_TRAVERSE_NONE
          Never expand any of this row's children
static int BEFORE_DETAILS_FORMAT
          Specifies a BeforeDetailsFormat
static int FIRST_FORMAT
          Specifies the first RowFormat
static int FOOTER_FORMAT
          Specifies a FooterFormat
static int HEADER_FORMAT
          Specifies a HeaderFormat
static int LAST_FORMAT
          Specifies the last RowFormat
static int RECORD_FORMAT
          Specifies a RecordFormat
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
FormatNode()
           
FormatNode(int indent)
           
 
Method Summary
protected  void addNumberOfScrollableRows(int rows)
          Adds to the total number of scrollable rows for this FormatNode.
 com.klg.jclass.higrid.AfterDetailsFormat getAfterDetailsFormat()
          Retrieves the after details format for this object.
 int getAutoTraverse()
          Retrieves whether to automatically traverse this level during runtime table creation.
 com.klg.jclass.higrid.BeforeDetailsFormat getBeforeDetailsFormat()
          Retrieves the before details format for this object.
 com.klg.jclass.higrid.SortData getDefaultSortData()
          Retrieves the default sort data.
 com.klg.jclass.higrid.FooterFormat getFooterFormat()
          Retrieves the footer format for this object.
 com.klg.jclass.higrid.HeaderFormat getHeaderFormat()
          Retrieves the header format for this object.
 int getIndent()
          Retrieves the indent level.
 String getName()
          Retrieves the name for this format node.
protected  int getNumberOfScrollableRows()
          Retrieves the total number of scrollable rows for this FormatNode.
 com.klg.jclass.higrid.RecordFormat getRecordFormat()
          Retrieves the record format for this object.
 com.klg.jclass.higrid.RowFormat getRowFormat(int index)
          Retrieves the indexed row format for this object.
protected  int getTotalWidth(com.klg.jclass.higrid.HiGrid grid)
          Retrieves the total width of this level.
protected  String makeLevelName(int level)
          Create a level name given a level value.
protected  void resetRuntimeInfo()
          Reset the runtime info for this format node.
 void setAfterDetailsFormat(com.klg.jclass.higrid.AfterDetailsFormat format)
          Sets the after details format for this object.
 void setAutoTraverse(int traverse)
          Sets whether to automatically traverse this level during runtime table creation.
 void setBeforeDetailsFormat(com.klg.jclass.higrid.BeforeDetailsFormat format)
          Sets the before details format for this object.
 void setDefaultSortData(com.klg.jclass.higrid.SortData sortData)
          Sets the default sort data.
 void setFooterFormat(com.klg.jclass.higrid.FooterFormat format)
          Sets the footer format for this object.
 void setHeaderFormat(com.klg.jclass.higrid.HeaderFormat format)
          Sets the header format for this object.
 void setIndent(int indent)
          Sets the indent level.
protected  void setNumberOfScrollableRows(int rows)
          Sets the total number of scrollable rows for this FormatNode.
 void setRecordFormat(com.klg.jclass.higrid.RecordFormat format)
          Sets the record format for this object.
 void setRowFormat(com.klg.jclass.higrid.RowFormat format, int index)
          Sets the indexed row format for this object.
protected  void subtractNumberOfScrollableRows(int rows)
          Subtracts from the total number of scrollable rows for this FormatNode.
 
Methods inherited from class com.klg.jclass.datasource.DataSourceTreeNode
getChildren, getFirstChild, getIterator, getIterator, getIterator, getIterator, getLastChild, getNextChild, getPreviousChild, hasChildren, insert, isChildOf, toString
 
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstLeaf, getIndex, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, 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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ANY_FORMAT

public static final int ANY_FORMAT
Specifies any RowFormat

See Also:
Constant Field Values

RECORD_FORMAT

public static final int RECORD_FORMAT
Specifies a RecordFormat

See Also:
Constant Field Values

HEADER_FORMAT

public static final int HEADER_FORMAT
Specifies a HeaderFormat

See Also:
Constant Field Values

FOOTER_FORMAT

public static final int FOOTER_FORMAT
Specifies a FooterFormat

See Also:
Constant Field Values

BEFORE_DETAILS_FORMAT

public static final int BEFORE_DETAILS_FORMAT
Specifies a BeforeDetailsFormat

See Also:
Constant Field Values

AFTER_DETAILS_FORMAT

public static final int AFTER_DETAILS_FORMAT
Specifies a AfterDetailsFormat

See Also:
Constant Field Values

FIRST_FORMAT

public static final int FIRST_FORMAT
Specifies the first RowFormat

See Also:
Constant Field Values

LAST_FORMAT

public static final int LAST_FORMAT
Specifies the last RowFormat

See Also:
Constant Field Values

AUTO_TRAVERSE_NONE

public static final int AUTO_TRAVERSE_NONE
Never expand any of this row's children

See Also:
Constant Field Values

AUTO_TRAVERSE_EXPAND

public static final int AUTO_TRAVERSE_EXPAND
Always expand any of this row's children

See Also:
Constant Field Values

AUTO_TRAVERSE_DETECT_CHILDREN

public static final int AUTO_TRAVERSE_DETECT_CHILDREN
Expand and collapse any of this row's children

See Also:
Constant Field Values

AUTO_TRAVERSE_CALLBACK

public static final int AUTO_TRAVERSE_CALLBACK
Rely on callback to specify if this row has children

See Also:
Constant Field Values
Constructor Detail

FormatNode

public FormatNode()

FormatNode

public FormatNode(int indent)
Method Detail

getRowFormat

public com.klg.jclass.higrid.RowFormat getRowFormat(int index)
Retrieves the indexed row format for this object.

Parameters:
index - the enumerated row format
Returns:
The indexed row format.

setRowFormat

public void setRowFormat(com.klg.jclass.higrid.RowFormat format,
                         int index)
Sets the indexed row format for this object.

Parameters:
format - The new row format.
index - the enumerated row format

getRecordFormat

public com.klg.jclass.higrid.RecordFormat getRecordFormat()
Retrieves the record format for this object.

Returns:
The current record format.

setRecordFormat

public void setRecordFormat(com.klg.jclass.higrid.RecordFormat format)
Sets the record format for this object.

Parameters:
format - The new record format.

getHeaderFormat

public com.klg.jclass.higrid.HeaderFormat getHeaderFormat()
Retrieves the header format for this object.

Returns:
The current header format.

setHeaderFormat

public void setHeaderFormat(com.klg.jclass.higrid.HeaderFormat format)
Sets the header format for this object.

Parameters:
format - The new header format.

getFooterFormat

public com.klg.jclass.higrid.FooterFormat getFooterFormat()
Retrieves the footer format for this object.

Returns:
The current footer format.

setFooterFormat

public void setFooterFormat(com.klg.jclass.higrid.FooterFormat format)
Sets the footer format for this object.

Parameters:
format - The new footer format.

getBeforeDetailsFormat

public com.klg.jclass.higrid.BeforeDetailsFormat getBeforeDetailsFormat()
Retrieves the before details format for this object.

Returns:
The current before details format.

setBeforeDetailsFormat

public void setBeforeDetailsFormat(com.klg.jclass.higrid.BeforeDetailsFormat format)
Sets the before details format for this object.

Parameters:
format - The new before details format.

getAfterDetailsFormat

public com.klg.jclass.higrid.AfterDetailsFormat getAfterDetailsFormat()
Retrieves the after details format for this object.

Returns:
The current after details format.

setAfterDetailsFormat

public void setAfterDetailsFormat(com.klg.jclass.higrid.AfterDetailsFormat format)
Sets the after details format for this object.

Parameters:
format - The new after details format.

getName

public String getName()
Retrieves the name for this format node.

Returns:
The current name.

makeLevelName

protected String makeLevelName(int level)
Create a level name given a level value.

Parameters:
level - An arbitrary level value.
Returns:
The level name.

getAutoTraverse

public int getAutoTraverse()
Retrieves whether to automatically traverse this level during runtime table creation.

Returns:
Whether level is automatically traversed during runtime table creation.

setAutoTraverse

public void setAutoTraverse(int traverse)
Sets whether to automatically traverse this level during runtime table creation.

Parameters:
traverse - Whether level is automatically traversed during runtime table creation.

getIndent

public int getIndent()
Retrieves the indent level.

Returns:
The indent level.

setIndent

public void setIndent(int indent)
Sets the indent level.

Parameters:
indent - The indent level.

getDefaultSortData

public com.klg.jclass.higrid.SortData getDefaultSortData()
Retrieves the default sort data.

Returns:
The default sort data.

setDefaultSortData

public void setDefaultSortData(com.klg.jclass.higrid.SortData sortData)
Sets the default sort data.


getNumberOfScrollableRows

protected int getNumberOfScrollableRows()
Retrieves the total number of scrollable rows for this FormatNode.

Returns:
The total number of scrollable rows for this FormatNode.

setNumberOfScrollableRows

protected void setNumberOfScrollableRows(int rows)
Sets the total number of scrollable rows for this FormatNode.

Parameters:
rows - The total number of scrollable rows for this FormatNode.

addNumberOfScrollableRows

protected void addNumberOfScrollableRows(int rows)
Adds to the total number of scrollable rows for this FormatNode.

Parameters:
rows - The number of scrollable rows to for this FormatNode.

subtractNumberOfScrollableRows

protected void subtractNumberOfScrollableRows(int rows)
Subtracts from the total number of scrollable rows for this FormatNode.

Parameters:
rows - The number of scrollable rows to subtract for this FormatNode.

resetRuntimeInfo

protected void resetRuntimeInfo()
Reset the runtime info for this format node.


getTotalWidth

protected int getTotalWidth(com.klg.jclass.higrid.HiGrid grid)
Retrieves the total width of this level.

Returns:
The total width of this level.

Copyright © 2004 Quest Software Inc..
All rights reserved.