Class InfiniteCanvasViewer
java.lang.Object
com.amalgamasimulation.graphicaleditor.views.InfiniteCanvasViewer
- All Implemented Interfaces:
org.eclipse.gef.common.activate.IActivatable,org.eclipse.gef.common.adapt.IAdaptable,org.eclipse.gef.common.adapt.IAdaptable.Bound<org.eclipse.gef.mvc.fx.domain.IDomain>,org.eclipse.gef.common.dispose.IDisposable,org.eclipse.gef.mvc.fx.viewer.IViewer
-
Property Summary
PropertiesTypePropertyDescriptionfinal javafx.beans.property.ReadOnlyBooleanPropertyjavafx.beans.property.ReadOnlyObjectProperty<org.eclipse.gef.mvc.fx.domain.IDomain> javafx.beans.property.ReadOnlyMapProperty<org.eclipse.gef.common.adapt.AdapterKey<?>, Object> javafx.beans.property.ReadOnlyMapProperty<Object, org.eclipse.gef.mvc.fx.parts.IContentPart<? extends javafx.scene.Node>> javafx.beans.property.ReadOnlyListProperty<Object> javafx.beans.property.ReadOnlyBooleanPropertyjavafx.beans.property.ReadOnlyMapProperty<javafx.scene.Node, org.eclipse.gef.mvc.fx.parts.IVisualPart<? extends javafx.scene.Node>> -
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.gef.common.adapt.IAdaptable
org.eclipse.gef.common.adapt.IAdaptable.Bound<A extends org.eclipse.gef.common.adapt.IAdaptable>Nested classes/interfaces inherited from interface org.eclipse.gef.common.adapt.IAdaptable.Bound
org.eclipse.gef.common.adapt.IAdaptable.Bound.Impl<T extends org.eclipse.gef.common.adapt.IAdaptable> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected javafx.collections.ObservableList<Object> protected javafx.beans.property.ReadOnlyListWrapper<Object> protected List<BiConsumer<org.eclipse.swt.widgets.Menu, Object>> protected org.eclipse.emf.ecore.util.ECrossReferenceAdapterprotected booleanprotected CustomInfiniteCanvasprotected booleanprotected booleanprotected booleanprotected List<BiConsumer<javafx.scene.input.MouseEvent, Object>> protected List<BiConsumer<Double, Double>> Deprecated.protected GraphicalEditor<?> protected com.amalgamasimulation.desktop.binding.RedrawRestrictionManagerprotected org.eclipse.core.databinding.observable.value.IObservableValue<Boolean> protected booleanprotected Stringprotected javafx.beans.property.ReadOnlyBooleanWrapperFields 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<org.eclipse.gef.mvc.fx.domain.IDomain> javafx.beans.property.ReadOnlyMapProperty<org.eclipse.gef.common.adapt.AdapterKey<?>, Object> voidaddContextMenuHandler(BiConsumer<org.eclipse.swt.widgets.Menu, Object> contextMenuHandler) voidaddHighlight(HighlightDescriptor highlightDescriptor) Add highlighting to the objects on the canvas, and then - focus on the highlighted objects.voidaddHighlight(HighlightDescriptor highlightDescriptor, boolean navigate) Add highlighting to the objects on the canvas.voidaddHighlight(List<?> objects) Add highlighting to the objects on the canvas, and then - focus on the highlighted objects.voidaddHighlight(List<?> objects, boolean navigate) Add highlighting to the objects on the canvas.voidaddHighlight(List<?> objects, Map<Object, javafx.scene.paint.Color> colorsMap) Add highlighting to the objects on the canvas.voidaddHighlight(List<?> objects, Map<Object, javafx.scene.paint.Color> colorsMap, boolean navigate) voidaddHighlight(List<?> objects, Map<Object, javafx.scene.paint.Color> colorsMap, boolean navigate, boolean zoom) Add highlighting to the objects on the canvas.voidaddHighlight(List<?> objects, javafx.scene.paint.Color color) Add highlighting to the objects on the canvas, and then - focus on the highlighted objects.voidaddHighlight(List<?> objects, javafx.scene.paint.Color color, boolean navigate) voidaddHighlight(List<?> objects, javafx.scene.paint.Color color, boolean navigate, boolean zoom) Add highlighting to the objects on the canvas.voidaddMouseClickListener(BiConsumer<javafx.scene.input.MouseEvent, Object> listener) voidaddMouseMoveListener(BiConsumer<Double, Double> listener) voidaddObjectClickListener(Consumer<Object> listener) Deprecated.voidaddObjectsSelectionListener(Consumer<List<Object>> listener) voidvoidjavafx.beans.property.ReadOnlyMapProperty<Object, org.eclipse.gef.mvc.fx.parts.IContentPart<? extends javafx.scene.Node>> javafx.beans.property.ReadOnlyListProperty<Object> final voidprotected voidDeactivates the adapters registered at thisInfiniteCanvasViewer.voidvoiddispose()protected voidActivates thisInfiniteCanvasViewer, which activates its adapters.protected voidDeactivates thisInfiniteCanvasViewer, which deactivates its adapters.voidorg.eclipse.gef.mvc.fx.domain.IDomainGets the value of theadaptableproperty.<T> TgetAdapter(com.google.common.reflect.TypeToken<T> key) <T> TgetAdapter(Class<T> classKey) <T> TgetAdapter(org.eclipse.gef.common.adapt.AdapterKey<T> key) <T> org.eclipse.gef.common.adapt.AdapterKey<T> getAdapterKey(T adapter) javafx.collections.ObservableMap<org.eclipse.gef.common.adapt.AdapterKey<?>, Object> Gets the value of theadaptersproperty.<T> Map<org.eclipse.gef.common.adapt.AdapterKey<? extends T>, T> getAdapters(com.google.common.reflect.TypeToken<? super T> key) <T> Map<org.eclipse.gef.common.adapt.AdapterKey<? extends T>, T> getAdapters(Class<? super T> classKey) Returns theInfiniteCanvasthat is managed by thisInfiniteCanvasViewer.javafx.collections.ObservableList<Object> Gets the value of thecontentsproperty.protected org.eclipse.gef.mvc.fx.handlers.CursorSupportorg.eclipse.gef.mvc.fx.domain.IDomainorg.eclipse.emf.ecore.util.ECrossReferenceAdapterjavafx.scene.paint.ColorgetHighlightedColor(Object object) com.amalgamasimulation.desktop.binding.RedrawRestrictionManagerorg.eclipse.gef.mvc.fx.parts.IRootPart<? extends javafx.scene.Node> javafx.scene.ScenegetScene()org.eclipse.core.databinding.observable.value.IObservableValue<Boolean> Map<javafx.scene.Node, org.eclipse.gef.mvc.fx.parts.IVisualPart<? extends javafx.scene.Node>> final booleanisActive()Gets the value of theactiveproperty.booleanDetermines whether this viewer instance functions as the primary content viewer (as opposed to a palette or auxiliary viewer).booleanbooleanbooleanisHighlighted(Object object) booleanRetrieves the current visibility state of the ruler system.booleanbooleanGets the current visibility state of the tile layerbooleanisTransparent(Object object) booleanGets the value of theviewerFocusedproperty.booleanbooleanvoidmoveDown(double dY) voidmoveLeft(double dX) voidmoveRight(double dX) voidmoveUp(double dY) voidnavigateTo(Object object) Pan and zoom the canvas to focus on the object(s).voidnavigateTo(List<?> objects) Pan and zoom the canvas to focus on the objects.voidnavigateTo(List<?> objects, boolean select) voidnavigateTo(List<?> objects, boolean select, boolean zoom) Pan and zoom the canvas to focus on the objects.voidonObjectClick(javafx.scene.input.MouseEvent e, Object selectedObject) voidonObjectsSelection(List<Object> selectedObjects) voidoptimizeBendpoints(boolean showProgressBar) voidoptimizeBendpoints(boolean showProgressBar, double advancedStraighteningFactor) voidoptimizeBendpoints(boolean showProgressBar, double advancedStraighteningFactor, String resultsDialogTitle, String removedBendpointsText, String remainingBendpointsText) voidoptimizeBendpoints(boolean showProgressBar, String resultsDialogTitle, String removedBendpointsText, String remainingBendpointsText) voidvoidrefreshContentsVisuals(Predicate<Object> filter) voidremoveContextMenuHandler(BiConsumer<org.eclipse.swt.widgets.Menu, Object> contextMenuHandler) voidremoveMouseClickListener(BiConsumer<javafx.scene.input.MouseEvent, Object> listener) voidremoveMouseMoveListener(BiConsumer<Double, Double> listener) voidremoveObjectClickListener(Consumer<Object> listener) Deprecated.voidremoveObjectsSelectionListener(Consumer<List<Object>> listener) voidreveal(org.eclipse.gef.mvc.fx.parts.IVisualPart<? extends javafx.scene.Node> visualPart) voidrightButtonMouseClick(javafx.scene.input.MouseEvent e, Object selectedObject) voidShow the object in a 'selected' state.voidShow the objects in a 'selected' state.voidsetAdaptable(org.eclipse.gef.mvc.fx.domain.IDomain domain) Sets the value of theadaptableproperty.<T> voidsetAdapter(com.google.common.reflect.TypeToken<T> adapterType, T adapter) <T> voidsetAdapter(com.google.common.reflect.TypeToken<T> adapterType, T adapter, String role) <T> voidsetAdapter(T adapter) <T> voidsetAdapter(T adapter, String role) voidsetContentViewer(boolean isContentViewer) Configures the viewer's role as either primary content viewer or auxiliary viewer.voidsetCrossReferenceAdapter(org.eclipse.emf.ecore.util.ECrossReferenceAdapter crossReferenceAdapter) voidvoidsetEditingRestricted(boolean editingRestricted) voidsetHighlight(List<?> objects) Clear any previous objects highlighting, then add highlighting to the objects on the canvas, and then - focus on the highlighted objects.voidsetHighlight(List<?> objects, boolean navigate) Clear any previous objects highlighting, then add highlighting to the objects on the canvas.voidsetHighlight(List<?> objects, boolean navigate, boolean zoom) voidsetHighlight(List<?> objects, javafx.scene.paint.Color color) Clear any previous objects highlighting, then add highlighting to the objects on the canvas, and then - focus on the highlighted objects.voidsetHighlight(List<?> objects, javafx.scene.paint.Color color, boolean navigate) voidsetHighlight(List<?> objects, javafx.scene.paint.Color color, boolean navigate, boolean zoom) Clear any previous objects highlighting, then add highlighting to the objects on the canvas.voidsetLegend(javafx.scene.Group legend) voidvoidsetParentGraphicalEditor(GraphicalEditor<?> parentGraphicalEditor) voidsetRedrawRestrictionManager(com.amalgamasimulation.desktop.binding.RedrawRestrictionManager redrawRestrictionManager) voidsetRulersVisible(boolean visible) Controls the visibility state of rulers and their associated grid within the attachedCustomInfiniteCanvas.voidsetShowConnections(boolean showConnections) voidsetShowMap(boolean showMap) voidsetStatusMessage(String statusMessage) voidsetStatusMessage(String statusMessage, double fontSize) voidsetStatusMessage(String statusMessage, double fontSize, boolean bold) voidsetStatusMessage(String statusMessage, double fontSize, boolean bold, Color statusMessageTextColor) voidsetStatusMessage(String statusMessage, double fontSize, boolean bold, Color statusMessageTextColor, String removeMessage, Color removeMessageTextColor, Runnable removeHandler) voidsetTileLayerShape(com.amalgamasimulation.animation.shapes.shapes2d.GroupShape groupShape) Sets the tile layer content from a GroupShapevoidsetTileLayerVisible(boolean visible) Controls the visibility of the tile layervoidsetTransparentFilter(Predicate<Object> filter) voidvoidsetVisibleFilter(Predicate<Object> visibleFilter) voidsetWaitingForObjectCreation(Predicate<Object> transparentFilter, Predicate<Object> visibleFilter) voidsetWaitingForSelection(Predicate<Object> filter) voidsetWaitingForSelection(Predicate<Object> filter, boolean multiSelection) voidsetZoom(double zoom) <A extends org.eclipse.emf.ecore.EObject,N extends org.eclipse.emf.ecore.EObject>
voidsplitIntersectedArcs(BiPredicate<A, N> canSplitArcByNodePredicate, boolean showProgressBar) <A extends org.eclipse.emf.ecore.EObject,N extends org.eclipse.emf.ecore.EObject>
voidsplitIntersectedArcs(BiPredicate<A, N> canSplitArcByNodePredicate, boolean showProgressBar, String resultsDialogTitle, String splittedArcsText) voidvoidClear any previously added object highlighting.<T> voidunsetAdapter(T adapter) voidupdateMapZoom(int baseMapZoom) voidjavafx.beans.property.ReadOnlyBooleanPropertyjavafx.beans.property.ReadOnlyMapProperty<javafx.scene.Node, org.eclipse.gef.mvc.fx.parts.IVisualPart<? extends javafx.scene.Node>> voidzoomIn()voidzoomOut()
-
Property Details
-
active
public final javafx.beans.property.ReadOnlyBooleanProperty activeProperty- Specified by:
activePropertyin interfaceorg.eclipse.gef.common.activate.IActivatable- See Also:
-
adaptable
public javafx.beans.property.ReadOnlyObjectProperty<org.eclipse.gef.mvc.fx.domain.IDomain> adaptableProperty- Specified by:
adaptablePropertyin interfaceorg.eclipse.gef.common.adapt.IAdaptable.Bound<org.eclipse.gef.mvc.fx.domain.IDomain>- See Also:
-
adapters
public javafx.beans.property.ReadOnlyMapProperty<org.eclipse.gef.common.adapt.AdapterKey<?>,Object> adaptersProperty- Specified by:
adaptersPropertyin interfaceorg.eclipse.gef.common.adapt.IAdaptable- See Also:
-
contentPartMap
public javafx.beans.property.ReadOnlyMapProperty<Object,org.eclipse.gef.mvc.fx.parts.IContentPart<? extends javafx.scene.Node>> contentPartMapProperty- Specified by:
contentPartMapPropertyin interfaceorg.eclipse.gef.mvc.fx.viewer.IViewer- See Also:
-
contents
- Specified by:
contentsPropertyin interfaceorg.eclipse.gef.mvc.fx.viewer.IViewer- See Also:
-
viewerFocused
public javafx.beans.property.ReadOnlyBooleanProperty viewerFocusedProperty- Specified by:
viewerFocusedPropertyin interfaceorg.eclipse.gef.mvc.fx.viewer.IViewer- See Also:
-
visualPartMap
public javafx.beans.property.ReadOnlyMapProperty<javafx.scene.Node,org.eclipse.gef.mvc.fx.parts.IVisualPart<? extends javafx.scene.Node>> visualPartMapProperty- Specified by:
visualPartMapPropertyin interfaceorg.eclipse.gef.mvc.fx.viewer.IViewer- See Also:
-
-
Field Details
-
parentGraphicalEditor
-
crossReferenceAdapter
protected org.eclipse.emf.ecore.util.ECrossReferenceAdapter crossReferenceAdapter -
redrawRestrictionManager
protected com.amalgamasimulation.desktop.binding.RedrawRestrictionManager redrawRestrictionManager -
transparentFilter
-
visibleFilter
-
showConnectionsObservable
protected org.eclipse.core.databinding.observable.value.IObservableValue<Boolean> showConnectionsObservable -
highlightedObjects
-
highlightedObjectsColorsMap
-
infiniteCanvas
-
visibilityMultiFilter
-
showMap
protected boolean showMap -
isInitialized
protected boolean isInitialized -
isWindowFocused
protected boolean isWindowFocused -
isFocusOwnerFocused
protected boolean isFocusOwnerFocused -
editingRestricted
protected boolean editingRestricted -
viewerFocusedProperty
protected javafx.beans.property.ReadOnlyBooleanWrapper viewerFocusedProperty -
contents
-
contentsProperty
-
mouseClickListeners
-
objectsSelectionListeners
-
mouseMoveListeners
-
selectedObjects
-
contextMenuHandlers
-
statusMessage
-
objectClickListeners
Deprecated.
-
-
Constructor Details
-
InfiniteCanvasViewer
public InfiniteCanvasViewer()Creates a newInfiniteCanvasViewer.
-
-
Method Details
-
getHighlightedObjectsColorsMap
-
setParentGraphicalEditor
-
getParentGraphicalEditor
-
setCrossReferenceAdapter
public void setCrossReferenceAdapter(org.eclipse.emf.ecore.util.ECrossReferenceAdapter crossReferenceAdapter) -
setRedrawRestrictionManager
public void setRedrawRestrictionManager(com.amalgamasimulation.desktop.binding.RedrawRestrictionManager redrawRestrictionManager) -
getECrossReferenceAdapter
public org.eclipse.emf.ecore.util.ECrossReferenceAdapter getECrossReferenceAdapter() -
getRedrawRestrictionManager
public com.amalgamasimulation.desktop.binding.RedrawRestrictionManager getRedrawRestrictionManager() -
setVisibilityMultiFilter
-
updateVisibilityMultiFilter
public void updateVisibilityMultiFilter() -
getVisibilityMultiFilter
-
escKeyTyped
public void escKeyTyped() -
zoomIn
public void zoomIn() -
zoomOut
public void zoomOut() -
moveUp
public void moveUp(double dY) -
moveDown
public void moveDown(double dY) -
moveLeft
public void moveLeft(double dX) -
moveRight
public void moveRight(double dX) -
isShowMap
public boolean isShowMap() -
setShowMap
public void setShowMap(boolean showMap) -
setStatusMessage
-
setStatusMessage
-
setStatusMessage
-
setStatusMessage
-
setLegend
public void setLegend(javafx.scene.Group legend) -
setStatusMessage
-
getStatusMessage
-
updateMapZoom
public void updateMapZoom(int baseMapZoom) -
setShowConnections
public void setShowConnections(boolean showConnections) -
getShowConnectionsObservable
public org.eclipse.core.databinding.observable.value.IObservableValue<Boolean> getShowConnectionsObservable() -
setEditingRestricted
public void setEditingRestricted(boolean editingRestricted) -
isEditingRestricted
public boolean isEditingRestricted() -
refreshContentsVisuals
public void refreshContentsVisuals() -
refreshContentsVisuals
-
setMultiSelectionCacheChanged
public void setMultiSelectionCacheChanged() -
blockMultiSelectionBoundsRecalculation
public void blockMultiSelectionBoundsRecalculation() -
unblockMultiSelectionBoundsRecalculation
public void unblockMultiSelectionBoundsRecalculation() -
optimizeBendpoints
public void optimizeBendpoints(boolean showProgressBar) -
optimizeBendpoints
public void optimizeBendpoints(boolean showProgressBar, double advancedStraighteningFactor) -
optimizeBendpoints
-
optimizeBendpoints
-
splitIntersectedArcs
public <A extends org.eclipse.emf.ecore.EObject,N extends org.eclipse.emf.ecore.EObject> void splitIntersectedArcs(BiPredicate<A, N> canSplitArcByNodePredicate, boolean showProgressBar) -
splitIntersectedArcs
public <A extends org.eclipse.emf.ecore.EObject,N extends org.eclipse.emf.ecore.EObject> void splitIntersectedArcs(BiPredicate<A, N> canSplitArcByNodePredicate, boolean showProgressBar, String resultsDialogTitle, String splittedArcsText) -
setWaitingForSelection
-
setWaitingForSelection
-
setWaitingForObjectCreation
-
setVisibleFilter
-
setTransparentFilter
-
setDistanceMeterActive
public void setDistanceMeterActive() -
isWaitingForSelection
public boolean isWaitingForSelection() -
isWaitingForObjectCreation
public boolean isWaitingForObjectCreation() -
isEditing
public boolean isEditing() -
isTransparent
-
isHighlighted
-
getHighlightedColor
-
setHighlight
Clear any previous objects highlighting, then add highlighting to the objects on the canvas, and then - focus on the highlighted objects.- Parameters:
objects- objects to be highlighted
-
setHighlight
-
setHighlight
Clear any previous objects highlighting, then add highlighting to the objects on the canvas.- Parameters:
objects- objects to be highlightednavigate- if true, then the canvas will be panned and zoomed to focus on the highlighted objects
-
setHighlight
Clear any previous objects highlighting, then add highlighting to the objects on the canvas, and then - focus on the highlighted objects.- Parameters:
objects- objects to be highlightedcolor- highlight color
-
setHighlight
-
setHighlight
public void setHighlight(List<?> objects, javafx.scene.paint.Color color, boolean navigate, boolean zoom) Clear any previous objects highlighting, then add highlighting to the objects on the canvas.- Parameters:
objects- objects to be highlightedcolor- highlight colornavigate- if true, then the canvas will be panned and zoomed to focus on the highlighted objects
-
addHighlight
Add highlighting to the objects on the canvas, and then - focus on the highlighted objects.- Parameters:
objects- objects to be highlighted
-
addHighlight
Add highlighting to the objects on the canvas.- Parameters:
objects- objects to be highlightednavigate- if true, then the canvas will be panned and zoomed to focus on the highlighted objects
-
addHighlight
Add highlighting to the objects on the canvas, and then - focus on the highlighted objects.- Parameters:
objects- objects to be highlightedcolor- highlight color
-
addHighlight
-
addHighlight
public void addHighlight(List<?> objects, javafx.scene.paint.Color color, boolean navigate, boolean zoom) Add highlighting to the objects on the canvas.- Parameters:
objects- objects to be highlightedcolor- highlight colornavigate- if true, then the canvas will be panned and zoomed to focus on the highlighted objects
-
addHighlight
Add highlighting to the objects on the canvas, and then - focus on the highlighted objects.- Parameters:
highlightDescriptor- an object than contains objects to be highlighted and the highlight colors map
-
addHighlight
Add highlighting to the objects on the canvas.- Parameters:
highlightDescriptor- an object than contains objects to be highlighted and the highlight colors mapnavigate- if true, then the canvas will be panned and zoomed to focus on the highlighted objects
-
addHighlight
Add highlighting to the objects on the canvas.- Parameters:
objects- objects to be highlightedcolorsMap- highlight colors map
-
addHighlight
-
addHighlight
public void addHighlight(List<?> objects, Map<Object, javafx.scene.paint.Color> colorsMap, boolean navigate, boolean zoom) Add highlighting to the objects on the canvas.- Parameters:
objects- objects to be highlightedcolorsMap- highlight colors mapnavigate- if true, then the canvas will be panned and zoomed to focus on the highlighted objects
-
unhighlightAll
public void unhighlightAll()Clear any previously added object highlighting. -
deselectAll
public void deselectAll() -
adjustWindow
public void adjustWindow() -
select
Show the object in a 'selected' state.- Parameters:
object- object to be shown as 'selected' (can be a single object or a list)
-
select
Show the objects in a 'selected' state.- Parameters:
objects- objects to be shown as 'selected'
-
setZoom
public void setZoom(double zoom) -
getCursorSupport
protected org.eclipse.gef.mvc.fx.handlers.CursorSupport getCursorSupport() -
addObjectClickListener
Deprecated. -
removeObjectClickListener
Deprecated. -
addMouseClickListener
-
removeMouseClickListener
-
addObjectsSelectionListener
-
removeObjectsSelectionListener
-
addMouseMoveListener
-
removeMouseMoveListener
-
activate
public final void activate()- Specified by:
activatein interfaceorg.eclipse.gef.common.activate.IActivatable
-
activateAdapters
protected void activateAdapters()Activates the adapters registered at thisInfiniteCanvasViewer. -
activeProperty
public final javafx.beans.property.ReadOnlyBooleanProperty activeProperty()- Specified by:
activePropertyin interfaceorg.eclipse.gef.common.activate.IActivatable- Returns:
- the
activeproperty - See Also:
-
adaptableProperty
public javafx.beans.property.ReadOnlyObjectProperty<org.eclipse.gef.mvc.fx.domain.IDomain> adaptableProperty()- Specified by:
adaptablePropertyin interfaceorg.eclipse.gef.common.adapt.IAdaptable.Bound<org.eclipse.gef.mvc.fx.domain.IDomain>- Returns:
- the
adaptableproperty - See Also:
-
adaptersProperty
public javafx.beans.property.ReadOnlyMapProperty<org.eclipse.gef.common.adapt.AdapterKey<?>,Object> adaptersProperty()- Specified by:
adaptersPropertyin interfaceorg.eclipse.gef.common.adapt.IAdaptable- Returns:
- the
adaptersproperty - See Also:
-
contentPartMapProperty
public javafx.beans.property.ReadOnlyMapProperty<Object,org.eclipse.gef.mvc.fx.parts.IContentPart<? extends javafx.scene.Node>> contentPartMapProperty()- Specified by:
contentPartMapPropertyin interfaceorg.eclipse.gef.mvc.fx.viewer.IViewer- Returns:
- the
contentPartMapproperty - See Also:
-
contentsProperty
- Specified by:
contentsPropertyin interfaceorg.eclipse.gef.mvc.fx.viewer.IViewer- Returns:
- the
contentsproperty - See Also:
-
deactivate
public final void deactivate()- Specified by:
deactivatein interfaceorg.eclipse.gef.common.activate.IActivatable
-
deactivateAdapters
protected void deactivateAdapters()Deactivates the adapters registered at thisInfiniteCanvasViewer. -
dispose
public void dispose()- Specified by:
disposein interfaceorg.eclipse.gef.common.dispose.IDisposable
-
doActivate
protected void doActivate()Activates thisInfiniteCanvasViewer, which activates its adapters. -
doDeactivate
protected void doDeactivate()Deactivates thisInfiniteCanvasViewer, which deactivates its adapters. -
getCanvas
Returns theInfiniteCanvasthat is managed by thisInfiniteCanvasViewer.- Specified by:
getCanvasin interfaceorg.eclipse.gef.mvc.fx.viewer.IViewer- Returns:
- The
InfiniteCanvasthat is managed by thisInfiniteCanvasViewer.
-
rightButtonMouseClick
-
addContextMenuHandler
public void addContextMenuHandler(BiConsumer<org.eclipse.swt.widgets.Menu, Object> contextMenuHandler) -
removeContextMenuHandler
public void removeContextMenuHandler(BiConsumer<org.eclipse.swt.widgets.Menu, Object> contextMenuHandler) -
onObjectClick
-
onObjectsSelection
-
getSelectedObjects
-
getContentPartMap
public Map<Object,org.eclipse.gef.mvc.fx.parts.IContentPart<? extends javafx.scene.Node>> getContentPartMap()- Specified by:
getContentPartMapin interfaceorg.eclipse.gef.mvc.fx.viewer.IViewer- See Also:
-
getContents
Gets the value of thecontentsproperty.- Specified by:
getContentsin interfaceorg.eclipse.gef.mvc.fx.viewer.IViewer- Property description:
- Returns:
- the value of the
contentsproperty - See Also:
-
getDomain
public org.eclipse.gef.mvc.fx.domain.IDomain getDomain()- Specified by:
getDomainin interfaceorg.eclipse.gef.mvc.fx.viewer.IViewer
-
getScene
public javafx.scene.Scene getScene()- Returns:
- The
Scenein which theInfiniteCanvasof thisInfiniteCanvasVieweris displayed.
-
getVisualPartMap
public Map<javafx.scene.Node,org.eclipse.gef.mvc.fx.parts.IVisualPart<? extends javafx.scene.Node>> getVisualPartMap()- Specified by:
getVisualPartMapin interfaceorg.eclipse.gef.mvc.fx.viewer.IViewer- See Also:
-
isActive
public final boolean isActive()Gets the value of theactiveproperty.- Specified by:
isActivein interfaceorg.eclipse.gef.common.activate.IActivatable- Property description:
- Returns:
- the value of the
activeproperty - See Also:
-
isViewerFocused
public boolean isViewerFocused()Gets the value of theviewerFocusedproperty.- Specified by:
isViewerFocusedin interfaceorg.eclipse.gef.mvc.fx.viewer.IViewer- Property description:
- Returns:
- the value of the
viewerFocusedproperty - See Also:
-
reveal
public void reveal(org.eclipse.gef.mvc.fx.parts.IVisualPart<? extends javafx.scene.Node> visualPart) - Specified by:
revealin interfaceorg.eclipse.gef.mvc.fx.viewer.IViewer
-
getAdaptable
public org.eclipse.gef.mvc.fx.domain.IDomain getAdaptable()Gets the value of theadaptableproperty.- Specified by:
getAdaptablein interfaceorg.eclipse.gef.common.adapt.IAdaptable.Bound<org.eclipse.gef.mvc.fx.domain.IDomain>- Property description:
- Returns:
- the value of the
adaptableproperty - See Also:
-
getRootPart
public org.eclipse.gef.mvc.fx.parts.IRootPart<? extends javafx.scene.Node> getRootPart()- Specified by:
getRootPartin interfaceorg.eclipse.gef.mvc.fx.viewer.IViewer
-
getAdapter
public <T> T getAdapter(org.eclipse.gef.common.adapt.AdapterKey<T> key) - Specified by:
getAdapterin interfaceorg.eclipse.gef.common.adapt.IAdaptable
-
getAdapter
- Specified by:
getAdapterin interfaceorg.eclipse.gef.common.adapt.IAdaptable
-
getAdapter
public <T> T getAdapter(com.google.common.reflect.TypeToken<T> key) - Specified by:
getAdapterin interfaceorg.eclipse.gef.common.adapt.IAdaptable
-
getAdapterKey
public <T> org.eclipse.gef.common.adapt.AdapterKey<T> getAdapterKey(T adapter) - Specified by:
getAdapterKeyin interfaceorg.eclipse.gef.common.adapt.IAdaptable
-
getAdapters
public javafx.collections.ObservableMap<org.eclipse.gef.common.adapt.AdapterKey<?>,Object> getAdapters()Gets the value of theadaptersproperty.- Specified by:
getAdaptersin interfaceorg.eclipse.gef.common.adapt.IAdaptable- Property description:
- Returns:
- the value of the
adaptersproperty - See Also:
-
getAdapters
public <T> Map<org.eclipse.gef.common.adapt.AdapterKey<? extends T>,T> getAdapters(Class<? super T> classKey) - Specified by:
getAdaptersin interfaceorg.eclipse.gef.common.adapt.IAdaptable
-
getAdapters
public <T> Map<org.eclipse.gef.common.adapt.AdapterKey<? extends T>,T> getAdapters(com.google.common.reflect.TypeToken<? super T> key) - Specified by:
getAdaptersin interfaceorg.eclipse.gef.common.adapt.IAdaptable
-
setAdaptable
public void setAdaptable(org.eclipse.gef.mvc.fx.domain.IDomain domain) Sets the value of theadaptableproperty.- Specified by:
setAdaptablein interfaceorg.eclipse.gef.common.adapt.IAdaptable.Bound<org.eclipse.gef.mvc.fx.domain.IDomain>- Property description:
- Parameters:
domain- the value for theadaptableproperty- See Also:
-
setAdapter
public <T> void setAdapter(T adapter) - Specified by:
setAdapterin interfaceorg.eclipse.gef.common.adapt.IAdaptable
-
setAdapter
- Specified by:
setAdapterin interfaceorg.eclipse.gef.common.adapt.IAdaptable
-
setAdapter
public <T> void setAdapter(com.google.common.reflect.TypeToken<T> adapterType, T adapter) - Specified by:
setAdapterin interfaceorg.eclipse.gef.common.adapt.IAdaptable
-
setAdapter
@InjectAdapters public <T> void setAdapter(com.google.common.reflect.TypeToken<T> adapterType, T adapter, String role) - Specified by:
setAdapterin interfaceorg.eclipse.gef.common.adapt.IAdaptable
-
unsetAdapter
public <T> void unsetAdapter(T adapter) - Specified by:
unsetAdapterin interfaceorg.eclipse.gef.common.adapt.IAdaptable
-
viewerFocusedProperty
public javafx.beans.property.ReadOnlyBooleanProperty viewerFocusedProperty()- Specified by:
viewerFocusedPropertyin interfaceorg.eclipse.gef.mvc.fx.viewer.IViewer- Returns:
- the
viewerFocusedproperty - See Also:
-
visualPartMapProperty
public javafx.beans.property.ReadOnlyMapProperty<javafx.scene.Node,org.eclipse.gef.mvc.fx.parts.IVisualPart<? extends javafx.scene.Node>> visualPartMapProperty()- Specified by:
visualPartMapPropertyin interfaceorg.eclipse.gef.mvc.fx.viewer.IViewer- Returns:
- the
visualPartMapproperty - See Also:
-
setRulersVisible
public void setRulersVisible(boolean visible) Controls the visibility state of rulers and their associated grid within the attachedCustomInfiniteCanvas. This method:- Proxies the visibility command to the underlying canvas
- Handles null canvas references gracefully (no-op)
- Synchronizes ruler/grid visibility across components
Behavior when canvas exists:
true: Shows rulers + grid with current offsetfalse: Immediately hides all ruler components
- Parameters:
visible- Desired visibility state for ruler system- See Also:
-
isRulersVisible
public boolean isRulersVisible()Retrieves the current visibility state of the ruler system. This method:- Checks canvas existence before querying state
- Returns
falseif no canvas is attached - Provides accurate state for both rulers and grid
Return value interpretation:
true: Rulers AND grid are currently visiblefalse: Either hidden or no canvas attached
- Returns:
- Actual visibility state of ruler system if canvas exists,
otherwise
false - See Also:
-
isContentViewer
public boolean isContentViewer()Determines whether this viewer instance functions as the primary content viewer (as opposed to a palette or auxiliary viewer). Primary content viewers typically:- Contain editable model content
- Display rulers and navigation controls
- Handle primary editing operations
- Returns:
trueif configured as main content viewer,falsefor palette/auxiliary viewers
-
setContentViewer
public void setContentViewer(boolean isContentViewer) Configures the viewer's role as either primary content viewer or auxiliary viewer. This setting affects:- Ruler and grid visibility defaults
- Edit policy configurations
- Toolbar and menu integrations
- Selection handling behavior
Usage notes:
- Set to
truefor main editing areas - Set to
falsefor palettes, thumbnail views, etc. - Should be configured during viewer initialization
- Parameters:
isContentViewer- New role assignment flag
-
setTileLayerShape
public void setTileLayerShape(com.amalgamasimulation.animation.shapes.shapes2d.GroupShape groupShape) Sets the tile layer content from a GroupShape- Parameters:
groupShape- the shape container to render as the tile layer
-
setTileLayerVisible
public void setTileLayerVisible(boolean visible) Controls the visibility of the tile layer- Parameters:
visible- true to show the tile layer, false to hide
-
isTileLayerVisible
public boolean isTileLayerVisible()Gets the current visibility state of the tile layer- Returns:
- true if the tile layer is visible, false if hidden
-