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
public class FocusModel extends IAdaptable.Bound.Impl<IViewer> implements IDisposable
TheFocusModelstores theIContentPartwhich has keyboard focus. Note that you are responsible for synchronizing keyboard focus with the model.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.gef.common.adapt.IAdaptable.Bound
IAdaptable.Bound.Impl<T extends IAdaptable>
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringFOCUS_PROPERTYTheFocusModelfiresPropertyChangeEvents when the focused part changes.
-
Constructor Summary
Constructors Constructor Description FocusModel()Constructs a newFocusModel.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispose()javafx.beans.property.ObjectProperty<IContentPart<? extends javafx.scene.Node>>focusProperty()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
-
-
-
-
Field Detail
-
FOCUS_PROPERTY
public static final java.lang.String FOCUS_PROPERTY
TheFocusModelfiresPropertyChangeEvents when the focused part changes. This is the name of the property that is delivered with the event.- See Also:
setFocus(IContentPart), Constant Field Values
-
-
Method Detail
-
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.- Returns:
- An object property named
FOCUS_PROPERTY.
-
getFocus
public IContentPart<? extends javafx.scene.Node> getFocus()
Returns theIContentPartwhich has keyboard focus, ornullif noIContentPartcurrently has keyboard focus.- Returns:
- the IContentPart which has keyboard focus, or
null
-
setAdaptable
public void setAdaptable(IViewer adaptable)
- Specified by:
setAdaptablein interfaceIAdaptable.Bound<IViewer>- Overrides:
setAdaptablein classIAdaptable.Bound.Impl<IViewer>
-
setFocus
public void setFocus(IContentPart<? extends javafx.scene.Node> focusPart)
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.
-
-