|
Diamond Control Suite 3.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JTable
diamondedge.swing.grid.DsTable
public class DsTable
A class which implements many common functions used in DsGrid and other tables
| Nested Class Summary | |
|---|---|
static class |
DsTable.BooleanEditor
|
static class |
DsTable.BooleanRenderer
|
static class |
DsTable.ComponentEditor
|
static class |
DsTable.ComponentRenderer
|
static class |
DsTable.DateEditor
|
static class |
DsTable.ListEditor
|
static class |
DsTable.TableEditor
|
| Nested classes/interfaces inherited from class javax.swing.JTable |
|---|
JTable.AccessibleJTable, JTable.DropLocation, JTable.PrintMode |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
protected boolean |
cellsEditable
|
protected boolean |
spannedCells
|
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface diamondedge.swing.DsConstants |
|---|
ACCOUNTING, ALL, ASCENDING, ASCENDING_CASE, BORDER_BOTTOM, BORDER_LEFT, BORDER_NONE, BORDER_OUTLINE, BORDER_RIGHT, BORDER_TOP, CROSS_LINES, DASH, DASH_DOT, DASH_DOT_DOT, DEFAULT, DESCENDING, DESCENDING_CASE, DIAGONAL_CROSS_LINES, DOT, DOUBLE, DOUBLE_LINE, DOWNWARD_DIAGONAL_LINES, ETCHED, ETCHED_RAISED, FALSE, FIND_ALL, FIND_EQUALS, FIND_GT, FIND_GTE, FIND_LT, FIND_LTE, FIND_NE, FIND_PREFIX, FIND_REGEX, FIND_STRING, FIRST, FLAT, GRID_DASH, GRID_DASH_DOT, GRID_DASH_DOT_DOT, GRID_DOT, GRID_LINE, HIGHLIGHT_SELECTION_ALWAYS, HIGHLIGHT_SELECTION_NEVER, HIGHLIGHT_SELECTION_WITH_FOCUS, HORIZONTAL_LINES, LOWERED, LOWERED_LIGHT, NONE, RAISED, RAISED_LIGHT, SELECT_CELL, SELECT_NONE, SELECT_ROW, SINGLE, SINGLE_LINE, SOLID, STRETCH, TILE, TRANSPARENT, TRUE, UPWARD_DIAGONAL_LINES, VERTICAL_LINES |
| Fields inherited from interface javax.swing.SwingConstants |
|---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Method Summary | |
|---|---|
TableColumn |
addColumn()
Adds a column to the end. |
TableColumn |
addColumn(String columnName,
String id)
Adds a column to the end with the given name (HeaderValue) and identifier. |
void |
addColumn(TableColumn aColumn)
Appends aColumn to the end of the array of columns held by the column model. |
int |
calculateColumnWidthToFit(int column,
boolean fitName,
boolean fitData)
Returns the width of the column at the given index needed to fit the text for the name of the column and/or the data in cells in that column. |
int |
calculateWidthToFit(boolean fitColumnNames,
boolean fitColumnData)
Returns the total width of the table needed to fit the text for the name of the column and/or the data in cells in that column for each column in the table. |
int |
columnAtPoint(Point point)
|
void |
columnSelectionChanged(ListSelectionEvent e)
|
protected DsCell |
createCell()
Returns a new DsCell. |
void |
createDefaultColumnsFromModel()
|
protected void |
createDefaultEditors()
|
protected void |
createDefaultRenderers()
|
protected JTableHeader |
createDefaultTableHeader()
|
DsCell |
getCellAt(int row,
int col)
Returns the cell at the given row and column. |
protected int |
getCellColumnSpan(int row,
int column)
|
TableCellEditor |
getCellEditor(int row,
int column)
|
Rectangle |
getCellRect(int row,
int column,
boolean includeSpacing)
|
TableCellRenderer |
getCellRenderer(int row,
int column)
|
protected int |
getCellRowSpan(int row,
int column)
|
DsCellRange |
getCells(int firstRow,
int firstColumn,
int lastRow,
int lastColumn)
Returns a range of cells in between and including the specified cell corners. |
Object |
getCellValueAt(int row,
int col)
Returns the contents/object for the cell at the given row and column. |
TableColumn |
getColumn(int index)
Returns the TableColumn object for the column at the given position. |
TableColumn |
getColumn(String columnId)
|
int |
getColumnCount()
Returns the total number of columns. |
DsTableColumnHeader |
getColumnHeader()
Returns the column header. |
Color |
getColumnHeaderBackground()
Returns the background color of the column header. |
Font |
getColumnHeaderFont()
Returns the Font for the column headers |
Color |
getColumnHeaderForeground()
Returns the color used to draw text of the column header. |
int |
getColumnHeaderHeight()
Returns the height of the column header. |
int |
getColumnIndex(String columnId)
Returns the column index for the column that has the given identifier or column name. |
String |
getColumnName(int column)
Returns the object used to get the text displayed in the given column header. |
DsCellProperties |
getColumnProperties(int col)
Returns the default cell containing the default properties for the column. |
DsCellRange |
getColumns(int firstColumn,
int lastColumn)
Returns a range of cells that includes all cells in the specified columns. |
int |
getColumnWidth(int index)
Determines the width of the specified column in pixels. |
DsCellRange |
getRows(int firstRow,
int lastRow)
Returns a range of cells that includes all cells in the specified rows. |
protected static JScrollPane |
getScrollPane(JTable table)
|
String |
getToolTipText(MouseEvent event)
Overrides JComponent's getToolTipText
method in order to allow the cell's tips to be used
if it has text set. |
void |
hideColumn(int index)
Removes from the view the column at the given position. |
boolean |
isCellEditable(int row,
int column)
Returns true if the cell at row and column is editable. |
boolean |
isColumnReorderingAllowed()
Returns true if the user is allowed to rearrange columns by dragging their headers, false otherwise. |
boolean |
isColumnResizingAllowed()
Returns true if the user is allowed to resize columns by dragging between their headers, false otherwise. |
boolean |
isEditable()
Returns whether any cell can be edited by the user. |
void |
removeSpan(int row,
int column)
Makes the cell at position row, column not span
across multiple rows and/or columns. |
int |
rowAtPoint(Point point)
|
void |
setColumnCount(int val)
Sets the total number of columns by adding new columns or removing existing ones. |
void |
setColumnHeaderBackground(Color val)
Sets the background color of the column header. |
void |
setColumnHeaderFont(Font f)
Sets the Font for the column headers |
void |
setColumnHeaderForeground(Color val)
Sets the color used to draw text of the column header. |
void |
setColumnHeaderHeight(int height)
Sets the height of the column header. |
void |
setColumnHorizontalAlignment(int column,
int align)
Sets the horizontal alignment of the text in the column header. |
void |
setColumnName(int column,
String val)
Sets the text displayed in the column header. |
void |
setColumnReorderingAllowed(boolean reorderingAllowed)
Shortcut to set whether the user can drag column headers to reorder columns. |
void |
setColumnResizingAllowed(boolean resizingAllowed)
Shortcut to set whether the user can resize columns by dragging between headers. |
void |
setColumnVerticalAlignment(int column,
int align)
Sets the vertical alignment of the text in the column header. |
void |
setColumnWidth(int index,
int width)
Sets the width of the column at the given index to width. |
void |
setColumnWidth(String columnId,
int width)
|
void |
setColumnWidthToFit(int column,
boolean fitName,
boolean fitData)
Sets the width of the column at the given index to fit the text for the name of the column and/or the data in cells in that column. |
void |
setEditable(boolean cellsCanBeEdited)
Set whether any cell can be edited by the user. |
boolean |
spanCells(int startRow,
int startColumn,
int rowsToSpan,
int columnsToSpan)
Makes the cell at position startRow, startColumn span
across rowsToSpan rows and columnsToSpan columns. |
void |
tableChanged(TableModelEvent e)
Invoked when this table's TableModel generates
a TableModelEvent. |
void |
updateUI()
|
void |
valueChanged(ListSelectionEvent e)
|
| Methods inherited from class java.awt.Component |
|---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, |