java.lang.Object
com.trapezium.chisel.GuiAdapter
com.trapezium.chisel.ChiselPane
com.trapezium.chisel.Table
- All Implemented Interfaces:
- com.trapezium.chisel.gui.DisplayConstants, java.awt.LayoutManager, ProcessedFileViewer
- Direct Known Subclasses:
- ChiselRow.ChiselOptionTable, ChiselTable
- public class Table
- extends ChiselPane
Generic table component
| Fields inherited from interface com.trapezium.chisel.gui.DisplayConstants |
BOTTOM_MARGIN, DEFAULT_ACTIVECOLOR, DEFAULT_BGCOLOR, DEFAULT_BORDERCOLOR, DEFAULT_CONTROLCOLOR, DEFAULT_DECAL, DEFAULT_FADEDTEXTCOLOR, DEFAULT_FRAMECOLOR, DEFAULT_GROOVECOLOR, DEFAULT_INACTIVECOLOR, DEFAULT_LITESHADOWCOLOR, DEFAULT_PANECOLOR, DEFAULT_POPUPCOLOR, DEFAULT_POPUPTEXTCOLOR, DEFAULT_PROGRESSBARCOLOR, DEFAULT_ROWHEADERCOLOR, DEFAULT_RULECOLOR, DEFAULT_SELECTEDCOLOR, DEFAULT_SELECTEDTEXTCOLOR, DEFAULT_SHADOWCOLOR, DEFAULT_STATUSBARCOLOR, DEFAULT_TABLECOLOR, DEFAULT_TEXTCOLOR, DEFAULT_TILE, DEFAULT_TILEX, DEFAULT_TILEY, DEFAULT_TITLETEXTCOLOR, DEFAULT_TOOLBARCOLOR, DEFAULT_TOOLTIPCOLOR, DEFAULT_TOPTABLECOLOR, DEFAULT_WORKSPACECOLOR, FRAMED_BORDER, HGAP, LEFT_MARGIN, LOWERED_BORDER, NO_BORDER, RAISED_BORDER, RIGHT_MARGIN, THICK_BORDER, THIN_BORDER, TOP_MARGIN, VGAP |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HEADER
public static final int HEADER
- See Also:
- Constant Field Values
header
TableRow header
rows
java.util.Vector rows
visibleCols
int visibleCols
visibleRows
int visibleRows
leftCol
int leftCol
topRow
int topRow
selectedRow
int selectedRow
collapsed
boolean collapsed
rowTracker
Table.RowTracker rowTracker
- this ContainerListener implementation tracks content change (i.e.
Components added or removed) which occurs in any row.
lineDim
java.awt.Dimension lineDim
- the width of vertical lines and height of horizontal lines between
columns and rows
cellInsets
private java.awt.Insets cellInsets
- remember the cell insets for when we have to create new rows
defaultCellInsets
static final java.awt.Insets defaultCellInsets
- the default insets in each cell
colWidth
private transient int colWidth
rowHeight
private transient int rowHeight
headerHeight
private transient int headerHeight
Table
public Table(int numcolumns,
int numrows)
Table
public Table(int numcolumns,
int numrows,
java.awt.Insets insets)
Table
public Table(int numcolumns,
int numrows,
java.awt.Insets insets,
java.lang.Object data)
createRow
public TableRow createRow(int row,
int columns,
java.awt.Insets insets,
java.lang.Object data)
createHeader
public TableRow createHeader(int columns,
java.awt.Insets insets,
java.lang.Object data)
isCollapsed
public boolean isCollapsed()
setCollapsed
public void setCollapsed(boolean collapsed)
isExpandible
public boolean isExpandible()
setExpandible
public void setExpandible(boolean expandible)
getNumberRows
public int getNumberRows()
setNumberRows
public void setNumberRows(int n,
java.lang.Object data)
getHeader
public TableRow getHeader()
getRow
public TableRow getRow(int row)
getSizeForDims
protected java.awt.Dimension getSizeForDims(int ncols,
int nrows)
getColumnWidth
protected int getColumnWidth()
getRowHeight
protected int getRowHeight(int row)
getEmWidth
public int getEmWidth(boolean header)
preferredLayoutSize
public java.awt.Dimension preferredLayoutSize(java.awt.Container target)
- Description copied from class:
GuiAdapter
- determine the preferred size
- Specified by:
preferredLayoutSize in interface java.awt.LayoutManager- Overrides:
preferredLayoutSize in class GuiAdapter
minimumLayoutSize
public java.awt.Dimension minimumLayoutSize(java.awt.Container target)
- Description copied from class:
GuiAdapter
- determine the minimum size
- Specified by:
minimumLayoutSize in interface java.awt.LayoutManager- Overrides:
minimumLayoutSize in class GuiAdapter
layoutContainer
public void layoutContainer(java.awt.Container target)
- Description copied from class:
GuiAdapter
- lay out the component. The default is similar to FlowLayout, but
always top left aligned and with no wrap around.
- Specified by:
layoutContainer in interface java.awt.LayoutManager- Overrides:
layoutContainer in class GuiAdapter
dump
public void dump()
- dump the current document to the console
- Specified by:
dump in interface ProcessedFileViewer- Overrides:
dump in class ChiselPane