javax.swing.plaf.basic
Class BasicPopupMenuUI.MouseGrabber

java.lang.Object
  extended byjavax.swing.plaf.basic.BasicPopupMenuUI.MouseGrabber
All Implemented Interfaces:
ChangeListener, ComponentListener, EventListener, MouseListener, MouseMotionListener, MouseWheelListener, WindowFocusListener, WindowListener
Enclosing class:
BasicPopupMenuUI

private static class BasicPopupMenuUI.MouseGrabber
extends Object
implements MouseListener, MouseMotionListener, MouseWheelListener, WindowListener, WindowFocusListener, ComponentListener, ChangeListener


Field Summary
(package private)  Vector grabbed
           
(package private)  MenuElement lastGrabbed
           
(package private)  boolean lastGrabbedMenuBarChild
           
(package private)  MenuElement[] lastPathSelected
           
 
Constructor Summary
BasicPopupMenuUI.MouseGrabber()
           
 
Method Summary
(package private)  void cancelPopupMenu()
           
 void componentHidden(ComponentEvent e)
          Invoked when the component has been made invisible.
 void componentMoved(ComponentEvent e)
          Invoked when the component's position changes.
 void componentResized(ComponentEvent e)
          Invoked when the component's size changes.
 void componentShown(ComponentEvent e)
          Invoked when the component has been made visible.
(package private)  void grabContainer(Container c, Component excluded)
           
 void mouseClicked(MouseEvent e)
          Invoked when the mouse button has been clicked (pressed and released) on a component.
 void mouseDragged(MouseEvent e)
          Invoked when a mouse button is pressed on a component and then dragged.
 void mouseEntered(MouseEvent e)
          Invoked when the mouse enters a component.
 void mouseExited(MouseEvent e)
          Invoked when the mouse exits a component.
 void mouseMoved(MouseEvent e)
          Invoked when the mouse cursor has been moved onto a component but no buttons have been pushed.
 void mousePressed(MouseEvent e)
          Invoked when a mouse button has been pressed on a component.
 void mouseReleased(MouseEvent e)
          Invoked when a mouse button has been released on a component.
 void mouseWheelMoved(MouseWheelEvent e)
          Invoked when the mouse wheel is rotated.
private  void requestAddGrab(Component invoker)
           
private  void requestRemoveGrab()
           
 void stateChanged(ChangeEvent e)
          Invoked when the target of the listener has changed its state.
(package private)  void ungrabContainers()
           
 void windowActivated(WindowEvent e)
          Invoked when the Window is set to be the active Window.
 void windowClosed(WindowEvent e)
          Invoked when a window has been closed as the result of calling dispose on the window.
 void windowClosing(WindowEvent e)
          Invoked when the user attempts to close the window from the window's system menu.
 void windowDeactivated(WindowEvent e)
          Invoked when a Window is no longer the active Window.
 void windowDeiconified(WindowEvent e)
          Invoked when a window is changed from a minimized to a normal state.
 void windowGainedFocus(WindowEvent e)
          Invoked when the Window is set to be the focused Window, which means that the Window, or one of its subcomponents, will receive keyboard events.
 void windowIconified(WindowEvent e)
          Invoked when a window is changed from a normal to a minimized state.
 void windowLostFocus(WindowEvent e)
          Invoked when the Window is no longer the focused Window, which means that keyboard events will no longer be delivered to the Window or any of its subcomponents.
 void windowOpened(WindowEvent e)
          Invoked the first time a window is made visible.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

grabbed

Vector grabbed

lastGrabbed

MenuElement lastGrabbed

lastGrabbedMenuBarChild

boolean lastGrabbedMenuBarChild

lastPathSelected

MenuElement[] lastPathSelected
Constructor Detail

BasicPopupMenuUI.MouseGrabber

public BasicPopupMenuUI.MouseGrabber()
Method Detail

requestAddGrab

private void requestAddGrab(Component invoker)

requestRemoveGrab

private void requestRemoveGrab()

cancelPopupMenu

void cancelPopupMenu()

stateChanged

public void stateChanged(ChangeEvent e)
Description copied from interface: ChangeListener
Invoked when the target of the listener has changed its state.

Specified by:
stateChanged in interface ChangeListener
Parameters:
e - a ChangeEvent object

grabContainer

void grabContainer(Container c,
                   Component excluded)

ungrabContainers

void ungrabContainers()

mousePressed

public void mousePressed(MouseEvent e)
Description copied from interface: MouseListener
Invoked when a mouse button has been pressed on a component.

Specified by:
mousePressed in interface MouseListener

mouseReleased

public void mouseReleased(MouseEvent e)
Description copied from interface: MouseListener
Invoked when a mouse button has been released on a component.

Specified by:
mouseReleased in interface MouseListener

mouseEntered

public void mouseEntered(MouseEvent e)
Description copied from interface: MouseListener
Invoked when the mouse enters a component.

