Eclipse Platform
Release 3.0

org.eclipse.jface.text.source
Class AnnotationBarHoverManager.Closer

java.lang.Object
  extended byorg.eclipse.swt.events.MouseTrackAdapter
      extended byorg.eclipse.jface.text.source.AnnotationBarHoverManager.Closer
All Implemented Interfaces:
AbstractInformationControlManager.IInformationControlCloser, ControlListener, DisposeListener, EventListener, KeyListener, MouseListener, MouseMoveListener, MouseTrackListener, org.eclipse.swt.internal.SWTEventListener
Enclosing class:
AnnotationBarHoverManager

protected class AnnotationBarHoverManager.Closer
extends MouseTrackAdapter
implements AbstractInformationControlManager.IInformationControlCloser, MouseListener, MouseMoveListener, ControlListener, KeyListener, DisposeListener

The information control closer for the hover information. Closes the information control as soon as the mouse pointer leaves the subject area, a mouse button is pressed, the user presses a key, or the subject control is resized or moved.

Since:
3.0

Constructor Summary
AnnotationBarHoverManager.Closer()
          Creates a new information control closer.
 
Method Summary
 void controlMoved(ControlEvent event)
          Sent when the location (x, y) of a control changes relative to its parent (or relative to the display, for Shells).
 void controlResized(ControlEvent event)
          Sent when the size (width, height) of a control changes.
 void keyPressed(KeyEvent event)
          Sent when a key is pressed on the system keyboard.
 void keyReleased(KeyEvent event)
          Sent when a key is released on the system keyboard.
 void mouseDoubleClick(MouseEvent event)
          Sent when a mouse button is pressed twice within the (operating system specified) double click period.
 void mouseDown(MouseEvent event)
          Sent when a mouse button is pressed.
 void mouseExit(MouseEvent event)
          Sent when the mouse pointer passes out of the area of the screen covered by a control.
 void mouseMove(MouseEvent event)
          Sent when the mouse moves.
 void mouseUp(MouseEvent event)
          Sent when a mouse button is released.
 void setInformationControl(IInformationControl control)
          Sets the closer's information control, the one to close if necessary.
 void setSubjectControl(Control control)
          Sets the closer's subject control.
 void start(Rectangle subjectArea)
          Tells this closer to start monitoring the subject and the information control.
 void stop()
          Tells this closer to stop monitoring the subject and the information control.
protected  void stop(boolean delayRestart)
          Stops the information control and if delayRestart is set allows restart only after a certain delay.
 void widgetDisposed(DisposeEvent e)
          Sent when the widget is disposed.
 
Methods inherited from class org.eclipse.swt.events.MouseTrackAdapter
mouseEnter, mouseHover
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationBarHoverManager.Closer

public AnnotationBarHoverManager.Closer()
Creates a new information control closer.

Method Detail

setSubjectControl

public void setSubjectControl(Control control)
Description copied from interface: AbstractInformationControlManager.IInformationControlCloser
Sets the closer's subject control. This is the control that parents the information control and from which the subject of the information to be shown is retrieved.

Must be called before start. May again be called between start and stop.

Specified by:
setSubjectControl in interface AbstractInformationControlManager.IInformationControlCloser
Parameters:
control - the subject control

setInformationControl

public void setInformationControl(IInformationControl control)
Description copied from interface: AbstractInformationControlManager.IInformationControlCloser
Sets the closer's information control, the one to close if necessary.

Must be called before start. May again be called between start and stop.

Specified by:
setInformationControl in interface AbstractInformationControlManager.IInformationControlCloser
Parameters:
control - the information control

start

public void start(Rectangle subjectArea)
Description copied from interface: AbstractInformationControlManager.IInformationControlCloser
Tells this closer to start monitoring the subject and the information control. The presented information is considered valid for the given area of the subject control's display.

Specified by:
start in interface AbstractInformationControlManager.IInformationControlCloser
Parameters:
subjectArea - the area for which the presented information is valid

stop

public void stop()
Description copied from interface: AbstractInformationControlManager.IInformationControlCloser
Tells this closer to stop monitoring the subject and the information control.

Specified by:
stop in interface AbstractInformationControlManager.IInformationControlCloser

stop

protected void stop(boolean delayRestart)
Stops the information control and if delayRestart is set allows restart only after a certain delay.

Parameters:
delayRestart - true if restart should be delayed

mouseMove

public void mouseMove(MouseEvent event)
Description copied from interface: MouseMoveListener
Sent when the mouse moves.

Specified by:
mouseMove in interface MouseMoveListener
Parameters:
event - an event containing information about the mouse move

mouseUp

public void mouseUp(MouseEvent event)
Description copied from interface: MouseListener
Sent when a mouse button is released.

Specified by:
mouseUp in interface MouseListener
Parameters:
event - an event containing information about the mouse button release

mouseDown

public void mouseDown(MouseEvent event)
Description copied from interface: MouseListener
Sent when a mouse button is pressed.

Specified by:
mouseDown in interface MouseListener
Parameters:
event - an event containing information about the mouse button press

mouseDoubleClick

public void mouseDoubleClick(MouseEvent event)
Description copied from interface: MouseListener
Sent when a mouse button is pressed twice within the (operating system specified) double click period.

Specified by:
mouseDoubleClick in interface MouseListener
Parameters:
event - an event containing information about the mouse double click
See Also:
Display.getDoubleClickTime()

mouseExit

public void mouseExit(MouseEvent event)
Description copied from class: MouseTrackAdapter
Sent when the mouse pointer passes out of the area of the screen covered by a control. The default behavior is to do nothing.

Specified by:
mouseExit in interface MouseTrackListener
Overrides:
mouseExit in class MouseTrackAdapter
Parameters:
event - an event containing information about the mouse exit

controlResized

public void controlResized(ControlEvent event)
Description copied from interface: ControlListener
Sent when the size (width, height) of a control changes.

Specified by:
controlResized in interface ControlListener
Parameters:
event - an event containing information about the resize

controlMoved

public void controlMoved(ControlEvent event)
Description copied from interface: ControlListener
Sent when the location (x, y) of a control changes relative to its parent (or relative to the display, for Shells).

Specified by:
controlMoved in interface ControlListener
Parameters:
event - an event containing information about the move

keyReleased

public void keyReleased(KeyEvent event)
Description copied from interface: KeyListener
Sent when a key is released on the system keyboard.

Specified by:
keyReleased in interface KeyListener
Parameters:
event - an event containing information about the key release

keyPressed

public void keyPressed(KeyEvent event)
Description copied from interface: KeyListener
Sent when a key is pressed on the system keyboard.

Specified by:
keyPressed in interface KeyListener
Parameters:
event - an event containing information about the key press

widgetDisposed

public void widgetDisposed(DisposeEvent e)
Description copied from interface: DisposeListener
Sent when the widget is disposed.

Specified by:
widgetDisposed in interface DisposeListener
Parameters:
e - an event containing information about the dispose

Eclipse Platform
Release 3.0

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.