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
TheFocusModel
stores theIContentPart
which 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.String
FOCUS_PROPERTY
TheFocusModel
firesPropertyChangeEvent
s 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 void
dispose()
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 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
-
-
-
-
Field Detail
-
FOCUS_PROPERTY
public static final java.lang.String 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:
setFocus(IContentPart)
, Constant Field Values
-
-
Method Detail
-
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
.- Returns:
- An object property named
FOCUS_PROPERTY
.
-
getFocus
public IContentPart<? extends javafx.scene.Node> getFocus()
Returns theIContentPart
which has keyboard focus, ornull
if noIContentPart
currently has keyboard focus.- Returns:
- the IContentPart which has keyboard focus, or
null
-
setAdaptable
public void setAdaptable(IViewer adaptable)
- Specified by:
setAdaptable
in interfaceIAdaptable.Bound<IViewer>
- Overrides:
setAdaptable
in 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
- TheIContentPart
which should become the new focus part.
-
-