|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tentackle.ui.FormTableUtilityPopup
public class FormTableUtilityPopup
A utility popup menu to allow a FormTable to be printed, converted to excel, find an item in the table, set/get the preferences, size, columns, etc... The popup-Menu will be triggered by pressing the right-mouse button (using isPopupTrigger()) somewhere in the header of the table (by default).
| Constructor Summary | |
|---|---|
FormTableUtilityPopup(FormTable table)
Creates a popup menu for a given table. Listeners will be registered, default title and table. |
|
FormTableUtilityPopup(FormTable table,
boolean registerListeners,
String title,
String intro)
Creates a popup menu for a given table. |
|
FormTableUtilityPopup(FormTable table,
String title,
String intro)
Creates a popup menu for a given table. Listeners will be registered. |
|
| Method Summary | |
|---|---|
void |
addKeyListener()
Adds the default key listener for KeyEvent.VK_F3. |
void |
addKeyListenerForKey(int keyCode)
Adds a key listener for a given keycode. |
void |
addMouseListenerForTable()
Adds a mouse listener to the whole table (including the header) for this popup. |
void |
addMouseListenerForTableHeader()
Adds a mouse listener only to the table header for this popup. |
void |
excel(File file,
boolean onlySelected)
Converts the table to an excel spreadsheet. |
String |
getIntro()
Gets the intro text. |
String |
getTitle()
Gets the title. |
boolean |
isColumnMenuEnabled()
Returns whether the column menu is enabled. |
void |
keyPressed(KeyEvent e)
Invoked when a key has been pressed. |
void |
keyReleased(KeyEvent e)
Invoked when a key has been released. |
void |
keyTyped(KeyEvent e)
Invoked when a key has been typed. |
void |
mouseClicked(MouseEvent e)
Invoked when the mouse button has been clicked (pressed and released) on a component. |
void |
mouseEntered(MouseEvent e)
Invoked when the mouse enters a component. |
void |
mouseExited(MouseEvent e)
Invoked when the mouse exits a component. |
void |
mousePressed(MouseEvent e)
Invoked when a mouse button has been pressed on a component. |
void |
mouseReleased(MouseEvent e)
Invoked when a mouse button has been released on a component. |
void |
removeKeyListener()
Removes the key listener. |
void |
removeMouseListenerForTable()
Removes the table mouse listener for this popup. |
void |
removeMouseListenerForTableHeader()
Removes the table header mouse listener for this popup. |
void |
restoreSettings(boolean system)
Restores the tables default settings from the Preferences. |
void |
saveSettings(boolean system)
Saves the table settings to the Preferences. |
boolean |
search(String searchText,
boolean caseSensitive)
Searches for a text starting at the current cell. |
void |
setColumnMenuEnabled(boolean columnMenuEnabled)
Enables or disables the column menu. The column menu allows to set the visibility of columns. |
void |
setIntro(String intro)
Sets the intro-text. The intro will be printed on the first page and shown in excel sheets. |
void |
setTitle(String title)
Sets the title. The title will be printed pn each page and shown in excel sheets. |
void |
showExcelDialog(boolean onlySelected)
Opens a dialog to export a table to an excel sheet. |
void |
showPrintDialog()
Prints the table. |
void |
showSearchDialog()
Opens a dialog to search in a table starting at the current cell. |
void |
showXmlDialog(boolean onlySelected)
Opens a dialog to export a table to an XML file. |
void |
uninstall()
Uninstalls the popup from a table |
void |
xml(File file,
boolean onlySelected)
Exports a table to an XML file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FormTableUtilityPopup(FormTable table,
boolean registerListeners,
String title,
String intro)
table - the formtableregisterListeners - true if register the mouse- and keyboard listenerstitle - the table title, null if defaultintro - the table intro, null if default
public FormTableUtilityPopup(FormTable table,
String title,
String intro)
table - the formtabletitle - the table title, null if defaultintro - the table intro, null if defaultpublic FormTableUtilityPopup(FormTable table)
table - the formtable| Method Detail |
|---|
public void uninstall()
public void setTitle(String title)
title - the title, null if default from windowpublic String getTitle()
public void setIntro(String intro)
intro - the intro, null = nonepublic String getIntro()
public boolean isColumnMenuEnabled()
public void setColumnMenuEnabled(boolean columnMenuEnabled)
columnMenuEnabled - true to enable column menu (default)public void saveSettings(boolean system)
system - is true if save to systemRoot, else userRootpublic void restoreSettings(boolean system)
system - is true if load ONLY from systemRoot, else try userRoot first (should be default)
public boolean search(String searchText,
boolean caseSensitive)
searchText - the search textcaseSensitive - true if case sensitive
public void showSearchDialog()
public void showPrintDialog()
public void excel(File file,
boolean onlySelected)
throws IOException
file - the output fileonlySelected - true if export only selected rows
IOException - if export failedpublic void showExcelDialog(boolean onlySelected)
onlySelected - true if export only selected rows
public void xml(File file,
boolean onlySelected)
throws IOException,
TransformerConfigurationException,
SAXException
file - the output fileonlySelected - true if export only selected rows
IOException
TransformerConfigurationException
SAXExceptionpublic void showXmlDialog(boolean onlySelected)
onlySelected - true if export only selected rowspublic void addMouseListenerForTableHeader()
public void removeMouseListenerForTableHeader()
public void addMouseListenerForTable()
public void removeMouseListenerForTable()
public void mouseClicked(MouseEvent e)
java.awt.event.MouseListener
mouseClicked in interface MouseListenerpublic void mouseEntered(MouseEvent e)
java.awt.event.MouseListener
mouseEntered in interface MouseListenerpublic void mouseExited(MouseEvent e)
java.awt.event.MouseListener
mouseExited in interface MouseListenerpublic void mousePressed(MouseEvent e)
java.awt.event.MouseListener
mousePressed in interface MouseListenerpublic void mouseReleased(MouseEvent e)
java.awt.event.MouseListener
mouseReleased in interface MouseListenerpublic void addKeyListenerForKey(int keyCode)
keyCode - the keycodepublic void addKeyListener()
KeyEvent.VK_F3.
Pressing this key will start the search dialog or continue the search.
public void removeKeyListener()
public void keyPressed(KeyEvent e)
java.awt.event.KeyListenerKeyEvent for a definition of
a key pressed event.
keyPressed in interface KeyListenerpublic void keyReleased(KeyEvent e)
java.awt.event.KeyListenerKeyEvent for a definition of
a key released event.
keyReleased in interface KeyListenerpublic void keyTyped(KeyEvent e)
java.awt.event.KeyListenerKeyEvent for a definition of
a key typed event.
keyTyped in interface KeyListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||