Package org.eclipse.jface.text
Class AbstractHoverInformationControlManager
- java.lang.Object
-
- org.eclipse.jface.text.AbstractInformationControlManager
-
- org.eclipse.jface.text.AbstractHoverInformationControlManager
-
- Direct Known Subclasses:
AnnotationBarHoverManager
public abstract class AbstractHoverInformationControlManager extends AbstractInformationControlManager
An information control manager that shows information in response to mouse hover events. The mouse hover events are caught by registering aMouseTrackListeneron the manager's subject control. The manager has by default an information control closer that closes the information control as soon as the mouse pointer leaves the subject area, the user presses a key, or the subject control is resized, moved, or deactivated.When being activated by a mouse hover event, the manager disables itself, until the mouse leaves the subject area. Thus, the manager is usually still disabled, when the information control has already been closed by the closer.
- Since:
- 2.0
- See Also:
MouseTrackListener
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jface.text.AbstractInformationControlManager
AbstractInformationControlManager.Anchor, AbstractInformationControlManager.IInformationControlCloser
-
-
Field Summary
-
Fields inherited from class org.eclipse.jface.text.AbstractInformationControlManager
ANCHOR_BOTTOM, ANCHOR_GLOBAL, ANCHOR_LEFT, ANCHOR_RIGHT, ANCHOR_TOP, DEBUG, fDisposed, fInformationControl, fInformationControlCloser, fInformationControlCreator, STORE_LOCATION_X, STORE_LOCATION_Y, STORE_SIZE_HEIGHT, STORE_SIZE_WIDTH
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractHoverInformationControlManager(IInformationControlCreator creator)Creates a new hover information control manager using the given information control creator.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voiddispose()Disposes this manager's information control.protected MouseEventgetHoverEvent()Returns the most recent mouse hover event.protected PointgetHoverEventLocation()Returns the location at which the most recent mouse hover event has been issued.protected intgetHoverEventStateMask()Returns the SWT event state of the most recent mouse hover event.org.eclipse.jface.internal.text.InternalAccessorgetInternalAccessor()Returns an adapter that gives access to internal methods.protected voidhideInformationControl()Hides the information control and stops the information control closer.voidinstall(Control subjectControl)Installs this manager on the given control.voidinstall(Control subjectControl, Control areaControl)Installs this manager on the given subject control.protected voidpresentInformation()Presents the information in the information control or hides the information control if no information should be presented.voidsetEnabled(boolean enabled)Deprecated.visibility will be changed to protected-
Methods inherited from class org.eclipse.jface.text.AbstractInformationControlManager
canClearDataOnHide, computeAvailableArea, computeInformation, computeInformationControlLocation, computeLocation, computeSizeConstraints, computeSizeConstraints, disposeInformationControl, doShowInformation, getInformationControl, getNextFallbackAnchor, getSubjectArea, getSubjectControl, handleInformationControlDisposed, handleSubjectControlDisposed, isEnabled, isTakingFocusWhenVisible, restoreInformationControlBounds, setAnchor, setCloser, setCustomInformationControlCreator, setFallbackAnchors, setInformation, setInformation, setMargins, setRestoreInformationControlBounds, setSizeConstraints, showInformation, showInformationControl, storeInformationControlBounds, takesFocusWhenVisible, updateLocation
-
-
-
-
Constructor Detail
-
AbstractHoverInformationControlManager
protected AbstractHoverInformationControlManager(IInformationControlCreator creator)
Creates a new hover information control manager using the given information control creator. By default aCloserinstance is set as this manager's closer.- Parameters:
creator- the information control creator
-
-
Method Detail
-
hideInformationControl
protected void hideInformationControl()
Description copied from class:AbstractInformationControlManagerHides the information control and stops the information control closer.- Overrides:
hideInformationControlin classAbstractInformationControlManager
-
presentInformation
protected void presentInformation()
Description copied from class:AbstractInformationControlManagerPresents the information in the information control or hides the information control if no information should be presented. The information has previously been set usingsetInformation.This method should only be called from overriding methods or from
setInformation.- Overrides:
presentInformationin classAbstractInformationControlManager
-
setEnabled
@Deprecated public void setEnabled(boolean enabled)
Deprecated.visibility will be changed to protectedSets the enable state of this manager.- Overrides:
setEnabledin classAbstractInformationControlManager- Parameters:
enabled- the enable state
-
dispose
public void dispose()
Disposes this manager's information control.- Overrides:
disposein classAbstractInformationControlManager
-
getHoverEventLocation
protected Point getHoverEventLocation()
Returns the location at which the most recent mouse hover event has been issued.- Returns:
- the location of the most recent mouse hover event
-
getHoverEvent
protected MouseEvent getHoverEvent()
Returns the most recent mouse hover event.- Returns:
- the most recent mouse hover event or
null - Since:
- 3.0
-
getHoverEventStateMask
protected int getHoverEventStateMask()
Returns the SWT event state of the most recent mouse hover event.- Returns:
- the SWT event state of the most recent mouse hover event
-
getInternalAccessor
public org.eclipse.jface.internal.text.InternalAccessor getInternalAccessor()
Returns an adapter that gives access to internal methods.Note: This method is not intended to be referenced or overridden by clients.
- Overrides:
getInternalAccessorin classAbstractInformationControlManager- Returns:
- the replaceable information control accessor
- Since:
- 3.4
- Restriction:
- This method is not intended to be referenced by clients.
- Restriction:
- This method is not intended to be re-implemented or extended by clients.
-
install
public void install(Control subjectControl, Control areaControl)
Installs this manager on the given subject control. The hover control is now taking the role of the subject control. This implementation sets the control also as the information control closer's subject control and automatically enables this manager. The area control typically is the root composite of the display element (e.g. a window or a dialog) the subject control is embedded in. It is needed to correctly close popups when the mouse pointer leaves the popup area.- Parameters:
subjectControl- the subject controlareaControl- the area control- Since:
- 3.11
-
install
public void install(Control subjectControl)
Description copied from class:AbstractInformationControlManagerInstalls this manager on the given control. The control is now taking the role of the subject control. This implementation sets the control also as the information control closer's subject control and automatically enables this manager.- Overrides:
installin classAbstractInformationControlManager- Parameters:
subjectControl- the subject control
-
-