|
|||||||||||
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.JPanel
wt.clients.widgets.JCSMTable
A Panel that has a table with scroll bars
Nested Class Summary |
Nested classes inherited from class javax.swing.JPanel |
JPanel.AccessibleJPanel |
Nested classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
protected Color |
bgColor
|
protected boolean |
columnSelection
|
private static int |
DEFAULT_ROW_HEIGHT
|
protected boolean |
editable
|
protected Color |
gridColor
|
protected TableCellRenderer |
headerRenderer
|
(package private) MouseListener |
listener
|
static int |
MULTI_INTERVAL_SELECTION
|
protected boolean |
rowSelection
|
protected JScrollPane |
scrollPane
|
static int |
SINGLE_INTERVAL_SELECTION
|
static int |
SINGLE_SELECTION
|
protected JTable |
table
|
protected JCSMTableModel |
tableModel
|
Fields inherited from class javax.swing.JPanel |
|
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.Container |
|
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
JCSMTable()
Construct a JCSMTable |
|
JCSMTable(int rows,
int cols)
Construct a JCSMTable |
|
JCSMTable(JCSMTableModel model)
|
|
JCSMTable(Object[][] data,
Object[] columnNames)
Construct a JCSMTable |
|
JCSMTable(Object[] columnNames,
int numRows)
Construct a JCSMTable |
|
JCSMTable(TableCellRenderer headerRenderer)
|
|
JCSMTable(Vector columnNames,
int rows)
Construct a JCSMTable |
|
JCSMTable(Vector data,
Vector columnNames)
Construct a JCSMTable |
Method Summary | |
void |
addColumn(Object columnName,
Vector column)
Add a column |
void |
addMouseListener(MouseListener listener)
|
void |
addRow(Vector row)
Add a row to the table |
void |
clearTable()
Clears the table (Removes all the entries) |
protected JCSMTableModel |
createModel()
|
protected JCSMTableModel |
createModel(int row,
int col)
|
protected JCSMTableModel |
createModel(Object[][] data,
Object[] columnNames)
|
protected JCSMTableModel |
createModel(Object[] columnNames,
int numRows)
|
protected JCSMTableModel |
createModel(Vector columnNames,
int rows)
|
protected JCSMTableModel |
createModel(Vector data,
Vector columnNames)
|
Object |
getCellComponent(int row,
int col)
Get the cell component |
int |
getColumnCount()
Return the column count |
boolean |
getColumnSelection()
Return true if column selection is allowed |
int[] |
getColWidths()
Get the column widths |
protected int |
getHeaderRowHeight()
return the header row height |
int |
getRowCount()
Return the row count |
int[] |
getRowHeights()
Get the row heights |
boolean |
getRowSelection()
Return true if row selection is allowed |
int |
getSelectedColumn()
Get the selected column |
int[] |
getSelectedColumns()
Get the selected columns Get an array of indices of the selected columns |
int |
getSelectedRow()
Get the selectedRow |
int[] |
getSelectedRows()
Get the selected Rows |
void |
insertColumn(Object columnName,
Vector column,
int index)
Insert a column |
void |
insertRow(Vector row,
int i)
Insert a row |
boolean |
isDirty()
|
boolean |
isEditable()
Return true if in edit mode else true |
void |
removeMouseListener(MouseListener listener)
|
void |
removeRow(int row)
Remove a row from the table |
void |
setAutoResizeMode(int mode)
Set the auto resize mode |
void |
setColumnNames(Object[] columnNames)
Set the columnNames |
void |
setColumnNames(Vector columnNames)
Set the columnNames |
void |
setColumnSelectionAllowed(boolean bl)
Set the column selection |
void |
setColumnWidth(int width)
Set the column width |
void |
setColumnWidth(int columnNo,
int width)
Set the column width for a specified column |
void |
setColumnWidth(TableColumn column,
int width)
|
protected void |
setComponents()
Set the components |
void |
setDirty(boolean dirty)
|
void |
setEditable(boolean state)
Set to edit mode if true else view mode |
void |
setHeaderBackground(Color color)
Set the header background color |
void |
setHeaderFont(Font font)
Set the headerFont |
void |
setHeaderForeground(Color color)
Set the header foreground color |
void |
setHeaderRenderer(TableCellRenderer headerRenderer)
|
protected void |
setRenderersAndEditors()
Set the renderers and the editors Override this for setting new Renderers and editors |
void |
setRowHeight(int height)
Set the row height |
void |
setRowSelectionAllowed(boolean bl)
Set Row selection |
void |
setSelectionMode(int sel)
Set the selection mode |
protected void |
setTable()
Set the table |
void |
setTableBackground(Color color)
Set the table background |
void |
setTableData(Object[][] data)
Set the data for the table |
void |
setTableData(Vector data)
Set the data for the table |
void |
setTableIntercellSpacing(Dimension d)
Set the table cell spacing |
void |
setTableSize(Dimension dimension)
Set the table size |
void |
stopCellEditing()
Stop the edit mode |
void |
validateTable()
Validate the table |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int SINGLE_SELECTION
public static final int SINGLE_INTERVAL_SELECTION
public static final int MULTI_INTERVAL_SELECTION
private static final int DEFAULT_ROW_HEIGHT
protected boolean rowSelection
protected boolean columnSelection
protected JCSMTableModel tableModel
protected JTable table
protected JScrollPane scrollPane
protected Color bgColor
protected Color gridColor
protected boolean editable
protected TableCellRenderer headerRenderer
MouseListener listener
Constructor Detail |
public JCSMTable()
public JCSMTable(int rows, int cols)
rows
- - no of rowscols
- - no of columnspublic JCSMTable(TableCellRenderer headerRenderer)
public JCSMTable(Object[][] data, Object[] columnNames)
data
- - a two dim array of objectscolumnNames
- - an array of columnNamespublic JCSMTable(Object[] columnNames, int numRows)
columnNames
- - an array of columnNamespublic JCSMTable(Vector columnNames, int rows)
columnNames
- - Vector of columnNamesrows
- - no of rowspublic JCSMTable(Vector data, Vector columnNames)
data
- - vector of (columns) vector of (rows)datacolumnNames
- - vector columnNamespublic JCSMTable(JCSMTableModel model)
Method Detail |
protected JCSMTableModel createModel()
protected JCSMTableModel createModel(int row, int col)
protected JCSMTableModel createModel(Object[][] data, Object[] columnNames)
protected JCSMTableModel createModel(Object[] columnNames, int numRows)
protected JCSMTableModel createModel(Vector columnNames, int rows)
protected JCSMTableModel createModel(Vector data, Vector columnNames)
public void setColumnNames(Vector columnNames)
columnNames
- - Vector of columnNamespublic void setColumnNames(Object[] columnNames)
columnNames
- - An array of columnNamespublic void setHeaderRenderer(TableCellRenderer headerRenderer)
public void setTableData(Vector data)
public void setTableData(Object[][] data)
public void clearTable()
public void validateTable()
public int getRowCount()
public int getColumnCount()
public int getSelectedRow()
public int[] getSelectedRows()
public int getSelectedColumn()
public int[] getSelectedColumns()
public Object getCellComponent(int row, int col)
public void setTableBackground(Color color)
color
- public void setHeaderForeground(Color color)
public void setHeaderBackground(Color color)
public void setHeaderFont(Font font)
public void setColumnWidth(int width)
width
- public void setColumnWidth(int columnNo, int width)
width
- public void setColumnWidth(TableColumn column, int width)
public void setRowHeight(int height)
height
- of the rowpublic void setAutoResizeMode(int mode)
mode
- (JTables AutoResize modes)public void setSelectionMode(int sel)
public void setRowSelectionAllowed(boolean bl)
public void setColumnSelectionAllowed(boolean bl)
public boolean getRowSelection()
public boolean getColumnSelection()
public void removeRow(int row)
row
- indexpublic void addRow(Vector row)
public void insertRow(Vector row, int i)
public void addColumn(Object columnName, Vector column)
columnName
- name of the colummcolumn
- Vector of the column datapublic void insertColumn(Object columnName, Vector column, int index)
columnName
- column
- vector of column objectspublic int[] getColWidths()
public int[] getRowHeights()
protected int getHeaderRowHeight()
public void setTableIntercellSpacing(Dimension d)
public void setEditable(boolean state)
public boolean isEditable()
public void setTableSize(Dimension dimension)
dimension
- protected void setComponents()
public void addMouseListener(MouseListener listener)
public void removeMouseListener(MouseListener listener)
protected void setTable()
public void stopCellEditing()
public void setDirty(boolean dirty)
public boolean isDirty()
protected void setRenderersAndEditors()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |