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
FieldsModifier and TypeFieldDescriptionprotected List<BiConsumer<javafx.scene.input.MouseEvent, Point>> protected List<BiConsumer<javafx.scene.input.MouseEvent, Point>> protected javafx.scene.Groupprotected FXRenderersFactoryprotected 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
embeddedHandleFields inherited from class org.eclipse.swt.widgets.Widget
handle -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddClickHandler(BiConsumer<javafx.scene.input.MouseEvent, Point> handler) voidaddHoverHandler(BiConsumer<javafx.scene.input.MouseEvent, Point> handler) booleanaddShape(int index, com.amalgamasimulation.animation.shapes.AbstractShape shape) booleanaddShape(com.amalgamasimulation.animation.shapes.AbstractShape shape) doublejavafx.scene.GroupvoidnavigateTo(Point minPoint, Point maxPoint) voidredraw()voidbooleanremoveShape(com.amalgamasimulation.animation.shapes.AbstractShape shape) toCanvasPoint(Point logicalPoint) toLogicalPoint(double canvasX, double canvasY) voidvoidMethods inherited from class javafx.embed.swt.FXCanvas
computeSize, getFXCanvas, getScene, reskin, setSceneMethods inherited from class org.eclipse.swt.widgets.Canvas
drawBackground, getCaret, getIME, scroll, setCaret, setFont, setIMEMethods 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, toStringMethods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBarMethods 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, updateMethods 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
-
Field Details
-
parentGroup
protected javafx.scene.Group parentGroup -
clickHandlers
-
hoverHandlers
-
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, shapesToRenderers? extends javafx.scene.Node>>
-
-
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:
removeShapein interfacecom.amalgamasimulation.animation.AnimationView
-
removeAllShapes
public void removeAllShapes()- Specified by:
removeAllShapesin interfacecom.amalgamasimulation.animation.AnimationView
-
addShape
public boolean addShape(com.amalgamasimulation.animation.shapes.AbstractShape shape) - Specified by:
addShapein interfacecom.amalgamasimulation.animation.AnimationView
-
addShape
public boolean addShape(int index, com.amalgamasimulation.animation.shapes.AbstractShape shape) - Specified by:
addShapein interfacecom.amalgamasimulation.animation.AnimationView
-
addClickHandler
-
addHoverHandler
-
toLogicalPoint
-
toCanvasPoint
-
getCurrentScale
public double getCurrentScale() -
redraw
public void redraw()- Overrides:
redrawin classorg.eclipse.swt.widgets.Control
-
updateView
public void updateView() -
updateContent
public void updateContent()
-