Class FX2DAnimationView

java.lang.Object
org.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Control
org.eclipse.swt.widgets.Scrollable
org.eclipse.swt.widgets.Composite
org.eclipse.swt.widgets.Canvas
javafx.embed.swt.FXCanvas
com.amalgamasimulation.animation.fx.FX2DAnimationView
All Implemented Interfaces:
com.amalgamasimulation.animation.AnimationView, org.eclipse.swt.graphics.Drawable
Direct Known Subclasses:
FX2DSimulationView

public class FX2DAnimationView extends javafx.embed.swt.FXCanvas implements com.amalgamasimulation.animation.AnimationView
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected List<BiConsumer<javafx.scene.input.MouseEvent,Point>>
     
    protected List<BiConsumer<javafx.scene.input.MouseEvent,Point>>
     
    protected javafx.scene.Group
     
     
    protected List<com.amalgamasimulation.animation.fx.FXRenderer<? extends com.amalgamasimulation.animation.shapes.AbstractShape,? extends javafx.scene.Node>>
     
    protected Map<com.amalgamasimulation.animation.shapes.AbstractShape,com.amalgamasimulation.animation.fx.FXRenderer<? extends com.amalgamasimulation.animation.shapes.AbstractShape,? extends javafx.scene.Node>>
     

    Fields inherited from class org.eclipse.swt.widgets.Composite

    embeddedHandle

    Fields inherited from class org.eclipse.swt.widgets.Widget

    handle
  • Constructor Summary

    Constructors
    Constructor
    Description
    FX2DAnimationView(org.eclipse.swt.widgets.Composite parent)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addClickHandler(BiConsumer<javafx.scene.input.MouseEvent,Point> handler)
     
    void
    addHoverHandler(BiConsumer<javafx.scene.input.MouseEvent,Point> handler)
     
    boolean
    addShape(int index, com.amalgamasimulation.animation.shapes.AbstractShape shape)
     
    boolean
    addShape(com.amalgamasimulation.animation.shapes.AbstractShape shape)
     
    double
     
    javafx.scene.Group
     
    void
    navigateTo(Point minPoint, Point maxPoint)
     
    void
     
    void
     
    boolean
    removeShape(com.amalgamasimulation.animation.shapes.AbstractShape shape)
     
    toCanvasPoint(Point logicalPoint)
     
    toLogicalPoint(double canvasX, double canvasY)
     
    void
     
    void
     

    Methods inherited from class javafx.embed.swt.FXCanvas

    computeSize, getFXCanvas, getScene, reskin, setScene

    Methods inherited from class org.eclipse.swt.widgets.Canvas

    drawBackground, getCaret, getIME, scroll, setCaret, setFont, setIME

    Methods inherited from class org.eclipse.swt.widgets.Composite

    changed, checkSubclass, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList, toString

    Methods inherited from class org.eclipse.swt.widgets.Scrollable

    computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar

    Methods inherited from class org.eclipse.swt.widgets.Control

    addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isAutoScalable, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update

    Methods inherited from class org.eclipse.swt.widgets.Widget

    addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • parentGroup

      protected javafx.scene.Group parentGroup
    • clickHandlers

      protected List<BiConsumer<javafx.scene.input.MouseEvent,Point>> clickHandlers
    • hoverHandlers

      protected List<BiConsumer<javafx.scene.input.MouseEvent,Point>> hoverHandlers
    • rederersFactory

      protected FXRenderersFactory rederersFactory
    • renderers

      protected List<com.amalgamasimulation.animation.fx.FXRenderer<? extends com.amalgamasimulation.animation.shapes.AbstractShape,? extends javafx.scene.Node>> renderers
    • shapesToRenderers

      protected Map<com.amalgamasimulation.animation.shapes.AbstractShape,com.amalgamasimulation.animation.fx.FXRenderer<? extends com.amalgamasimulation.animation.shapes.AbstractShape,? extends javafx.scene.Node>> shapesToRenderers
  • Constructor Details

    • FX2DAnimationView

      public FX2DAnimationView(org.eclipse.swt.widgets.Composite parent)
  • Method Details

    • getParentGroup

      public javafx.scene.Group getParentGroup()
    • removeShape

      public boolean removeShape(com.amalgamasimulation.animation.shapes.AbstractShape shape)
      Specified by:
      removeShape in interface com.amalgamasimulation.animation.AnimationView
    • removeAllShapes

      public void removeAllShapes()
      Specified by:
      removeAllShapes in interface com.amalgamasimulation.animation.AnimationView
    • addShape

      public boolean addShape(com.amalgamasimulation.animation.shapes.AbstractShape shape)
      Specified by:
      addShape in interface com.amalgamasimulation.animation.AnimationView
    • addShape

      public boolean addShape(int index, com.amalgamasimulation.animation.shapes.AbstractShape shape)
      Specified by:
      addShape in interface com.amalgamasimulation.animation.AnimationView
    • addClickHandler

      public void addClickHandler(BiConsumer<javafx.scene.input.MouseEvent,Point> handler)
    • addHoverHandler

      public void addHoverHandler(BiConsumer<javafx.scene.input.MouseEvent,Point> handler)
    • toLogicalPoint

      public Point toLogicalPoint(double canvasX, double canvasY)
    • toCanvasPoint

      public Point toCanvasPoint(Point logicalPoint)
    • getCurrentScale

      public double getCurrentScale()
    • redraw

      public void redraw()
      Overrides:
      redraw in class org.eclipse.swt.widgets.Control
    • updateView

      public void updateView()
    • updateContent

      public void updateContent()