public interface IViewer extends IAdaptable, IActivatable, IDisposable, IAdaptable.Bound<IDomain>
IViewer interface specifies all services that a viewer needs to
provide. One application (within one IDomain) can be consisting of
multiple viewers. Each viewer maintains its own getContentPartMap()
and getVisualPartMap() that can be used to navigate from/to content,
controller, and visual objects.InfiniteCanvasViewer should be subclassed.| Type | Property and Description |
|---|---|
ReadOnlyMapProperty<Object,IContentPart<? extends Node>> |
contentPartMap
Returns an unmodifiable read-only map property that contains the
registered
IContentParts mapped to their respective content. |
ReadOnlyListProperty<Object> |
contents
A read-only property containing the current content objects.
|
ReadOnlyBooleanProperty |
viewerFocused
Returns a
ReadOnlyBooleanProperty that represents the "focused"
state of this IViewer. |
ReadOnlyMapProperty<Node,IVisualPart<? extends Node>> |
visualPartMap
Returns an unmodifiable read-only map property that contains the
registered
IVisualParts mapped to their respective visual. |
adaptersactiveadaptableIAdaptable.Bound<A extends IAdaptable>IAdaptable.Bound.Impl<T extends IAdaptable>| Modifier and Type | Field and Description |
|---|---|
static String |
CONTENT_PART_MAP_PROPERTY
Name of the
contentPartMapProperty(). |
static String |
CONTENTS_PROPERTY
Name of the
contentsProperty(). |
static String |
VISUAL_PART_MAP_PROPERTY
Name of the
visualPartMapProperty(). |
ADAPTERS_PROPERTYACTIVE_PROPERTY| Modifier and Type | Method and Description |
|---|---|
ReadOnlyMapProperty<Object,IContentPart<? extends Node>> |
contentPartMapProperty()
Returns an unmodifiable read-only map property that contains the
registered
IContentParts mapped to their respective content. |
ReadOnlyListProperty<Object> |
contentsProperty()
A read-only property containing the current content objects.
|
Parent |
getCanvas()
|
Map<Object,IContentPart<? extends Node>> |
getContentPartMap()
Returns the
Map for registering IContentParts by their
content. |
ObservableList<Object> |
getContents()
Returns an
ObservableList containing the content objects. |
IDomain |
getDomain()
|
IRootPart<? extends Node> |
getRootPart()
Returns the
IRootPart of this viewer. |
Map<Node,IVisualPart<? extends Node>> |
getVisualPartMap()
Returns the
Map for registering IVisualParts by their
visual. |
boolean |
isViewerFocused()
Returns the value of the property
viewerFocusedProperty(). |
void |
reveal(IVisualPart<? extends Node> visualPart)
Ensure that the visual of the given
IVisualPart is visible in
this viewer. |
ReadOnlyBooleanProperty |
viewerFocusedProperty()
Returns a
ReadOnlyBooleanProperty that represents the "focused"
state of this IViewer. |
ReadOnlyMapProperty<Node,IVisualPart<? extends Node>> |
visualPartMapProperty()
Returns an unmodifiable read-only map property that contains the
registered
IVisualParts mapped to their respective visual. |
adaptersProperty, getAdapter, getAdapter, getAdapter, getAdapterKey, getAdapters, getAdapters, getAdapters, setAdapter, setAdapter, setAdapter, setAdapter, unsetAdapteractivate, activeProperty, deactivate, isActivedisposeadaptableProperty, getAdaptable, setAdaptableReadOnlyMapProperty<Object,IContentPart<? extends Node>> contentPartMapProperty
IContentParts mapped to their respective content.getContentPartMap()ReadOnlyListProperty<Object> contentsProperty
getContents()ReadOnlyBooleanProperty viewerFocusedProperty
ReadOnlyBooleanProperty that represents the "focused"
state of this IViewer. An IViewer is focused when its
visualization has keyboard focus and its window is active, i.e. it is
focused if it will receive keyboard events.isViewerFocused()ReadOnlyMapProperty<Node,IVisualPart<? extends Node>> visualPartMapProperty
IVisualParts mapped to their respective visual.getVisualPartMap()static final String CONTENTS_PROPERTY
contentsProperty().static final String CONTENT_PART_MAP_PROPERTY
contentPartMapProperty().static final String VISUAL_PART_MAP_PROPERTY
visualPartMapProperty().ReadOnlyMapProperty<Object,IContentPart<? extends Node>> contentPartMapProperty()
IContentParts mapped to their respective content.getContentPartMap()ReadOnlyListProperty<Object> contentsProperty()
getContents()Map<Object,IContentPart<? extends Node>> getContentPartMap()
Map for registering IContentParts by their
content.ObservableList<Object> getContents()
ObservableList containing the content objects.ObservableList.IDomain getDomain()
IRootPart<? extends Node> getRootPart()
IRootPart of this viewer. The IRootPart is a
special IVisualPart that serves as the parent to all contained
IContentParts, IHandleParts, and IFeedbackParts.IRootPart of this viewer.Map<Node,IVisualPart<? extends Node>> getVisualPartMap()
Map for registering IVisualParts by their
visual. This map is used for hit-testing. Hit testing is performed
by first determining which visual is hit, and then mapping that to an
IVisualPart.
Note, that when looking up an IVisualPart for a given visual in
the map, it is required to walk up the visual hierarchy until a
registered visual is found, because an IVisualPart only has to
register its "main" visual (i.e. the one returned by
IVisualPart.getVisual()) at the visual-part-map, but potential
children visuals do not have to be registered.
boolean isViewerFocused()
viewerFocusedProperty().viewerFocusedProperty().void reveal(IVisualPart<? extends Node> visualPart)
IVisualPart is visible in
this viewer.visualPart - The IVisualPart that is to be revealed.ReadOnlyBooleanProperty viewerFocusedProperty()
ReadOnlyBooleanProperty that represents the "focused"
state of this IViewer. An IViewer is focused when its
visualization has keyboard focus and its window is active, i.e. it is
focused if it will receive keyboard events.isViewerFocused()ReadOnlyMapProperty<Node,IVisualPart<? extends Node>> visualPartMapProperty()
IVisualParts mapped to their respective visual.getVisualPartMap()Copyright (c) 2014, 2016 itemis AG and others. All rights reserved.