public class InfiniteCanvasViewer extends Object implements IViewer
InfiniteCanvasViewer is an IViewer that manages an
InfiniteCanvas to display the viewer's contents.| Type | Property and Description |
|---|---|
ReadOnlyBooleanProperty |
active |
ReadOnlyObjectProperty<IDomain> |
adaptable |
ReadOnlyMapProperty<AdapterKey<?>,Object> |
adapters |
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. |
IAdaptable.Bound<A extends IAdaptable>IAdaptable.Bound.Impl<T extends IAdaptable>CONTENT_PART_MAP_PROPERTY, CONTENTS_PROPERTY, VISUAL_PART_MAP_PROPERTYADAPTERS_PROPERTYACTIVE_PROPERTY| Constructor and Description |
|---|
InfiniteCanvasViewer()
Creates a new
InfiniteCanvasViewer. |
| Modifier and Type | Method and Description |
|---|---|
void |
activate() |
protected void |
activateAdapters()
Activates the adapters registered at this
InfiniteCanvasViewer. |
ReadOnlyBooleanProperty |
activeProperty() |
ReadOnlyObjectProperty<IDomain> |
adaptableProperty() |
ReadOnlyMapProperty<AdapterKey<?>,Object> |
adaptersProperty() |
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.
|
void |
deactivate() |
protected void |
deactivateAdapters()
Deactivates the adapters registered at this
InfiniteCanvasViewer. |
void |
dispose() |
protected void |
doActivate()
Activates this
InfiniteCanvasViewer, which activates its
adapters. |
protected void |
doDeactivate()
Deactivates this
InfiniteCanvasViewer, which deactivates its
adapters. |
IDomain |
getAdaptable()
Gets the value of the property adaptable.
|
<T> T |
getAdapter(AdapterKey<T> key) |
<T> T |
getAdapter(Class<T> classKey) |
<T> T |
getAdapter(com.google.common.reflect.TypeToken<T> key) |
<T> AdapterKey<T> |
getAdapterKey(T adapter) |
ObservableMap<AdapterKey<?>,Object> |
getAdapters()
Gets the value of the property adapters.
|
<T> Map<AdapterKey<? extends T>,T> |
getAdapters(Class<? super T> classKey) |
<T> Map<AdapterKey<? extends T>,T> |
getAdapters(com.google.common.reflect.TypeToken<? super T> key) |
InfiniteCanvas |
getCanvas()
Returns the
InfiniteCanvas that is managed by this
InfiniteCanvasViewer . |
Map<Object,IContentPart<? extends Node>> |
getContentPartMap()
Returns the
Map for registering IContentParts by their
content. |
ObservableList<Object> |
getContents()
Gets the value of the property contents.
|
IDomain |
getDomain()
|
IRootPart<? extends Node> |
getRootPart()
Returns the
IRootPart of this viewer. |
Scene |
getScene()
|
Map<Node,IVisualPart<? extends Node>> |
getVisualPartMap()
Returns the
Map for registering IVisualParts by their
visual. |
boolean |
isActive()
Gets the value of the property active.
|
boolean |
isViewerFocused()
Gets the value of the property viewerFocused.
|
void |
reveal(IVisualPart<? extends Node> visualPart)
Ensure that the visual of the given
IVisualPart is visible in
this viewer. |
void |
setAdaptable(IDomain domain)
Sets the value of the property adaptable.
|
<T> void |
setAdapter(T adapter) |
<T> void |
setAdapter(T adapter,
String role) |
<T> void |
setAdapter(com.google.common.reflect.TypeToken<T> adapterType,
T adapter) |
<T> void |
setAdapter(com.google.common.reflect.TypeToken<T> adapterType,
T adapter,
String role) |
<T> void |
unsetAdapter(T adapter) |
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. |
public final ReadOnlyBooleanProperty activeProperty
activeProperty in interface IActivatableisActive()public ReadOnlyObjectProperty<IDomain> adaptableProperty
adaptableProperty in interface IAdaptable.Bound<IDomain>getAdaptable(),
setAdaptable(IDomain)public ReadOnlyMapProperty<AdapterKey<?>,Object> adaptersProperty
adaptersProperty in interface IAdaptablegetAdapters()public ReadOnlyMapProperty<Object,IContentPart<? extends Node>> contentPartMapProperty
contentPartMapProperty in interface IViewergetContentPartMap()public ReadOnlyListProperty<Object> contentsProperty
contentsProperty in interface IViewerIViewer.CONTENTS_PROPERTY.getContents()public ReadOnlyBooleanProperty viewerFocusedProperty
viewerFocusedProperty in interface IViewerReadOnlyBooleanProperty that represents the "focused"
state of this IViewer.isViewerFocused()public ReadOnlyMapProperty<Node,IVisualPart<? extends Node>> visualPartMapProperty
visualPartMapProperty in interface IViewergetVisualPartMap()public InfiniteCanvasViewer()
InfiniteCanvasViewer.public final void activate()
activate in interface IActivatableprotected void activateAdapters()
InfiniteCanvasViewer.public final ReadOnlyBooleanProperty activeProperty()
activeProperty in interface IActivatableisActive()public ReadOnlyObjectProperty<IDomain> adaptableProperty()
adaptableProperty in interface IAdaptable.Bound<IDomain>getAdaptable(),
setAdaptable(IDomain)public ReadOnlyMapProperty<AdapterKey<?>,Object> adaptersProperty()
adaptersProperty in interface IAdaptablegetAdapters()public ReadOnlyMapProperty<Object,IContentPart<? extends Node>> contentPartMapProperty()
IViewerIContentParts mapped to their respective content.contentPartMapProperty in interface IViewergetContentPartMap()public ReadOnlyListProperty<Object> contentsProperty()
IViewercontentsProperty in interface IViewerIViewer.CONTENTS_PROPERTY.getContents()public final void deactivate()
deactivate in interface IActivatableprotected void deactivateAdapters()
InfiniteCanvasViewer.public void dispose()
dispose in interface IDisposableprotected void doActivate()
InfiniteCanvasViewer, which activates its
adapters.protected void doDeactivate()
InfiniteCanvasViewer, which deactivates its
adapters.public IDomain getAdaptable()
getAdaptable in interface IAdaptable.Bound<IDomain>public <T> T getAdapter(AdapterKey<T> key)
getAdapter in interface IAdaptablepublic <T> T getAdapter(Class<T> classKey)
getAdapter in interface IAdaptablepublic <T> T getAdapter(com.google.common.reflect.TypeToken<T> key)
getAdapter in interface IAdaptablepublic <T> AdapterKey<T> getAdapterKey(T adapter)
getAdapterKey in interface IAdaptablepublic ObservableMap<AdapterKey<?>,Object> getAdapters()
getAdapters in interface IAdaptablepublic <T> Map<AdapterKey<? extends T>,T> getAdapters(Class<? super T> classKey)
getAdapters in interface IAdaptablepublic <T> Map<AdapterKey<? extends T>,T> getAdapters(com.google.common.reflect.TypeToken<? super T> key)
getAdapters in interface IAdaptablepublic InfiniteCanvas getCanvas()
InfiniteCanvas that is managed by this
InfiniteCanvasViewer .getCanvas in interface IViewerInfiniteCanvas that is managed by this
InfiniteCanvasViewer .public Map<Object,IContentPart<? extends Node>> getContentPartMap()
IViewerMap for registering IContentParts by their
content.getContentPartMap in interface IViewerIViewer.getContentPartMap()public ObservableList<Object> getContents()
getContents in interface IViewerObservableList.public IRootPart<? extends Node> getRootPart()
IViewerIRootPart of this viewer. The IRootPart is a
special IVisualPart that serves as the parent to all contained
IContentParts, IHandleParts, and IFeedbackParts.getRootPart in interface IViewerIRootPart of this viewer.public Scene getScene()
Scene in which the InfiniteCanvas of this
InfiniteCanvasViewer is displayed.public Map<Node,IVisualPart<? extends Node>> getVisualPartMap()
IViewerMap 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.
getVisualPartMap in interface IViewerIViewer.getVisualPartMap()public final boolean isActive()
isActive in interface IActivatablepublic boolean isViewerFocused()
isViewerFocused in interface IViewerIViewer.viewerFocusedProperty().public void reveal(IVisualPart<? extends Node> visualPart)
IViewerIVisualPart is visible in
this viewer.reveal in interface IViewervisualPart - The IVisualPart that is to be revealed.public void setAdaptable(IDomain domain)
setAdaptable in interface IAdaptable.Bound<IDomain>public <T> void setAdapter(T adapter)
setAdapter in interface IAdaptablepublic <T> void setAdapter(T adapter,
String role)
setAdapter in interface IAdaptablepublic <T> void setAdapter(com.google.common.reflect.TypeToken<T> adapterType,
T adapter)
setAdapter in interface IAdaptable@InjectAdapters public <T> void setAdapter(com.google.common.reflect.TypeToken<T> adapterType, T adapter, String role)
setAdapter in interface IAdaptablepublic <T> void unsetAdapter(T adapter)
unsetAdapter in interface IAdaptablepublic ReadOnlyBooleanProperty viewerFocusedProperty()
IViewerReadOnlyBooleanProperty 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.viewerFocusedProperty in interface IViewerReadOnlyBooleanProperty that represents the "focused"
state of this IViewer.isViewerFocused()public ReadOnlyMapProperty<Node,IVisualPart<? extends Node>> visualPartMapProperty()
IViewerIVisualParts mapped to their respective visual.visualPartMapProperty in interface IViewergetVisualPartMap()Copyright (c) 2014, 2016 itemis AG and others. All rights reserved.