public class JTableListener extends MouseAdapter
Constructor and Description |
---|
JTableListener(Action[] actions,
Action defaultAction)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
fillPopUp(JPopupMenu popup)
Fill the popup menu.
|
protected Action |
getDoubleClickAction()
When a double click occurs, the action returned by this method is invoked.
|
void |
mousePressed(MouseEvent e) |
void |
mouseReleased(MouseEvent e) |
mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mouseWheelMoved
public JTableListener(Action[] actions, Action defaultAction)
actions
- The actions that will appear in the popupMenu. Insert a null in this array to have a separator in the pop-up menu.
If actions is null or contains no item, no pop-up menu is shown.defaultAction
- The default action which will be invoked when a double click occurs. This action is not necessarily one of the actions array.
If defaultAction is null, nothing occurs on a double click.public void mouseReleased(MouseEvent e)
mouseReleased
in interface MouseListener
mouseReleased
in class MouseAdapter
public void mousePressed(MouseEvent e)
mousePressed
in interface MouseListener
mousePressed
in class MouseAdapter
protected Action getDoubleClickAction()
protected void fillPopUp(JPopupMenu popup)
popup
- the pop up to be filled.Copyright © 2022. All rights reserved.