|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.event.MouseAdapter
com.jidesoft.grid.TablePopupMenuInstaller
public class TablePopupMenuInstaller
TablePopupMenuInstaller allows you to add a popup menu to table and customize it. To use it, you just
need to call
TablePopupMenuInstaller installer = new TablePopupMenuInstaller(table);
Or if you want to uninstall it, call
TablePopupMenuInstaller.getTablePopupMenuInstaller(table).uninstallListeners();
However TablePopupMenuInstaller has no menu items. You can use one of the existing
TablePopupMenuCustomizers to add more menu items or create your own
TablePopupMenuCustomizer to do it.
| Field Summary | |
|---|---|
static String |
CLIENT_PROPERTY_POPUP_MENU_INSTALLER
Client property used by JTable to provide its own TableColumnPopupMenuCustomizer. |
| Constructor Summary | |
|---|---|
TablePopupMenuInstaller(JTable table)
Creates a TableColumnPopupMenuCustomizer. |
|
| Method Summary | |
|---|---|
static void |
addSeparatorIfNecessary(JPopupMenu popup)
Adds a separator to the popup menu if there are menu items on it already. |
void |
addTablePopupMenuCustomizer(TablePopupMenuCustomizer customizer)
|
protected JPopupMenu |
createPopupMenu()
|
protected void |
customizeMenuItems(JTable table,
JPopupMenu popup,
int clickingRow,
int clickingColumn)
Customizes the menu items for the popup menu. |
TablePopupMenuCustomizer[] |
getTablePopupMenuCustomizers()
|
static TablePopupMenuInstaller |
getTablePopupMenuInstaller(JTable table)
Gets the Searchable installed on the component. |
void |
installListeners()
Installs the listeners needed in order to show the popup menu for the table. |
void |
mousePressed(MouseEvent e)
|
void |
mouseReleased(MouseEvent e)
|
void |
removeTablePopupMenuCustomizer(TablePopupMenuCustomizer customizer)
|
void |
uninstallListeners()
Uninstalls the listeners needed in order to show the popup menu for the table. |
| Methods inherited from class java.awt.event.MouseAdapter |
|---|
mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mouseWheelMoved |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String CLIENT_PROPERTY_POPUP_MENU_INSTALLER
| Constructor Detail |
|---|
public TablePopupMenuInstaller(JTable table)
table - the table.| Method Detail |
|---|
public void addTablePopupMenuCustomizer(TablePopupMenuCustomizer customizer)
public void removeTablePopupMenuCustomizer(TablePopupMenuCustomizer customizer)
public TablePopupMenuCustomizer[] getTablePopupMenuCustomizers()
public void mousePressed(MouseEvent e)
mousePressed in interface MouseListenermousePressed in class MouseAdapterpublic void mouseReleased(MouseEvent e)
mouseReleased in interface MouseListenermouseReleased in class MouseAdapterprotected JPopupMenu createPopupMenu()
protected void customizeMenuItems(JTable table,
JPopupMenu popup,
int clickingRow,
int clickingColumn)
table - the table .popup - the popup menu.clickingRow - the row that user right clicks.clickingColumn - the column that user right clicks.public static void addSeparatorIfNecessary(JPopupMenu popup)
popup - the popup menu.public void installListeners()
public void uninstallListeners()
public static TablePopupMenuInstaller getTablePopupMenuInstaller(JTable table)
table - the table
|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||