org.grinvin.gui
Class JTabbedPaneMouseListener
java.lang.Object
org.grinvin.gui.JTabbedPaneMouseListener
- MouseListener
public class JTabbedPaneMouseListener
extends java.lang.Object
implements MouseListener
Class that listens to mouse clicks on a JTabbedPane and displays
a popup menu corresponding to the clicked tab.
JTabbedPaneMouseListener(JTabbedPane tabbedPane) - Creates a new instance of JTabbedPaneMouseListener and
registers it as listener with tabbedPane.
|
void | addPopup(Component comp, JPopupMenu popup) - add a popup for the tab corresponding to the Component in the JTabbedpane.
|
void | mouseClicked(MouseEvent e)
|
void | mouseEntered(MouseEvent e)
|
void | mouseExited(MouseEvent e)
|
void | mousePressed(MouseEvent e)
|
void | mouseReleased(MouseEvent e)
|
void | setDefaultPopup(JPopupMenu defaultPopup) - sets the default popup to be shown when the user clicks on a tab with no popup
menu or doesn't click on the header of a tab.
|
JTabbedPaneMouseListener
public JTabbedPaneMouseListener(JTabbedPane tabbedPane)
Creates a new instance of JTabbedPaneMouseListener and
registers it as listener with tabbedPane.
addPopup
public void addPopup(Component comp,
JPopupMenu popup)
add a popup for the tab corresponding to the Component in the JTabbedpane.
mouseClicked
public void mouseClicked(MouseEvent e)
mouseEntered
public void mouseEntered(MouseEvent e)
mouseExited
public void mouseExited(MouseEvent e)
mousePressed
public void mousePressed(MouseEvent e)
mouseReleased
public void mouseReleased(MouseEvent e)
setDefaultPopup
public void setDefaultPopup(JPopupMenu defaultPopup)
sets the default popup to be shown when the user clicks on a tab with no popup
menu or doesn't click on the header of a tab.