Package org.eclipse.gef.mvc.fx.models
Class HoverModel
java.lang.Object
org.eclipse.gef.common.adapt.IAdaptable.Bound.Impl<IViewer>
org.eclipse.gef.mvc.fx.models.HoverModel
- All Implemented Interfaces:
IAdaptable.Bound<IViewer>
,IDisposable
The
HoverModel
is used to store the current viewer's mouse hover
target, i.e. the IVisualPart
that is currently under the mouse
cursor.-
Property Summary
TypePropertyDescriptionjavafx.beans.property.ObjectProperty<IContentPart<? extends javafx.scene.Node>>
Returns an object property representing the hover intent part.javafx.beans.property.ObjectProperty<IVisualPart<? extends javafx.scene.Node>>
Returns an object property representing the current hover part.Properties inherited from class org.eclipse.gef.common.adapt.IAdaptable.Bound.Impl
adaptable
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.gef.common.adapt.IAdaptable.Bound
IAdaptable.Bound.Impl<T extends IAdaptable>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
This property stores the intended hoveredstatic final String
This is the name of the property that stores the currently hoveredIVisualPart
. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Sets the hovered part tonull
.void
Sets the intentionally hovered part tonull
.void
dispose()
IVisualPart<? extends javafx.scene.Node>
getHover()
Returns the currently hoveredIVisualPart
ornull
if no visual part is hovered.IContentPart<? extends javafx.scene.Node>
Returns the current hover intentIContentPart
ornull
if no content part is intentionally hovered.javafx.beans.property.ObjectProperty<IContentPart<? extends javafx.scene.Node>>
Returns an object property representing the hover intent part.javafx.beans.property.ObjectProperty<IVisualPart<? extends javafx.scene.Node>>
Returns an object property representing the current hover part.void
setAdaptable
(IViewer adaptable) void
setHover
(IVisualPart<? extends javafx.scene.Node> cp) Sets the hoveredIVisualPart
to the given value.void
setHoverIntent
(IContentPart<? extends javafx.scene.Node> cp) Sets the hover intentIContentPart
to the given value.Methods inherited from class org.eclipse.gef.common.adapt.IAdaptable.Bound.Impl
adaptableProperty, getAdaptable
-
Property Details
-
hoverIntent
public javafx.beans.property.ObjectProperty<IContentPart<? extends javafx.scene.Node>> hoverIntentPropertyReturns an object property representing the hover intent part.- See Also:
-
hover
Returns an object property representing the current hover part.- See Also:
-
-
Field Details
-
HOVER_PROPERTY
This is the name of the property that stores the currently hoveredIVisualPart
.- See Also:
-
HOVER_INTENT_PROPERTY
This property stores the intended hovered- See Also:
-
-
Constructor Details
-
HoverModel
public HoverModel()
-
-
Method Details
-
clearHover
public void clearHover()Sets the hovered part tonull
. -
clearHoverIntent
public void clearHoverIntent()Sets the intentionally hovered part tonull
. -
dispose
public void dispose()- Specified by:
dispose
in interfaceIDisposable
- Since:
- 1.1
-
getHover
Returns the currently hoveredIVisualPart
ornull
if no visual part is hovered.- Returns:
- the currently hovered
IVisualPart
ornull
-
getHoverIntent
Returns the current hover intentIContentPart
ornull
if no content part is intentionally hovered.- Returns:
- The current hover intent
IContentPart
ornull
-
hoverIntentProperty
public javafx.beans.property.ObjectProperty<IContentPart<? extends javafx.scene.Node>> hoverIntentProperty()Returns an object property representing the hover intent part.- See Also:
-
hoverProperty
public javafx.beans.property.ObjectProperty<IVisualPart<? extends javafx.scene.Node>> hoverProperty()Returns an object property representing the current hover part.- See Also:
-
setAdaptable
- Specified by:
setAdaptable
in interfaceIAdaptable.Bound<IViewer>
- Overrides:
setAdaptable
in classIAdaptable.Bound.Impl<IViewer>
-
setHover
Sets the hoveredIVisualPart
to the given value. The given part may benull
in order to unhover.- Parameters:
cp
- hoveredIVisualPart
ornull
-
setHoverIntent
Sets the hover intentIContentPart
to the given value. The given part may benull
to indicate unhovering.- Parameters:
cp
- The hover intentIContentPart
ornull
.
-