JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.table
Class TableLayout

java.lang.Object
  |
  +--com.klg.jclass.table.TableLayout
All Implemented Interfaces:
Serializable

public class TableLayout
extends Object
implements Serializable

TableLayout controls the placement of CellAreas and scrollbars in table based on their need and positionning policy.

See Also:
Serialized Form

Field Summary
protected  com.klg.jclass.table.CellAreaHandler cah
           
protected  boolean needs_layout
           
protected  com.klg.jclass.table.JCTable table
           
 
Constructor Summary
TableLayout(com.klg.jclass.table.CellAreaHandler cah)
          Constructor that requires a CellAreaHandler object.
 
Method Summary
protected  int getAreaSpace(com.klg.jclass.table.CellArea area, int type, int initialOffset, boolean pref)
          The the space used for a given cell area type.
 Dimension getMinimumSize()
          Returns the minimum size of table based on the number of rows and columns and scrollbar policy.
 Dimension getPreferredSize()
          Returns the preferred size of table based on the number of rows and columns and scrollbar policy.
 void layoutAreas()
          Lays out the areas of table and sets the scrollbar visibility and placement.
 void layoutAreas(int container_width, int container_height)
          Lays out the areas of table and sets the scrollbar visibility and placement based on a given width and height of the container.
protected  void setLayoutOffset(com.klg.jclass.table.CellArea area)
          Sets the offset from standard position (LABEL, FROZEN, CELL) based on the visibility and position of labels and frozen cells.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

table

protected com.klg.jclass.table.JCTable table

cah

protected com.klg.jclass.table.CellAreaHandler cah

needs_layout

protected boolean needs_layout
Constructor Detail

TableLayout

public TableLayout(com.klg.jclass.table.CellAreaHandler cah)
Constructor that requires a CellAreaHandler object.

Parameters:
cah - The cell area handler
Method Detail

layoutAreas

public void layoutAreas()
Lays out the areas of table and sets the scrollbar visibility and placement.


layoutAreas

public void layoutAreas(int container_width,
                        int container_height)
Lays out the areas of table and sets the scrollbar visibility and placement based on a given width and height of the container.

Parameters:
container_width - The width of the container
container_height - The height of the container

getAreaSpace

protected int getAreaSpace(com.klg.jclass.table.CellArea area,
                           int type,
                           int initialOffset,
                           boolean pref)
The the space used for a given cell area type. This is used to calculate positioning for other cell areas.

Parameters:
area - The cell area for which the offset is required.
type - The type of area. We can't just get this from the cell area because it might be null.
initialOffset - An initial value to be added to the offset.
pref - If true, use the preferred size, otherwise use the minimum size.
Returns:
The offset of the CellArea.

setLayoutOffset

protected void setLayoutOffset(com.klg.jclass.table.CellArea area)
Sets the offset from standard position (LABEL, FROZEN, CELL) based on the visibility and position of labels and frozen cells.


getMinimumSize

public Dimension getMinimumSize()
Returns the minimum size of table based on the number of rows and columns and scrollbar policy.


getPreferredSize

public Dimension getPreferredSize()
Returns the preferred size of table based on the number of rows and columns and scrollbar policy. Table will return the maximum possible size.


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