public class FXCanvasEx
extends javafx.embed.swt.FXCanvas
FXCanvas
that offers the following additional
capabilities:
GestureEvent
s to JavaFX (the original FXCanvas
simply ignores all those events)FocusListener
s (the original FXCanvas
will forward all focus events to the embedded JavaFX stage), so SWT
FocusListener
will not be notifiedFXCanvasEx
)
Constructor and Description |
---|
FXCanvasEx(Composite parent,
int style)
Creates a new
FXCanvasEx for the given parent and with the given
style. |
Modifier and Type | Method and Description |
---|---|
void |
addFocusListener(FocusListener listener) |
void |
dispose() |
javafx.stage.Window |
getStage()
Returns the stage
Window hold by this FXCanvas . |
void |
removeFocusListener(FocusListener listener) |
void |
setCursor(Cursor cursor) |
void |
setScene(javafx.scene.Scene newScene) |
drawBackground, getCaret, getIME, scroll, setCaret, setFont, setIME
changed, checkSubclass, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar
addControlListener, addDragDetectListener, 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, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, 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
addDisposeListener, addListener, checkWidget, getData, getData, getDisplay, getListeners, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
public FXCanvasEx(Composite parent, int style)
FXCanvasEx
for the given parent and with the given
style.parent
- The Composite
to use as parent.style
- A combination of SWT styles to be applied. Note that the
FXCanvas
constructor will set the
SWT.NO_BACKGROUND
style before passing it to the
Canvas
constructor.public void addFocusListener(FocusListener listener)
addFocusListener
in class Control
public javafx.stage.Window getStage()
Window
hold by this FXCanvas
.Window
.public void removeFocusListener(FocusListener listener)
removeFocusListener
in class Control
public void setScene(javafx.scene.Scene newScene)
setScene
in class javafx.embed.swt.FXCanvas
Copyright (c) 2014 itemis AG and others. All rights reserved.