com.isti.util.gui
Class TabCloseIcon.TabCloseIconMouseListener

java.lang.Object
  extended by java.awt.event.MouseAdapter
      extended by com.isti.util.gui.TabCloseIcon.TabCloseIconMouseListener
All Implemented Interfaces:
java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.util.EventListener
Enclosing class:
TabCloseIcon

protected static class TabCloseIcon.TabCloseIconMouseListener
extends java.awt.event.MouseAdapter

The mouse listener for all tab close icons.


Constructor Summary
protected TabCloseIcon.TabCloseIconMouseListener()
           
 
Method Summary
protected  void addMenuItem(javax.swing.JPopupMenu pop, javax.swing.JMenuItem mi)
          Adds the menu item to the popup menu.
protected  void addMenuItems(javax.swing.JPopupMenu pop, java.lang.String curTitle)
          Adds the menu item to the popup menu.
 void checkAddListenerToComp(java.awt.Component compObj)
          Checks if this listener was previously added to the given component and adds it if not.
protected  boolean getTabInfo(java.awt.event.MouseEvent e)
          Get the tab information.
protected  void maybeShowPopup(java.awt.event.MouseEvent e)
          Show the popup if the event is a popup trigger.
 void mousePressed(java.awt.event.MouseEvent e)
          Invoked when a mouse button has been pressed on a component.
 void mouseReleased(java.awt.event.MouseEvent e)
          Invoked when a mouse button has been released on a component.
 
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
 

Constructor Detail

TabCloseIcon.TabCloseIconMouseListener

protected TabCloseIcon.TabCloseIconMouseListener()
Method Detail

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Invoked when a mouse button has been pressed on a component.

Specified by:
mousePressed in interface java.awt.event.MouseListener
Overrides:
mousePressed in class java.awt.event.MouseAdapter
Parameters:
e - the MouseEvent.

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Invoked when a mouse button has been released on a component.

Specified by:
mouseReleased in interface java.awt.event.MouseListener
Overrides:
mouseReleased in class java.awt.event.MouseAdapter
Parameters:
e - the MouseEvent.

checkAddListenerToComp

public void checkAddListenerToComp(java.awt.Component compObj)
Checks if this listener was previously added to the given component and adds it if not.

Parameters:
compObj - Component object to use.

addMenuItem

protected void addMenuItem(javax.swing.JPopupMenu pop,
                           javax.swing.JMenuItem mi)
Adds the menu item to the popup menu.

Parameters:
pop - the popup menu.
mi - the menu item.

addMenuItems

protected void addMenuItems(javax.swing.JPopupMenu pop,
                            java.lang.String curTitle)
Adds the menu item to the popup menu.

Parameters:
pop - the popup menu.
curTitle - the current title.

getTabInfo

protected boolean getTabInfo(java.awt.event.MouseEvent e)
Get the tab information.

Parameters:
e - the MouseEvent.
Returns:
true if successful, false otherwise.

maybeShowPopup

protected void maybeShowPopup(java.awt.event.MouseEvent e)
Show the popup if the event is a popup trigger. The 'getCurrentInfo()' should be called prior to this.

Parameters:
e - the MouseEvent.
See Also:
getCurrentInfo