public class InfiniteCanvasViewer extends java.lang.Object implements IViewer
InfiniteCanvasViewer is an IViewer that manages an
InfiniteCanvas to display the viewer's contents.| Type | Property and Description |
|---|---|
javafx.beans.property.ReadOnlyBooleanProperty |
active |
javafx.beans.property.ReadOnlyObjectProperty<IDomain> |
adaptable |
javafx.beans.property.ReadOnlyMapProperty<AdapterKey<?>,java.lang.Object> |
adapters |
javafx.beans.property.ReadOnlyMapProperty<java.lang.Object,IContentPart<? extends javafx.scene.Node>> |
contentPartMap
Returns an unmodifiable read-only map property that contains the
registered
IContentParts mapped to their respective content. |
javafx.beans.property.ReadOnlyListProperty<java.lang.Object> |
contents
A read-only property containing the current content objects.
|
javafx.beans.property.ReadOnlyBooleanProperty |
viewerFocused
Returns a
ReadOnlyBooleanProperty that represents the "focused"
state of this IViewer. |
javafx.beans.property.ReadOnlyMapProperty<javafx.scene.Node,IVisualPart<? extends javafx.scene.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. |
javafx.beans.property.ReadOnlyBooleanProperty |
activeProperty() |
javafx.beans.property.ReadOnlyObjectProperty<IDomain> |
adaptableProperty() |
javafx.beans.property.ReadOnlyMapProperty<AdapterKey<?>,java.lang.Object> |
adaptersProperty() |
javafx.beans.property.ReadOnlyMapProperty<java.lang.Object,IContentPart<? extends javafx.scene.Node>> |
contentPartMapProperty()
Returns an unmodifiable read-only map property that contains the
registered
IContentParts mapped to their respective content. |
javafx.beans.property.ReadOnlyListProperty<java.lang.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(java.lang.Class<T> classKey) |
<T> T |
getAdapter(com.google.common.reflect.TypeToken<T> key) |
<T> AdapterKey<T> |
getAdapterKey(T adapter) |
javafx.collections.ObservableMap<AdapterKey<?>,java.lang.Object> |
getAdapters()
Gets the value of the property adapters.
|
<T> java.util.Map<AdapterKey<? extends T>,T> |
getAdapters(java.lang.Class<? super T> classKey) |
<T> java.util.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 . |
java.util.Map<java.lang.Object,IContentPart<? extends javafx.scene.Node>> |
getContentPartMap()
Returns the
Map for registering IContentParts by their
content. |
javafx.collections.ObservableList<java.lang.Object> |
getContents()
Gets the value of the property contents.
|
IDomain |
getDomain()
|
IRootPart<? extends javafx.scene.Node> |
getRootPart()
Returns the
IRootPart of this viewer. |
javafx.scene.Scene |
getScene()
|
java.util.Map<javafx.scene.Node,IVisualPart<? extends javafx.scene.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 javafx.scene.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,
java.lang.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,
java.lang.String role) |
<T> void |
unsetAdapter(T adapter) |
javafx.beans.property.ReadOnlyBooleanProperty |
viewerFocusedProperty()
Returns a
ReadOnlyBooleanProperty that represents the "focused"
state of this IViewer. |
javafx.beans.property.ReadOnlyMapProperty<javafx.scene.Node,IVisualPart<? extends javafx.scene.Node>> |
visualPartMapProperty()
Returns an unmodifiable read-only map property that contains the
registered
IVisualParts mapped to their respective visual. |
public final javafx.beans.property.ReadOnlyBooleanProperty activeProperty
activeProperty in interface IActivatableisActive()public javafx.beans.property.ReadOnlyObjectProperty<IDomain> adaptableProperty
adaptableProperty in interface IAdaptable.Bound<IDomain>getAdaptable(),
setAdaptable(IDomain)public javafx.beans.property.ReadOnlyMapProperty<AdapterKey<?>,java.lang.Object> adaptersProperty
adaptersProperty in interface IAdaptablegetAdapters()public javafx.beans.property.ReadOnlyMapProperty<java.lang.Object,IContentPart<? extends javafx.scene.Node>> contentPartMapProperty
contentPartMapProperty in interface IViewergetContentPartMap()public javafx.beans.property.ReadOnlyListProperty<java.lang.Object> contentsProperty
contentsProperty in interface IViewerIViewer.CONTENTS_PROPERTY.getContents()public javafx.beans.property.ReadOnlyBooleanProperty viewerFocusedProperty
viewerFocusedProperty in interface IViewerReadOnlyBooleanProperty that represents the "focused"
state of this IViewer.isViewerFocused()public javafx.beans.property.ReadOnlyMapProperty<javafx.scene.Node,IVisualPart<? extends javafx.scene.Node>> visualPartMapProperty
visualPartMapProperty in interface IViewergetVisualPartMap()public InfiniteCanvasViewer()
InfiniteCanvasViewer.public final void activate()
activate in interface IActivatableprotected void activateAdapters()
InfiniteCanvasViewer.public final javafx.beans.property.ReadOnlyBooleanProperty activeProperty()
activeProperty in interface IActivatableisActive()public javafx.beans.property.ReadOnlyObjectProperty<IDomain> adaptableProperty()
adaptableProperty in interface IAdaptable.Bound<IDomain>getAdaptable(),
setAdaptable(IDomain)public javafx.beans.property.ReadOnlyMapProperty<AdapterKey<?>,java.lang.Object> adaptersProperty()
adaptersProperty in interface IAdaptablegetAdapters()public javafx.beans.property.ReadOnlyMapProperty<java.lang.Object,IContentPart<? extends javafx.scene.Node>> contentPartMapProperty()
IViewerIContentParts mapped to their respective content.contentPartMapProperty in interface IViewergetContentPartMap()public javafx.beans.property.ReadOnlyListProperty<java.lang.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(java.lang.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 javafx.collections.ObservableMap<AdapterKey<?>,java.lang.Object> getAdapters()
getAdapters in interface IAdaptablepublic <T> java.util.Map<AdapterKey<? extends T>,T> getAdapters(java.lang.Class<? super T> classKey)
getAdapters in interface IAdaptablepublic <T> java.util.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 java.util.Map<java.lang.Object,IContentPart<? extends javafx.scene.Node>> getContentPartMap()
IViewerMap for registering IContentParts by their
content.getContentPartMap in interface IViewerIViewer.getContentPartMap()public javafx.collections.ObservableList<java.lang.Object> getContents()
getContents in interface IViewerObservableList.public IRootPart<? extends javafx.scene.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 javafx.scene.Scene getScene()
Scene in which the InfiniteCanvas of this
InfiniteCanvasViewer is displayed.public java.util.Map<javafx.scene.Node,IVisualPart<? extends javafx.scene.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 javafx.scene.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,
java.lang.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, java.lang.String role)
setAdapter in interface IAdaptablepublic <T> void unsetAdapter(T adapter)
unsetAdapter in interface IAdaptablepublic javafx.beans.property.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 javafx.beans.property.ReadOnlyMapProperty<javafx.scene.Node,IVisualPart<? extends javafx.scene.Node>> visualPartMapProperty()
IViewerIVisualParts mapped to their respective visual.visualPartMapProperty in interface IViewergetVisualPartMap()Copyright (c) 2014, 2016 itemis AG and others. All rights reserved.