Specified by:
mouseEntered in interface MouseListener

mouseExited

public void mouseExited(MouseEvent e)
Description copied from interface: MouseListener
Invoked when the mouse exits a component.

Specified by:
mouseExited in interface MouseListener

mouseMoved

public void mouseMoved(MouseEvent e)
Description copied from interface: MouseMotionListener
Invoked when the mouse cursor has been moved onto a component but no buttons have been pushed.

Specified by:
mouseMoved in interface MouseMotionListener

mouseDragged

public void mouseDragged(MouseEvent e)
Description copied from interface: MouseMotionListener
Invoked when a mouse button is pressed on a component and then dragged. MOUSE_DRAGGED events will continue to be delivered to the component where the drag originated until the mouse button is released (regardless of whether the mouse position is within the bounds of the component).

Due to platform-dependent Drag&Drop implementations, MOUSE_DRAGGED events may not be delivered during a native Drag&Drop operation.

Specified by:
mouseDragged in interface MouseMotionListener

mouseClicked

public void mouseClicked(MouseEvent e)
Description copied from interface: MouseListener
Invoked when the mouse button has been clicked (pressed and released) on a component.

Specified by:
mouseClicked in interface MouseListener

mouseWheelMoved

public void mouseWheelMoved(MouseWheelEvent e)
Description copied from interface: MouseWheelListener
Invoked when the mouse wheel is rotated.

Specified by:
mouseWheelMoved in interface MouseWheelListener
See Also:
MouseWheelEvent

componentResized

public void componentResized(ComponentEvent e)
Description copied from interface: ComponentListener
Invoked when the component's size changes.

Specified by:
componentResized in interface ComponentListener

componentMoved

public void componentMoved(ComponentEvent e)
Description copied from interface: ComponentListener
Invoked when the component's position changes.

Specified by:
componentMoved in interface ComponentListener

componentShown

public void componentShown(ComponentEvent e)
Description copied from interface: ComponentListener
Invoked when the component has been made visible.

Specified by:
componentShown in interface ComponentListener

componentHidden

public void componentHidden(ComponentEvent e)
Description copied from interface: ComponentListener
Invoked when the component has been made invisible.

Specified by:
componentHidden in interface ComponentListener

windowOpened

public void windowOpened(WindowEvent e)
Description copied from interface: WindowListener
Invoked the first time a window is made visible.

Specified by:
windowOpened in interface WindowListener

windowClosing

public void windowClosing(WindowEvent e)
Description copied from interface: WindowListener
Invoked when the user attempts to close the window from the window's system menu. If the program does not explicitly hide or dispose the window while processing this event, the window close operation will be cancelled.

Specified by:
windowClosing in interface WindowListener

windowClosed

public void windowClosed(WindowEvent e)
Description copied from interface: WindowListener
Invoked when a window has been closed as the result of calling dispose on the window.

Specified by:
windowClosed in interface WindowListener

windowIconified

public void windowIconified(WindowEvent e)
Description copied from interface: WindowListener
Invoked when a window is changed from a normal to a minimized state. For many platforms, a minimized window is displayed as the icon specified in the window's iconImage property.

Specified by:
windowIconified in interface WindowListener
See Also:
Frame.setIconImage(java.awt.Image)

windowDeiconified

public void windowDeiconified(WindowEvent e)
Description copied from interface: WindowListener
Invoked when a window is changed from a minimized to a normal state.

Specified by:
windowDeiconified in interface WindowListener

windowActivated

public void windowActivated(WindowEvent e)
Description copied from interface: WindowListener
Invoked when the Window is set to be the active Window. Only a Frame or a Dialog can be the active Window. The native windowing system may denote the active Window or its children with special decorations, such as a highlighted title bar. The active Window is always either the focused Window, or the first Frame or Dialog that is an owner of the focused Window.

Specified by:
windowActivated in interface WindowListener

windowDeactivated

public void windowDeactivated(WindowEvent e)
Description copied from interface: WindowListener
Invoked when a Window is no longer the active Window. Only a Frame or a Dialog can be the active Window. The native windowing system may denote the active Window or its children with special decorations, such as a highlighted title bar. The active Window is always either the focused Window, or the first Frame or Dialog that is an owner of the focused Window.

Specified by:
windowDeactivated in interface WindowListener

windowLostFocus

public void windowLostFocus(WindowEvent e)
Description copied from interface: WindowFocusListener
Invoked when the Window is no longer the focused Window, which means that keyboard events will no longer be delivered to the Window or any of its subcomponents.

Specified by:
windowLostFocus in interface WindowFocusListener

windowGainedFocus

public void windowGainedFocus(WindowEvent e)
Description copied from interface: WindowFocusListener
Invoked when the Window is set to be the focused Window, which means that the Window, or one of its subcomponents, will receive keyboard events.

Specified by:
windowGainedFocus in interface WindowFocusListener