Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.trapezium.chisel
Class Table  view Table download Table.java

java.lang.Object
  extended bycom.trapezium.chisel.GuiAdapter
      extended bycom.trapezium.chisel.ChiselPane
          extended bycom.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


Nested Class Summary
(package private)  class Table.RowTracker
           
 
Field Summary
private  java.awt.Insets cellInsets
          remember the cell insets for when we have to create new rows
(package private)  boolean collapsed
           
private  int colWidth
           
(package private) static java.awt.Insets defaultCellInsets
          the default insets in each cell
(package private)  TableRow header
           
static int HEADER
           
private  int headerHeight
           
(package private)  int leftCol
           
(package private)  java.awt.Dimension lineDim
          the width of vertical lines and height of horizontal lines between columns and rows
private  int rowHeight
           
(package private)  java.util.Vector rows
           
(package private)  Table.RowTracker rowTracker
          this ContainerListener implementation tracks content change (i.e.
(package private)  int selectedRow
           
(package private)  int topRow
           
(package private)  int visibleCols
           
(package private)  int visibleRows
           
 
Fields inherited from class com.trapezium.chisel.GuiAdapter
stretchLast
 
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
 
Constructor Summary
Table(int numcolumns, int numrows)
           
Table(int numcolumns, int numrows, java.awt.Insets insets)
           
Table(int numcolumns, int numrows, java.awt.Insets insets, java.lang.Object data)
           
 
Method Summary
 TableRow createHeader(int columns, java.awt.Insets insets, java.lang.Object data)
           
 TableRow createRow(int row, int columns, java.awt.Insets insets, java.lang.Object data)
           
 void dump()
          dump the current document to the console
protected  int getColumnWidth()
           
 int getEmWidth(boolean header)
           
 TableRow getHeader()
           
 int getNumberRows()
           
 TableRow getRow(int row)
           
protected  int getRowHeight(int row)
           
protected  java.awt.Dimension getSizeForDims(int ncols, int nrows)
           
 boolean isCollapsed()
           
 boolean isExpandible()
           
 void layoutContainer(java.awt.Container target)
          lay out the component.
 java.awt.Dimension minimumLayoutSize(java.awt.Container target)
          determine the minimum size
 java.awt.Dimension preferredLayoutSize(java.awt.Container target)
          determine the preferred size
 void setCollapsed(boolean collapsed)
           
 void setExpandible(boolean expandible)
           
 void setNumberRows(int n, java.lang.Object data)
           
 
Methods inherited from class com.trapezium.chisel.ChiselPane
empty, fileDone, fileUpdated, getProcessedFile, save, setProcessedFile
 
Methods inherited from class com.trapezium.chisel.GuiAdapter
addLayoutComponent, getComponent, getContainer, maximumLayoutSize, removeLayoutComponent, setComponent, setContainer, setStretchLast, show
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.trapezium.chisel.ProcessedFileViewer
getComponent
 

Field Detail

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
Constructor Detail

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)
Method Detail

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