|
|||||||||||
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.units.DisplayUnitsTable
This is a DisplayUnits table component that can be set to VIEW/EDIT mode
Nested Class Summary | |
(package private) class |
DisplayUnitsTable.DisplayUnitsCellRenderer
Renderer for the DisplayUnitsTable |
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 JTable |
displayTable
|
private static int |
EDIT_COL
|
protected boolean |
editable
|
private GridBagLayoutUtil |
gbl
|
(package private) JScrollPane |
scroll
|
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 | |
DisplayUnitsTable(Vector columnNames,
boolean editable)
Constructs a quantity of measure table in view mode (ie) the table will not allow editing |
Method Summary | |
private JTable |
createDisplayTable(DisplayUnitsData model)
Creates the table |
private DisplayUnitsData |
createTableModel(Vector columnNames)
Create a Table Model |
Vector |
getData()
Get the tableData |
boolean |
isDirty()
Return true if any of the cell value is changed if in EDIT mode |
boolean |
isEditable()
Get the selection mode |
void |
saveData()
This stops the celleditor from editing (workaround for JTable bug) |
void |
setColumns(Vector columnNames)
Set the column names |
private void |
setComponents(Vector columnNames)
Creates a table and puts it into a scrollpane and add it to the panel |
void |
setData(Vector tableData)
Set the table data |
void |
setDirty(boolean state)
|
void |
setEditable(boolean editable)
|
void |
setHeaderRenderer(JTable table)
|
private void |
setTableProperties(JTable table)
Set the background, selection mode and the viewport size |
private void |
setTableRenderersAndEditors(JTable table)
Set table renderers and editors |
protected void |
stopCellEditing()
Stop the cell editor from editing |
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 |
protected boolean editable
private static final int EDIT_COL
protected JTable displayTable
private GridBagLayoutUtil gbl
JScrollPane scroll
Constructor Detail |
public DisplayUnitsTable(Vector columnNames, boolean editable)
Method Detail |
private void setComponents(Vector columnNames)
public void setColumns(Vector columnNames)
columnNames
- -a Vector of Objectspublic void setData(Vector tableData)
tableData
- - a vector of vector of objectspublic Vector getData()
public boolean isDirty()
public void setDirty(boolean state)
public void saveData()
private JTable createDisplayTable(DisplayUnitsData model)
public void setHeaderRenderer(JTable table)
private void setTableProperties(JTable table)
private DisplayUnitsData createTableModel(Vector columnNames)
private void setTableRenderersAndEditors(JTable table)
protected void stopCellEditing()
public void setEditable(boolean editable)
public boolean isEditable()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |