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
PropertiesTypePropertyDescriptionjavafx.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
FieldsModifier and TypeFieldDescriptionstatic final StringTheFocusModelfiresPropertyChangeEvents when the focused part changes. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()javafx.beans.property.ObjectProperty<IContentPart<? extends javafx.scene.Node>>Returns an object property providing the currently focusedIContentPart.IContentPart<? extends javafx.scene.Node>getFocus()Returns theIContentPartwhich has keyboard focus, ornullif noIContentPartcurrently has keyboard focus.voidsetAdaptable(IViewer adaptable) voidsetFocus(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
TheFocusModelfiresPropertyChangeEvents 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:
disposein 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 theIContentPartwhich has keyboard focus, ornullif noIContentPartcurrently has keyboard focus.- Returns:
- the IContentPart which has keyboard focus, or
null
-
setAdaptable
- Specified by:
setAdaptablein interfaceIAdaptable.Bound<IViewer>- Overrides:
setAdaptablein 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- TheIContentPartwhich should become the new focus part.
-