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
IContentPart s 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
IVisualPart s 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_PROPERTY
ADAPTERS_PROPERTY
ACTIVE_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
IContentPart s 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(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(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 IContentPart s 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 IVisualPart s 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(TypeToken<T> adapterType,
T adapter) |
<T> void |
setAdapter(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
IVisualPart s mapped to their respective visual. |
public final javafx.beans.property.ReadOnlyBooleanProperty activeProperty
activeProperty
in interface IActivatable
isActive()
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 IAdaptable
getAdapters()
public javafx.beans.property.ReadOnlyMapProperty<java.lang.Object,IContentPart<? extends javafx.scene.Node>> contentPartMapProperty
contentPartMapProperty
in interface IViewer
getContentPartMap()
public javafx.beans.property.ReadOnlyListProperty<java.lang.Object> contentsProperty
contentsProperty
in interface IViewer
IViewer.CONTENTS_PROPERTY
.getContents()
public javafx.beans.property.ReadOnlyBooleanProperty viewerFocusedProperty
viewerFocusedProperty
in interface IViewer
ReadOnlyBooleanProperty
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 IViewer
getVisualPartMap()
public InfiniteCanvasViewer()
InfiniteCanvasViewer
.public final void activate()
activate
in interface IActivatable
protected void activateAdapters()
InfiniteCanvasViewer
.public final javafx.beans.property.ReadOnlyBooleanProperty activeProperty()
activeProperty
in interface IActivatable
isActive()
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 IAdaptable
getAdapters()
public javafx.beans.property.ReadOnlyMapProperty<java.lang.Object,IContentPart<? extends javafx.scene.Node>> contentPartMapProperty()
IViewer
IContentPart
s mapped to their respective content.contentPartMapProperty
in interface IViewer
getContentPartMap()
public javafx.beans.property.ReadOnlyListProperty<java.lang.Object> contentsProperty()
IViewer
contentsProperty
in interface IViewer
IViewer.CONTENTS_PROPERTY
.getContents()
public final void deactivate()
deactivate
in interface IActivatable
protected void deactivateAdapters()
InfiniteCanvasViewer
.public void dispose()
dispose
in interface IDisposable
protected 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 IAdaptable
public <T> T getAdapter(java.lang.Class<T> classKey)
getAdapter
in interface IAdaptable
public <T> T getAdapter(TypeToken<T> key)
getAdapter
in interface IAdaptable
public <T> AdapterKey<T> getAdapterKey(T adapter)
getAdapterKey
in interface IAdaptable
public javafx.collections.ObservableMap<AdapterKey<?>,java.lang.Object> getAdapters()
getAdapters
in interface IAdaptable
public <T> java.util.Map<AdapterKey<? extends T>,T> getAdapters(java.lang.Class<? super T> classKey)
getAdapters
in interface IAdaptable
public <T> java.util.Map<AdapterKey<? extends T>,T> getAdapters(TypeToken<? super T> key)
getAdapters
in interface IAdaptable
public InfiniteCanvas getCanvas()
InfiniteCanvas
that is managed by this
InfiniteCanvasViewer
.getCanvas
in interface IViewer
InfiniteCanvas
that is managed by this
InfiniteCanvasViewer
.public java.util.Map<java.lang.Object,IContentPart<? extends javafx.scene.Node>> getContentPartMap()
IViewer
Map
for registering IContentPart
s by their
content.getContentPartMap
in interface IViewer
IViewer.getContentPartMap()
public javafx.collections.ObservableList<java.lang.Object> getContents()
getContents
in interface IViewer
ObservableList
.public IRootPart<? extends javafx.scene.Node> getRootPart()
IViewer
IRootPart
of this viewer. The IRootPart
is a
special IVisualPart
that serves as the parent to all contained
IContentPart
s, IHandlePart
s, and IFeedbackPart
s.getRootPart
in interface IViewer
IRootPart
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()
IViewer
Map
for registering IVisualPart
s 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 IViewer
IViewer.getVisualPartMap()
public final boolean isActive()
isActive
in interface IActivatable
public boolean isViewerFocused()
isViewerFocused
in interface IViewer
IViewer.viewerFocusedProperty()
.public void reveal(IVisualPart<? extends javafx.scene.Node> visualPart)
IViewer
IVisualPart
is visible in
this viewer.reveal
in interface IViewer
visualPart
- 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 IAdaptable
public <T> void setAdapter(T adapter, java.lang.String role)
setAdapter
in interface IAdaptable
public <T> void setAdapter(TypeToken<T> adapterType, T adapter)
setAdapter
in interface IAdaptable
@InjectAdapters public <T> void setAdapter(TypeToken<T> adapterType, T adapter, java.lang.String role)
setAdapter
in interface IAdaptable
public <T> void unsetAdapter(T adapter)
unsetAdapter
in interface IAdaptable
public javafx.beans.property.ReadOnlyBooleanProperty viewerFocusedProperty()
IViewer
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.viewerFocusedProperty
in interface IViewer
ReadOnlyBooleanProperty
that represents the "focused"
state of this IViewer
.isViewerFocused()
public javafx.beans.property.ReadOnlyMapProperty<javafx.scene.Node,IVisualPart<? extends javafx.scene.Node>> visualPartMapProperty()
IViewer
IVisualPart
s mapped to their respective visual.visualPartMapProperty
in interface IViewer
getVisualPartMap()
Copyright (c) 2014, 2016 itemis AG and others. All rights reserved.