Package org.eclipse.gef.mvc.fx.models
Class FocusModel
java.lang.Object
org.eclipse.gef.common.adapt.IAdaptable.Bound.Impl<IViewer>
org.eclipse.gef.mvc.fx.models.FocusModel
- All Implemented Interfaces:
IAdaptable.Bound<IViewer>
,IDisposable
The
FocusModel
stores the IContentPart
which has keyboard
focus. Note that you are responsible for synchronizing keyboard focus with
the model.-
Property Summary
TypePropertyDescriptionjavafx.beans.property.ObjectProperty<IContentPart<? extends javafx.scene.Node>>
Returns an object property providing the currently focusedIContentPart
.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
TheFocusModel
firesPropertyChangeEvent
s when the focused part changes. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
javafx.beans.property.ObjectProperty<IContentPart<? extends javafx.scene.Node>>
Returns an object property providing the currently focusedIContentPart
.IContentPart<? extends javafx.scene.Node>
getFocus()
Returns theIContentPart
which has keyboard focus, ornull
if noIContentPart
currently has keyboard focus.void
setAdaptable
(IViewer adaptable) void
setFocus
(IContentPart<? extends javafx.scene.Node> focusPart) Selects the given IContentPart as the focus part.Methods inherited from class org.eclipse.gef.common.adapt.IAdaptable.Bound.Impl
adaptableProperty, getAdaptable
-
Property Details
-
focus
public javafx.beans.property.ObjectProperty<IContentPart<? extends javafx.scene.Node>> focusPropertyReturns an object property providing the currently focusedIContentPart
.- See Also:
-
-
Field Details
-
FOCUS_PROPERTY
TheFocusModel
firesPropertyChangeEvent
s when the focused part changes. This is the name of the property that is delivered with the event.- See Also:
-
-
Constructor Details
-
FocusModel
public FocusModel()
-
-
Method Details
-
dispose
public void dispose()- Specified by:
dispose
in interfaceIDisposable
- Since:
- 1.1
-
focusProperty
public javafx.beans.property.ObjectProperty<IContentPart<? extends javafx.scene.Node>> focusProperty()Returns an object property providing the currently focusedIContentPart
.- See Also:
-
getFocus
Returns theIContentPart
which has keyboard focus, ornull
if noIContentPart
currently has keyboard focus.- Returns:
- the IContentPart which has keyboard focus, or
null
-
setAdaptable
- Specified by:
setAdaptable
in interfaceIAdaptable.Bound<IViewer>
- Overrides:
setAdaptable
in classIAdaptable.Bound.Impl<IViewer>
-
setFocus
Selects the given IContentPart as the focus part. Note that setting the focus part does not assign keyboard focus to the part.- Parameters:
focusPart
- TheIContentPart
which should become the new focus part.
-