Package org.ka2ddo.yaac.gui.table
Class PopupMenuMouseAdapter
java.lang.Object
java.awt.event.MouseAdapter
org.ka2ddo.yaac.gui.table.PopupMenuMouseAdapter
- All Implemented Interfaces:
MouseListener
,MouseMotionListener
,MouseWheelListener
,EventListener
This class provides a generic mouse click handler for using right-clicks
on a table row to raise a popup menu associated with the value in a specified
key column of the selected row (such as for the callsign of a station).
- Author:
- Andrew Pavlin, KA2DDO
-
Constructor Summary
ConstructorDescriptionPopupMenuMouseAdapter
(JTable table, TableModel tableModel, GuiContentType guiContentType, int keyColumn) Create the mouse event listener for the specified table, table model, andGuiContentType
of the table. -
Method Summary
Methods inherited from class java.awt.event.MouseAdapter
mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved
-
Constructor Details
-
PopupMenuMouseAdapter
public PopupMenuMouseAdapter(JTable table, TableModel tableModel, GuiContentType guiContentType, int keyColumn) Create the mouse event listener for the specified table, table model, andGuiContentType
of the table.- Parameters:
table
- JTable whose rows can be right-clickedtableModel
- TableModel of the JTableguiContentType
- GuiContentType of the table, to help PopupMenuMouseAdapterkeyColumn
- zero-based column number of column to extract value from, or -1 to use the clicked-upon column
-
-
Method Details
-
mouseClicked
DO NOT CALL. AWT callback for mouse clicks on the specified table.- Specified by:
mouseClicked
in interfaceMouseListener
- Overrides:
mouseClicked
in classMouseAdapter
- Parameters:
e
- MouseEvent reporting the click
-