Public Member Functions | |
String | GetTitle () |
Gets the title for this table. | |
void | SetLastTouched (boolean bTouched) |
Sets whether or not this was the last table touched by the user. | |
boolean | GetLastTouched () |
Gets whether or not this was the last table touched by the user. | |
void | actionPerformed (ActionEvent e) |
Responds to our designated action events. | |
void | focusGained (FocusEvent e) |
Sets this table as the last one focused. | |
void | focusLost (FocusEvent e) |
This removes focus highlighting. | |
int | Copy () |
Copies selected data to the clipboard. | |
void | Cut () |
Cuts selected data. | |
void | Paste () |
Pastes data to the table. | |
Protected Member Functions | |
void | MakeTable (Object[][] p_oData, Object[] p_oHeader) |
Performs all table formatting. | |
Package Functions | |
EnhancedTable (Object[][] p_oData, Object[] p_oHeader, EnhancedTableWindow oWindow, int iFirstColumnWidth, int iColumnWidth, int iLabelRows, String sTitle) | |
Constructor. | |
EnhancedTable (Object[][] p_oData, Object[] p_oHeader, EnhancedTableWindow oWindow, String sTitle) | |
Constructor. | |
Static Package Functions | |
static String | GetComboValue (String sComboBoxVal) |
Extracts the value from a combo box format string. |
These include copy/paste and cut controls, like Excel, special formatting, and support for drop-down combo boxes for editing cells.
This table assumes that it will not be displayed in a scroll pane. Copyright: Copyright (c) Charles D. Canham 2003 Company: Institute of Ecosystem Studies
javawrapper::EnhancedTable::EnhancedTable | ( | Object | p_oData[][], | |
Object[] | p_oHeader, | |||
EnhancedTableWindow | oWindow, | |||
int | iFirstColumnWidth, | |||
int | iColumnWidth, | |||
int | iLabelRows, | |||
String | sTitle | |||
) | [inline, package] |
Constructor.
This allows more control over table formatting.
p_oData | Object[][] Table data. | |
p_oHeader | Object[] Header data. | |
oWindow | EnhancedTableWindow Parent window. | |
iFirstColumnWidth | int Width of first column (the row labels). | |
iColumnWidth | int Width of all data columns. | |
iLabelRows | int Number of rows for the first column row labels. | |
sTitle | The title of the "owning" behavior group |
javawrapper::EnhancedTable::EnhancedTable | ( | Object | p_oData[][], | |
Object[] | p_oHeader, | |||
EnhancedTableWindow | oWindow, | |||
String | sTitle | |||
) | [inline, package] |
Constructor.
p_oData | Table data. | |
p_oHeader | Header data. | |
oWindow | Parent window. | |
sTitle | The title of the "owning" behavior group. |
String javawrapper::EnhancedTable::GetTitle | ( | ) | [inline] |
Gets the title for this table.
void javawrapper::EnhancedTable::MakeTable | ( | Object | p_oData[][], | |
Object[] | p_oHeader | |||
) | [inline, protected] |
Performs all table formatting.
p_oData | Object[][] Table data. | |
p_oHeader | Object[] Header data. |
void javawrapper::EnhancedTable::SetLastTouched | ( | boolean | bTouched | ) | [inline] |
Sets whether or not this was the last table touched by the user.
bTouched | Last touched status. |
boolean javawrapper::EnhancedTable::GetLastTouched | ( | ) | [inline] |
Gets whether or not this was the last table touched by the user.
void javawrapper::EnhancedTable::actionPerformed | ( | ActionEvent | e | ) | [inline] |
Responds to our designated action events.
e | The event which triggered the action listener. |
void javawrapper::EnhancedTable::focusGained | ( | FocusEvent | e | ) | [inline] |
Sets this table as the last one focused.
e | FocusEvent object. Ignored. |
void javawrapper::EnhancedTable::focusLost | ( | FocusEvent | e | ) | [inline] |
This removes focus highlighting.
e | FocusEvent object. Ignored. |
int javawrapper::EnhancedTable::Copy | ( | ) | [inline] |
Copies selected data to the clipboard.
Selections comprising non-adjacent cells result in invalid selection and then copy action cannot be performed.
I got this from http://www.javaworld.com/javaworld/javatips/jw-javatip77.html, and then modified it a bit.
void javawrapper::EnhancedTable::Cut | ( | ) | [inline] |
Cuts selected data.
The data is copied to the clipboard and then erased from editable cells. Combo boxes are left alone.
Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)
void javawrapper::EnhancedTable::Paste | ( | ) | [inline] |
Pastes data to the table.
Combo boxes and uneditable cells are left alone. Paste is done by aligning the upper left corner of the clipboard selection with the 1st element in the current selection of the JTable.
I got this from http://www.javaworld.com/javaworld/javatips/jw-javatip77.html, and then modified it a bit.
Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)
static String javawrapper::EnhancedTable::GetComboValue | ( | String | sComboBoxVal | ) | [inline, static, package] |
Extracts the value from a combo box format string.
sComboBoxVal | String in combo box format code. |