Public Member Functions | |
String | GetTitle () |
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. | |
Private Attributes | |
Clipboard | m_jClipboard |
For clipboard controls. | |
String | m_sRowString |
For clipboard operations. | |
String | m_sValue |
For clipboard operations. | |
String | m_sTitle |
Title. | |
StringSelection | m_sStringSel |
For clipboard operations. | |
boolean | m_bLastTouched |
Whether or not this was the last table brought into focus by the user - needed when trying to decipher intent when implementing menu copy/paste commands. | |
EnhancedTableWindow | m_oWindow |
The parent window. | |
int | m_iFirstColumnWidth = 200 |
Preferred width of the first column (row labels). | |
int | m_iColumnWidth = 100 |
Preferred width of the data columns. | |
int | m_iLabelRows = 2 |
Lines of text allowed in the first column (row labels). |
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
|
Constructor. This allows more control over table formatting.
|
|
Constructor.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Responds to our designated action events.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
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.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Cuts selected data. The data is copied to the clipboard and then erased from editable cells. Combo boxes are left alone.
|
|
Sets this table as the last one focused.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
This removes focus highlighting.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Extracts the value from a combo box format string.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Gets whether or not this was the last table touched by the user.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Performs all table formatting.
|
|
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.
|
|
Sets whether or not this was the last table touched by the user.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |