public class FocusModel extends IAdaptable.Bound.Impl<IViewer> implements IDisposable
FocusModel stores the IContentPart which has keyboard
focus. Note that you are responsible for synchronizing keyboard focus with
the model.| Type | Property and Description |
|---|---|
ObjectProperty<IContentPart<? extends Node>> |
focus
Returns an object property providing the currently focused
IContentPart. |
adaptableIAdaptable.Bound.Impl<T extends IAdaptable>| Modifier and Type | Field and Description |
|---|---|
static String |
FOCUS_PROPERTY
The
FocusModel fires PropertyChangeEvents when the
focused part changes. |
| Constructor and Description |
|---|
FocusModel()
Constructs a new
FocusModel. |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose() |
ObjectProperty<IContentPart<? extends Node>> |
focusProperty()
Returns an object property providing the currently focused
IContentPart. |
IContentPart<? extends Node> |
getFocus()
Returns the
IContentPart which has keyboard focus, or
null if no IContentPart currently has keyboard
focus. |
void |
setAdaptable(IViewer adaptable) |
void |
setFocus(IContentPart<? extends Node> focusPart)
Selects the given IContentPart as the focus part.
|
adaptableProperty, getAdaptablepublic ObjectProperty<IContentPart<? extends Node>> focusProperty
IContentPart.getFocus(),
setFocus(IContentPart)public static final String FOCUS_PROPERTY
FocusModel fires PropertyChangeEvents when the
focused part changes. This is the name of the property that is delivered
with the event.setFocus(IContentPart),
Constant Field Valuespublic void dispose()
dispose in interface IDisposablepublic ObjectProperty<IContentPart<? extends Node>> focusProperty()
IContentPart.getFocus(),
setFocus(IContentPart)public IContentPart<? extends Node> getFocus()
IContentPart which has keyboard focus, or
null if no IContentPart currently has keyboard
focus.nullpublic void setAdaptable(IViewer adaptable)
setAdaptable in interface IAdaptable.Bound<IViewer>setAdaptable in class IAdaptable.Bound.Impl<IViewer>public void setFocus(IContentPart<? extends Node> focusPart)
focusPart - The IContentPart which should become the new focus
part.Copyright (c) 2014, 2016 itemis AG and others. All rights reserved.