Package org.eclipse.gef.mvc.fx.viewer
Class InfiniteCanvasViewer
java.lang.Object
org.eclipse.gef.mvc.fx.viewer.InfiniteCanvasViewer
- All Implemented Interfaces:
IActivatable,IAdaptable,IAdaptable.Bound<IDomain>,IDisposable,IViewer
The
InfiniteCanvasViewer is an IViewer that manages an
InfiniteCanvas to display the viewer's contents.-
Property Summary
PropertiesTypePropertyDescriptionfinal javafx.beans.property.ReadOnlyBooleanPropertyjavafx.beans.property.ReadOnlyObjectProperty<IDomain>javafx.beans.property.ReadOnlyMapProperty<AdapterKey<?>,Object> javafx.beans.property.ReadOnlyMapProperty<Object,IContentPart<? extends javafx.scene.Node>> Returns an unmodifiable read-only map property that contains the registeredIContentParts mapped to their respective content.javafx.beans.property.ReadOnlyListProperty<Object>A read-only property containing the current content objects.javafx.beans.property.ReadOnlyBooleanPropertyReturns aReadOnlyBooleanPropertythat represents the "focused" state of thisIViewer.javafx.beans.property.ReadOnlyMapProperty<javafx.scene.Node,IVisualPart<? extends javafx.scene.Node>> Returns an unmodifiable read-only map property that contains the registeredIVisualParts mapped to their respective visual. -
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.gef.common.adapt.IAdaptable
IAdaptable.Bound<A extends IAdaptable>Nested classes/interfaces inherited from interface org.eclipse.gef.common.adapt.IAdaptable.Bound
IAdaptable.Bound.Impl<T extends IAdaptable> -
Field Summary
Fields inherited from interface org.eclipse.gef.common.activate.IActivatable
ACTIVE_PROPERTYFields inherited from interface org.eclipse.gef.common.adapt.IAdaptable
ADAPTERS_PROPERTYFields inherited from interface org.eclipse.gef.mvc.fx.viewer.IViewer
CONTENT_PART_MAP_PROPERTY, CONTENTS_PROPERTY, VISUAL_PART_MAP_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidactivate()protected voidActivates the adapters registered at thisInfiniteCanvasViewer.final javafx.beans.property.ReadOnlyBooleanPropertyjavafx.beans.property.ReadOnlyObjectProperty<IDomain>javafx.beans.property.ReadOnlyMapProperty<AdapterKey<?>,Object> javafx.beans.property.ReadOnlyMapProperty<Object,IContentPart<? extends javafx.scene.Node>> Returns an unmodifiable read-only map property that contains the registeredIContentParts mapped to their respective content.javafx.beans.property.ReadOnlyListProperty<Object>A read-only property containing the current content objects.final voidprotected voidDeactivates the adapters registered at thisInfiniteCanvasViewer.voiddispose()protected voidActivates thisInfiniteCanvasViewer, which activates its adapters.protected voidDeactivates thisInfiniteCanvasViewer, which deactivates its adapters.Gets the value of the property adaptable.<T> TgetAdapter(TypeToken<T> key) <T> TgetAdapter(Class<T> classKey) <T> TgetAdapter(AdapterKey<T> key) <T> AdapterKey<T>getAdapterKey(T adapter) javafx.collections.ObservableMap<AdapterKey<?>,Object> Gets the value of the property adapters.<T> Map<AdapterKey<? extends T>,T> getAdapters(TypeToken<? super T> key) <T> Map<AdapterKey<? extends T>,T> getAdapters(Class<? super T> classKey) Returns theInfiniteCanvasthat is managed by thisInfiniteCanvasViewer.Map<Object,IContentPart<? extends javafx.scene.Node>> Returns theMapfor registeringIContentParts by their content.javafx.collections.ObservableList<Object>Gets the value of the property contents.IRootPart<? extends javafx.scene.Node>Returns theIRootPartof this viewer.javafx.scene.ScenegetScene()Map<javafx.scene.Node,IVisualPart<? extends javafx.scene.Node>> Returns theMapfor registeringIVisualParts by their visual.final booleanisActive()Gets the value of the property active.booleanGets the value of the property viewerFocused.voidreveal(IVisualPart<? extends javafx.scene.Node> visualPart) Ensure that the visual of the givenIVisualPartis visible in this viewer.voidsetAdaptable(IDomain domain) Sets the value of the property adaptable.<T> voidsetAdapter(TypeToken<T> adapterType, T adapter) <T> voidsetAdapter(TypeToken<T> adapterType, T adapter, String role) <T> voidsetAdapter(T adapter) <T> voidsetAdapter(T adapter, String role) <T> voidunsetAdapter(T adapter) javafx.beans.property.ReadOnlyBooleanPropertyReturns aReadOnlyBooleanPropertythat represents the "focused" state of thisIViewer.javafx.beans.property.ReadOnlyMapProperty<javafx.scene.Node,IVisualPart<? extends javafx.scene.Node>> Returns an unmodifiable read-only map property that contains the registeredIVisualParts mapped to their respective visual.
-
Property Details
-
active
public final javafx.beans.property.ReadOnlyBooleanProperty activeProperty- Specified by:
activePropertyin interfaceIActivatable- See Also:
-
adaptable
- Specified by:
adaptablePropertyin interfaceIAdaptable.Bound<IDomain>- See Also:
-
adapters
- Specified by:
adaptersPropertyin interfaceIAdaptable- See Also:
-
contentPartMap
public javafx.beans.property.ReadOnlyMapProperty<Object,IContentPart<? extends javafx.scene.Node>> contentPartMapProperty- Specified by:
contentPartMapPropertyin interfaceIViewer- Returns:
- An unmodifiable read-only map property.
- See Also:
-
contents
- Specified by:
contentsPropertyin interfaceIViewer- Returns:
- A read-only list property named
IViewer.CONTENTS_PROPERTY. - See Also:
-
viewerFocused
public javafx.beans.property.ReadOnlyBooleanProperty viewerFocusedProperty- Specified by:
viewerFocusedPropertyin interfaceIViewer- Returns:
- A
ReadOnlyBooleanPropertythat represents the "focused" state of thisIViewer. - See Also:
-
visualPartMap
public javafx.beans.property.ReadOnlyMapProperty<javafx.scene.Node,IVisualPart<? extends javafx.scene.Node>> visualPartMapProperty- Specified by:
visualPartMapPropertyin interfaceIViewer- Returns:
- An unmodifiable read-only map property.
- See Also:
-
-
Constructor Details
-
InfiniteCanvasViewer
public InfiniteCanvasViewer()Creates a newInfiniteCanvasViewer.
-
-
Method Details
-
activate
public final void activate()- Specified by:
activatein interfaceIActivatable
-
activateAdapters
protected void activateAdapters()Activates the adapters registered at thisInfiniteCanvasViewer. -
activeProperty
public final javafx.beans.property.ReadOnlyBooleanProperty activeProperty()- Specified by:
activePropertyin interfaceIActivatable- See Also:
-
adaptableProperty
- Specified by:
adaptablePropertyin interfaceIAdaptable.Bound<IDomain>- See Also:
-
adaptersProperty
- Specified by:
adaptersPropertyin interfaceIAdaptable- See Also:
-
contentPartMapProperty
public javafx.beans.property.ReadOnlyMapProperty<Object,IContentPart<? extends javafx.scene.Node>> contentPartMapProperty()Description copied from interface:IViewerReturns an unmodifiable read-only map property that contains the registeredIContentParts mapped to their respective content.- Specified by:
contentPartMapPropertyin interfaceIViewer- Returns:
- An unmodifiable read-only map property.
- See Also:
-
contentsProperty
Description copied from interface:IViewerA read-only property containing the current content objects.- Specified by:
contentsPropertyin interfaceIViewer- Returns:
- A read-only list property named
IViewer.CONTENTS_PROPERTY. - See Also:
-
deactivate
public final void deactivate()- Specified by:
deactivatein interfaceIActivatable
-
deactivateAdapters
protected void deactivateAdapters()Deactivates the adapters registered at thisInfiniteCanvasViewer. -
dispose
public void dispose()- Specified by:
disposein interfaceIDisposable
-
doActivate
protected void doActivate()Activates thisInfiniteCanvasViewer, which activates its adapters. -
doDeactivate
protected void doDeactivate()Deactivates thisInfiniteCanvasViewer, which deactivates its adapters. -
getAdaptable
Gets the value of the property adaptable.- Specified by:
getAdaptablein interfaceIAdaptable.Bound<IDomain>- Property description:
-
getAdapter
- Specified by:
getAdapterin interfaceIAdaptable
-
getAdapter
- Specified by:
getAdapterin interfaceIAdaptable
-
getAdapter
- Specified by:
getAdapterin interfaceIAdaptable
-
getAdapterKey
- Specified by:
getAdapterKeyin interfaceIAdaptable
-
getAdapters
Gets the value of the property adapters.- Specified by:
getAdaptersin interfaceIAdaptable- Property description:
-
getAdapters
- Specified by:
getAdaptersin interfaceIAdaptable
-
getAdapters
- Specified by:
getAdaptersin interfaceIAdaptable
-
getCanvas
Returns theInfiniteCanvasthat is managed by thisInfiniteCanvasViewer.- Specified by:
getCanvasin interfaceIViewer- Returns:
- The
InfiniteCanvasthat is managed by thisInfiniteCanvasViewer.
-
getContentPartMap
Description copied from interface:IViewerReturns theMapfor registeringIContentParts by their content.- Specified by:
getContentPartMapin interfaceIViewer- Returns:
- The content part map
- See Also:
-
getContents
Gets the value of the property contents.- Specified by:
getContentsin interfaceIViewer- Property description:
- Returns:
- An
ObservableList.
-
getDomain
Description copied from interface:IViewer -
getRootPart
Description copied from interface:IViewerReturns theIRootPartof this viewer. TheIRootPartis a specialIVisualPartthat serves as the parent to all containedIContentParts,IHandleParts, andIFeedbackParts.- Specified by:
getRootPartin interfaceIViewer- Returns:
- The
IRootPartof this viewer.
-
getScene
public javafx.scene.Scene getScene()- Returns:
- The
Scenein which theInfiniteCanvasof thisInfiniteCanvasVieweris displayed.
-
getVisualPartMap
Description copied from interface:IViewerReturns theMapfor registeringIVisualParts 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 anIVisualPart.Note, that when looking up an
IVisualPartfor a given visual in the map, it is required to walk up the visual hierarchy until a registered visual is found, because anIVisualPartonly has to register its "main" visual (i.e. the one returned byIVisualPart.getVisual()) at the visual-part-map, but potential children visuals do not have to be registered.- Specified by:
getVisualPartMapin interfaceIViewer- Returns:
- The visual-to-visual-part map.
- See Also:
-
isActive
public final boolean isActive()Gets the value of the property active.- Specified by:
isActivein interfaceIActivatable- Property description:
-
isViewerFocused
public boolean isViewerFocused()Gets the value of the property viewerFocused.- Specified by:
isViewerFocusedin interfaceIViewer- Property description:
- Returns:
- The value of the property
IViewer.viewerFocusedProperty().
-
reveal
Description copied from interface:IViewerEnsure that the visual of the givenIVisualPartis visible in this viewer.- Specified by:
revealin interfaceIViewer- Parameters:
visualPart- TheIVisualPartthat is to be revealed.
-
setAdaptable
Sets the value of the property adaptable.- Specified by:
setAdaptablein interfaceIAdaptable.Bound<IDomain>- Property description:
-
setAdapter
public <T> void setAdapter(T adapter) - Specified by:
setAdapterin interfaceIAdaptable
-
setAdapter
- Specified by:
setAdapterin interfaceIAdaptable
-
setAdapter
- Specified by:
setAdapterin interfaceIAdaptable
-
setAdapter
- Specified by:
setAdapterin interfaceIAdaptable
-
unsetAdapter
public <T> void unsetAdapter(T adapter) - Specified by:
unsetAdapterin interfaceIAdaptable
-
viewerFocusedProperty
public javafx.beans.property.ReadOnlyBooleanProperty viewerFocusedProperty()Description copied from interface:IViewerReturns aReadOnlyBooleanPropertythat represents the "focused" state of thisIViewer. AnIVieweris focused when its visualization has keyboard focus and its window is active, i.e. it is focused if it will receive keyboard events.- Specified by:
viewerFocusedPropertyin interfaceIViewer- Returns:
- A
ReadOnlyBooleanPropertythat represents the "focused" state of thisIViewer. - See Also:
-
visualPartMapProperty
public javafx.beans.property.ReadOnlyMapProperty<javafx.scene.Node,IVisualPart<? extends javafx.scene.Node>> visualPartMapProperty()Description copied from interface:IViewerReturns an unmodifiable read-only map property that contains the registeredIVisualParts mapped to their respective visual.- Specified by:
visualPartMapPropertyin interfaceIViewer- Returns:
- An unmodifiable read-only map property.
- See Also:
-