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

public class InfiniteCanvasViewer extends Object implements org.eclipse.gef.mvc.fx.viewer.IViewer
  • Property Details

    • active

      public final javafx.beans.property.ReadOnlyBooleanProperty activeProperty
      Specified by:
      activeProperty in interface org.eclipse.gef.common.activate.IActivatable
      See Also:
    • adaptable

      public javafx.beans.property.ReadOnlyObjectProperty<org.eclipse.gef.mvc.fx.domain.IDomain> adaptableProperty
      Specified by:
      adaptableProperty in interface org.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:
      adaptersProperty in interface org.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:
      contentPartMapProperty in interface org.eclipse.gef.mvc.fx.viewer.IViewer
      See Also:
    • contents

      public javafx.beans.property.ReadOnlyListProperty<Object> contentsProperty
      Specified by:
      contentsProperty in interface org.eclipse.gef.mvc.fx.viewer.IViewer
      See Also:
    • viewerFocused

      public javafx.beans.property.ReadOnlyBooleanProperty viewerFocusedProperty
      Specified by:
      viewerFocusedProperty in interface org.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:
      visualPartMapProperty in interface org.eclipse.gef.mvc.fx.viewer.IViewer
      See Also:
  • Field Details

    • parentGraphicalEditor

      protected GraphicalEditor<?> parentGraphicalEditor
    • crossReferenceAdapter

      protected org.eclipse.emf.ecore.util.ECrossReferenceAdapter crossReferenceAdapter
    • redrawRestrictionManager

      protected com.amalgamasimulation.desktop.binding.RedrawRestrictionManager redrawRestrictionManager
    • transparentFilter

      protected Predicate<Object> transparentFilter
    • visibleFilter

      protected Predicate<Object> visibleFilter
    • showConnectionsObservable

      protected org.eclipse.core.databinding.observable.value.IObservableValue<Boolean> showConnectionsObservable
    • highlightedObjects

      protected Set<Object> highlightedObjects
    • highlightedObjectsColorsMap

      protected Map<Object,javafx.scene.paint.Color> highlightedObjectsColorsMap
    • infiniteCanvas

      protected CustomInfiniteCanvas infiniteCanvas
    • visibilityMultiFilter

      protected Function<List<Object>,List<Object>> 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

      protected javafx.collections.ObservableList<Object> contents
    • contentsProperty

      protected javafx.beans.property.ReadOnlyListWrapper<Object> contentsProperty
    • mouseClickListeners

      protected List<BiConsumer<javafx.scene.input.MouseEvent,Object>> mouseClickListeners
    • objectsSelectionListeners

      protected List<Consumer<List<Object>>> objectsSelectionListeners
    • mouseMoveListeners

      protected List<BiConsumer<Double,Double>> mouseMoveListeners
    • selectedObjects

      protected List<Object> selectedObjects
    • contextMenuHandlers

      protected List<BiConsumer<org.eclipse.swt.widgets.Menu,Object>> contextMenuHandlers
    • statusMessage

      protected String statusMessage
    • objectClickListeners

      @Deprecated protected List<Consumer<Object>> objectClickListeners
      Deprecated.
  • Constructor Details

  • Method Details

    • getHighlightedObjectsColorsMap

      public Map<Object,javafx.scene.paint.Color> getHighlightedObjectsColorsMap()
    • setParentGraphicalEditor

      public void setParentGraphicalEditor(GraphicalEditor<?> parentGraphicalEditor)
    • getParentGraphicalEditor

      public GraphicalEditor<?> 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

      public void setVisibilityMultiFilter(Function<List<Object>,List<Object>> visibilityMultiFilter)
    • updateVisibilityMultiFilter

      public void updateVisibilityMultiFilter()
    • getVisibilityMultiFilter

      public Function<List<Object>,List<Object>> 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

      public void setStatusMessage(String statusMessage)
    • setStatusMessage

      public void setStatusMessage(String statusMessage, double fontSize)
    • setStatusMessage

      public void setStatusMessage(String statusMessage, double fontSize, boolean bold)
    • setStatusMessage

      public void setStatusMessage(String statusMessage, double fontSize, boolean bold, Color statusMessageTextColor)
    • setLegend

      public void setLegend(javafx.scene.Group legend)
    • setStatusMessage

      public void setStatusMessage(String statusMessage, double fontSize, boolean bold, Color statusMessageTextColor, String removeMessage, Color removeMessageTextColor, Runnable removeHandler)
    • getStatusMessage

      public String 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

      public void refreshContentsVisuals(Predicate<Object> filter)
    • 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

      public void optimizeBendpoints(boolean showProgressBar, String resultsDialogTitle, String removedBendpointsText, String remainingBendpointsText)
    • optimizeBendpoints

      public void optimizeBendpoints(boolean showProgressBar, double advancedStraighteningFactor, String resultsDialogTitle, String removedBendpointsText, String remainingBendpointsText)
    • 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

      public void setWaitingForSelection(Predicate<Object> filter)
    • setWaitingForSelection

      public void setWaitingForSelection(Predicate<Object> filter, boolean multiSelection)
    • setWaitingForObjectCreation

      public void setWaitingForObjectCreation(Predicate<Object> transparentFilter, Predicate<Object> visibleFilter)
    • setVisibleFilter

      public void setVisibleFilter(Predicate<Object> visibleFilter)
    • setTransparentFilter

      public void setTransparentFilter(Predicate<Object> filter)
    • setDistanceMeterActive

      public void setDistanceMeterActive()
    • isWaitingForSelection

      public boolean isWaitingForSelection()
    • isWaitingForObjectCreation

      public boolean isWaitingForObjectCreation()
    • isEditing

      public boolean isEditing()
    • isTransparent

      public boolean isTransparent(Object object)
    • isHighlighted

      public boolean isHighlighted(Object object)
    • getHighlightedColor

      public javafx.scene.paint.Color getHighlightedColor(Object object)
    • setHighlight

      public void setHighlight(List<?> objects)
      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

      public void setHighlight(List<?> objects, boolean navigate, boolean zoom)
    • setHighlight

      public void setHighlight(List<?> objects, boolean navigate)
      Clear any previous objects highlighting, then add highlighting to the objects on the canvas.
      Parameters:
      objects - objects to be highlighted
      navigate - if true, then the canvas will be panned and zoomed to focus on the highlighted objects
    • setHighlight

      public void setHighlight(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.
      Parameters:
      objects - objects to be highlighted
      color - highlight color
    • setHighlight

      public void setHighlight(List<?> objects, javafx.scene.paint.Color color, boolean navigate)
    • 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 highlighted
      color - highlight color
      navigate - if true, then the canvas will be panned and zoomed to focus on the highlighted objects
    • addHighlight

      public void addHighlight(List<?> objects)
      Add highlighting to the objects on the canvas, and then - focus on the highlighted objects.
      Parameters:
      objects - objects to be highlighted
    • addHighlight

      public void addHighlight(List<?> objects, boolean navigate)
      Add highlighting to the objects on the canvas.
      Parameters:
      objects - objects to be highlighted
      navigate - if true, then the canvas will be panned and zoomed to focus on the highlighted objects
    • addHighlight

      public void addHighlight(List<?> objects, javafx.scene.paint.Color color)
      Add highlighting to the objects on the canvas, and then - focus on the highlighted objects.
      Parameters:
      objects - objects to be highlighted
      color - highlight color
    • addHighlight

      public void addHighlight(List<?> objects, javafx.scene.paint.Color color, boolean navigate)
    • 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 highlighted
      color - highlight color
      navigate - if true, then the canvas will be panned and zoomed to focus on the highlighted objects
    • addHighlight

      public void addHighlight(HighlightDescriptor highlightDescriptor)
      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

      public void addHighlight(HighlightDescriptor highlightDescriptor, boolean navigate)
      Add highlighting to the objects on the canvas.
      Parameters:
      highlightDescriptor - an object than contains objects to be highlighted and the highlight colors map
      navigate - if true, then the canvas will be panned and zoomed to focus on the highlighted objects
    • addHighlight

      public void addHighlight(List<?> objects, Map<Object,javafx.scene.paint.Color> colorsMap)
      Add highlighting to the objects on the canvas.
      Parameters:
      objects - objects to be highlighted
      colorsMap - highlight colors map
    • addHighlight

      public void addHighlight(List<?> objects, Map<Object,javafx.scene.paint.Color> colorsMap, boolean navigate)
    • 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 highlighted
      colorsMap - highlight colors map
      navigate - 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

      public void select(Object object)
      Show the object in a 'selected' state.
      Parameters:
      object - object to be shown as 'selected' (can be a single object or a list)
    • select

      public void select(List<?> objects)
      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 public void addObjectClickListener(Consumer<Object> listener)
      Deprecated.
    • removeObjectClickListener

      @Deprecated public void removeObjectClickListener(Consumer<Object> listener)
      Deprecated.
    • addMouseClickListener

      public void addMouseClickListener(BiConsumer<javafx.scene.input.MouseEvent,Object> listener)
    • removeMouseClickListener

      public void removeMouseClickListener(BiConsumer<javafx.scene.input.MouseEvent,Object> listener)
    • addObjectsSelectionListener

      public void addObjectsSelectionListener(Consumer<List<Object>> listener)
    • removeObjectsSelectionListener

      public void removeObjectsSelectionListener(Consumer<List<Object>> listener)
    • addMouseMoveListener

      public void addMouseMoveListener(BiConsumer<Double,Double> listener)
    • removeMouseMoveListener

      public void removeMouseMoveListener(BiConsumer<Double,Double> listener)
    • activate

      public final void activate()
      Specified by:
      activate in interface org.eclipse.gef.common.activate.IActivatable
    • activateAdapters

      protected void activateAdapters()
      Activates the adapters registered at this InfiniteCanvasViewer.
    • activeProperty

      public final javafx.beans.property.ReadOnlyBooleanProperty activeProperty()
      Specified by:
      activeProperty in interface org.eclipse.gef.common.activate.IActivatable
      Returns:
      the active property
      See Also:
    • adaptableProperty

      public javafx.beans.property.ReadOnlyObjectProperty<org.eclipse.gef.mvc.fx.domain.IDomain> adaptableProperty()
      Specified by:
      adaptableProperty in interface org.eclipse.gef.common.adapt.IAdaptable.Bound<org.eclipse.gef.mvc.fx.domain.IDomain>
      Returns:
      the adaptable property
      See Also:
    • adaptersProperty

      public javafx.beans.property.ReadOnlyMapProperty<org.eclipse.gef.common.adapt.AdapterKey<?>,Object> adaptersProperty()
      Specified by:
      adaptersProperty in interface org.eclipse.gef.common.adapt.IAdaptable
      Returns:
      the adapters property
      See Also:
    • contentPartMapProperty

      public javafx.beans.property.ReadOnlyMapProperty<Object,org.eclipse.gef.mvc.fx.parts.IContentPart<? extends javafx.scene.Node>> contentPartMapProperty()
      Specified by:
      contentPartMapProperty in interface org.eclipse.gef.mvc.fx.viewer.IViewer
      Returns:
      the contentPartMap property
      See Also:
    • contentsProperty

      public javafx.beans.property.ReadOnlyListProperty<Object> contentsProperty()
      Specified by:
      contentsProperty in interface org.eclipse.gef.mvc.fx.viewer.IViewer
      Returns:
      the contents property
      See Also:
    • deactivate

      public final void deactivate()
      Specified by:
      deactivate in interface org.eclipse.gef.common.activate.IActivatable
    • deactivateAdapters

      protected void deactivateAdapters()
      Deactivates the adapters registered at this InfiniteCanvasViewer.
    • dispose

      public void dispose()
      Specified by:
      dispose in interface org.eclipse.gef.common.dispose.IDisposable
    • doActivate

      protected void doActivate()
      Activates this InfiniteCanvasViewer, which activates its adapters.
    • doDeactivate

      protected void doDeactivate()
      Deactivates this InfiniteCanvasViewer, which deactivates its adapters.
    • getCanvas

      public CustomInfiniteCanvas getCanvas()
      Returns the InfiniteCanvas that is managed by this InfiniteCanvasViewer .
      Specified by:
      getCanvas in interface org.eclipse.gef.mvc.fx.viewer.IViewer
      Returns:
      The InfiniteCanvas that is managed by this InfiniteCanvasViewer .
    • rightButtonMouseClick

      public void rightButtonMouseClick(javafx.scene.input.MouseEvent e, Object selectedObject)
    • 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

      public void onObjectClick(javafx.scene.input.MouseEvent e, Object selectedObject)
    • onObjectsSelection

      public void onObjectsSelection(List<Object> selectedObjects)
    • getSelectedObjects

      public List<Object> getSelectedObjects()
    • getContentPartMap

      public Map<Object,org.eclipse.gef.mvc.fx.parts.IContentPart<? extends javafx.scene.Node>> getContentPartMap()
      Specified by:
      getContentPartMap in interface org.eclipse.gef.mvc.fx.viewer.IViewer
      See Also:
      • IViewer.getContentPartMap()
    • getContents

      public javafx.collections.ObservableList<Object> getContents()
      Gets the value of the contents property.
      Specified by:
      getContents in interface org.eclipse.gef.mvc.fx.viewer.IViewer
      Property description:
      Returns:
      the value of the contents property
      See Also:
    • getDomain

      public org.eclipse.gef.mvc.fx.domain.IDomain getDomain()
      Specified by:
      getDomain in interface org.eclipse.gef.mvc.fx.viewer.IViewer
    • getScene

      public javafx.scene.Scene getScene()
      Returns the Scene in which the InfiniteCanvas of this InfiniteCanvasViewer is displayed.
      Returns:
      The Scene in which the InfiniteCanvas of this InfiniteCanvasViewer is displayed.
    • getVisualPartMap

      public Map<javafx.scene.Node,org.eclipse.gef.mvc.fx.parts.IVisualPart<? extends javafx.scene.Node>> getVisualPartMap()
      Specified by:
      getVisualPartMap in interface org.eclipse.gef.mvc.fx.viewer.IViewer
      See Also:
      • IViewer.getVisualPartMap()
    • isActive

      public final boolean isActive()
      Gets the value of the active property.
      Specified by:
      isActive in interface org.eclipse.gef.common.activate.IActivatable
      Property description:
      Returns:
      the value of the active property
      See Also:
    • isViewerFocused

      public boolean isViewerFocused()
      Gets the value of the viewerFocused property.
      Specified by:
      isViewerFocused in interface org.eclipse.gef.mvc.fx.viewer.IViewer
      Property description:
      Returns:
      the value of the viewerFocused property
      See Also:
    • reveal

      public void reveal(org.eclipse.gef.mvc.fx.parts.IVisualPart<? extends javafx.scene.Node> visualPart)
      Specified by:
      reveal in interface org.eclipse.gef.mvc.fx.viewer.IViewer
    • getAdaptable

      public org.eclipse.gef.mvc.fx.domain.IDomain getAdaptable()
      Gets the value of the adaptable property.
      Specified by:
      getAdaptable in interface org.eclipse.gef.common.adapt.IAdaptable.Bound<org.eclipse.gef.mvc.fx.domain.IDomain>
      Property description:
      Returns:
      the value of the adaptable property
      See Also:
    • getRootPart

      public org.eclipse.gef.mvc.fx.parts.IRootPart<? extends javafx.scene.Node> getRootPart()
      Specified by:
      getRootPart in interface org.eclipse.gef.mvc.fx.viewer.IViewer
    • getAdapter

      public <T> T getAdapter(org.eclipse.gef.common.adapt.AdapterKey<T> key)
      Specified by:
      getAdapter in interface org.eclipse.gef.common.adapt.IAdaptable
    • getAdapter

      public <T> T getAdapter(Class<T> classKey)
      Specified by:
      getAdapter in interface org.eclipse.gef.common.adapt.IAdaptable
    • getAdapter

      public <T> T getAdapter(com.google.common.reflect.TypeToken<T> key)
      Specified by:
      getAdapter in interface org.eclipse.gef.common.adapt.IAdaptable
    • getAdapterKey

      public <T> org.eclipse.gef.common.adapt.AdapterKey<T> getAdapterKey(T adapter)
      Specified by:
      getAdapterKey in interface org.eclipse.gef.common.adapt.IAdaptable
    • getAdapters

      public javafx.collections.ObservableMap<org.eclipse.gef.common.adapt.AdapterKey<?>,Object> getAdapters()
      Gets the value of the adapters property.
      Specified by:
      getAdapters in interface org.eclipse.gef.common.adapt.IAdaptable
      Property description:
      Returns:
      the value of the adapters property
      See Also:
    • getAdapters

      public <T> Map<org.eclipse.gef.common.adapt.AdapterKey<? extends T>,T> getAdapters(Class<? super T> classKey)
      Specified by:
      getAdapters in interface org.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:
      getAdapters in interface org.eclipse.gef.common.adapt.IAdaptable
    • setAdaptable

      public void setAdaptable(org.eclipse.gef.mvc.fx.domain.IDomain domain)
      Sets the value of the adaptable property.
      Specified by:
      setAdaptable in interface org.eclipse.gef.common.adapt.IAdaptable.Bound<org.eclipse.gef.mvc.fx.domain.IDomain>
      Property description:
      Parameters:
      domain - the value for the adaptable property
      See Also:
    • setAdapter

      public <T> void setAdapter(T adapter)
      Specified by:
      setAdapter in interface org.eclipse.gef.common.adapt.IAdaptable
    • setAdapter

      public <T> void setAdapter(T adapter, String role)
      Specified by:
      setAdapter in interface org.eclipse.gef.common.adapt.IAdaptable
    • setAdapter

      public <T> void setAdapter(com.google.common.reflect.TypeToken<T> adapterType, T adapter)
      Specified by:
      setAdapter in interface org.eclipse.gef.common.adapt.IAdaptable
    • setAdapter

      @InjectAdapters public <T> void setAdapter(com.google.common.reflect.TypeToken<T> adapterType, T adapter, String role)
      Specified by:
      setAdapter in interface org.eclipse.gef.common.adapt.IAdaptable
    • unsetAdapter

      public <T> void unsetAdapter(T adapter)
      Specified by:
      unsetAdapter in interface org.eclipse.gef.common.adapt.IAdaptable
    • viewerFocusedProperty

      public javafx.beans.property.ReadOnlyBooleanProperty viewerFocusedProperty()
      Specified by:
      viewerFocusedProperty in interface org.eclipse.gef.mvc.fx.viewer.IViewer
      Returns:
      the viewerFocused property
      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:
      visualPartMapProperty in interface org.eclipse.gef.mvc.fx.viewer.IViewer
      Returns:
      the visualPartMap property
      See Also:
    • setRulersVisible

      public void setRulersVisible(boolean visible)
      Controls the visibility state of rulers and their associated grid within the attached CustomInfiniteCanvas. 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 offset
      • false: 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 false if no canvas is attached
      • Provides accurate state for both rulers and grid

      Return value interpretation:

      • true: Rulers AND grid are currently visible
      • false: 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:
      true if configured as main content viewer, false for 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 true for main editing areas
      • Set to false for 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