T - The SWT Control class which is wrapped by this
FXControlAdapter.public class FXControlAdapter<T extends Control> extends Region
background, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, widthimpl_traversalEngine, needsLayoutaccessibleHelp, accessibleRoleDescription, accessibleRole, accessibleText, blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effectiveNodeOrientation, effect, eventDispatcher, focused, focusTraversable, hover, id, impl_showMnemonics, impl_treeVisible, inputMethodRequests, layoutBounds, layoutX, layoutY, localToParentTransform, localToSceneTransform, managed, mouseTransparent, nodeOrientation, onContextMenuRequested, onDragDetected, onDragDone, onDragDropped, onDragEntered, onDragExited, onDragOver, onInputMethodTextChanged, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragEntered, onMouseDragExited, onMouseDragged, onMouseDragOver, onMouseDragReleased, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onRotate, onRotationFinished, onRotationStarted, onScrollFinished, onScroll, onScrollStarted, onSwipeDown, onSwipeLeft, onSwipeRight, onSwipeUp, onTouchMoved, onTouchPressed, onTouchReleased, onTouchStationary, onZoomFinished, onZoom, onZoomStarted, opacity, parent, pickOnBounds, pressed, rotate, rotationAxis, scaleX, scaleY, scaleZ, scene, style, translateX, translateY, translateZ, visible| Modifier and Type | Class and Description |
|---|---|
static interface |
FXControlAdapter.IControlFactory<T extends Control>
The
FXControlAdapter.IControlFactory can be used in conjunction
with FXControlAdapter to create the wrapped SWT Control
when the surrounding FXCanvas changes. |
USE_COMPUTED_SIZE, USE_PREF_SIZEBASELINE_OFFSET_SAME_AS_HEIGHT| Constructor and Description |
|---|
FXControlAdapter(FXControlAdapter.IControlFactory<T> controlFactory)
Creates a new
FXControlAdapter which uses the given
FXControlAdapter.IControlFactory for the creation of the SWT Control. |
FXControlAdapter(T control)
Creates a new
FXControlAdapter which wraps the given SWT
Control. |
| Modifier and Type | Method and Description |
|---|---|
protected double |
computeMaxHeight(double width) |
protected double |
computeMaxWidth(double height) |
protected double |
computeMinHeight(double width) |
protected double |
computeMinWidth(double height) |
protected double |
computePrefHeight(double width) |
protected double |
computePrefWidth(double height) |
void |
dispose()
Deactivates this
FXControlAdapter, so that the SWT
Control will not be re-created when the FXCanvas changes. |
protected ObservableList<Node> |
getChildren()
We do not manage children.
|
T |
getControl()
Returns the SWT
Control that is wrapped by this
FXControlAdapter. |
protected FXCanvas |
getFXCanvas(Control control)
|
protected FXCanvas |
getFXCanvas(Node node)
|
protected void |
hookControl(T control)
Hooks the given
Control into the JavaFX scene graph, for example,
registering event forwarding from SWT to JavaFX. |
protected void |
init()
Initializes this
FXControlAdapter. |
protected void |
registerListeners()
Registers JavaFX listeners for forwarding JavaFX state to SWT.
|
protected void |
registerSwtToFXEventForwarders(FXCanvas newCanvas)
Registers SWT to JavaFX event forwarders for the given
FXCanvas. |
void |
relocate(double paramDouble1,
double paramDouble2) |
void |
resize(double width,
double height) |
protected void |
setCanvas(FXCanvas newCanvas)
|
protected void |
setControl(T control)
Sets the
Control of this FXControlAdapter to the given
value and hooks or
unhooks the Control,
respectively. |
protected void |
unhookControl(T control)
Unhooks the given
Control from the JavaFX scene graph, for
example, unregistering event forwarding from SWT to JavaFX. |
protected void |
unregisterListeners()
Unregisters the listeners which have previously been registered during
registerListeners(). |
protected void |
unregisterSwtToFXEventForwarders()
Unregisters the event forwarders which have previously been registered
during
registerSwtToFXEventForwarders(FXCanvas). |
void |
updateSwtBounds()
|
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, getBackground, getBorder, getClassCssMetaData, getCssMetaData, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getUserAgentStylesheet, getWidth, heightProperty, impl_computeContains, impl_computeGeomBounds, impl_computeLayoutBounds, impl_createPeer, impl_notifyLayoutBoundsChanged, impl_pickNodeLocal, impl_updatePeer, insetsProperty, isCacheShape, isCenterShape, isResizable, isScaleShape, isSnapToPixel, layoutInArea, layoutInArea, layoutInArea, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setHeight, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, setWidth, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapSize, snapSpace, snapToPixelProperty, widthPropertygetBaselineOffset, getChildrenUnmodifiable, getImpl_traversalEngine, getManagedChildren, getStylesheets, impl_getAllParentStylesheets, impl_processCSS, impl_processMXNode, impl_traversalEngineProperty, isNeedsLayout, layout, layoutChildren, lookup, needsLayoutProperty, queryAccessibleAttribute, requestLayout, requestParentLayout, setImpl_traversalEngine, setNeedsLayout, updateBoundsaccessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, containsBounds, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, executeAccessibleAction, fireEvent, focusedProperty, focusTraversableProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, hasProperties, hoverProperty, idProperty, impl_clearDirty, impl_computeIntersects, impl_cssGetCursorInitialValue, impl_cssGetFocusTraversableInitialValue, impl_findStyles, impl_geomChanged, impl_getLeafTransform, impl_getMatchingStyles, impl_getPeer, impl_getPivotX, impl_getPivotY, impl_getPivotZ, impl_getStyleMap, impl_hasTransforms, impl_intersects, impl_intersectsBounds, impl_isDirty, impl_isDirtyEmpty, impl_isShowMnemonics, impl_isTreeVisible, impl_layoutBoundsChanged, impl_markDirty, impl_pickNode, impl_processCSS, impl_reapplyCSS, impl_setShowMnemonics, impl_setStyleMap, impl_showMnemonicsProperty, impl_syncPeer, impl_transformsChanged, impl_traverse, impl_treeVisibleProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookupAll, managedProperty, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, removeEventFilter, removeEventHandler, requestFocus, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, visiblePropertypublic FXControlAdapter(FXControlAdapter.IControlFactory<T> controlFactory)
FXControlAdapter which uses the given
FXControlAdapter.IControlFactory for the creation of the SWT Control.controlFactory - The FXControlAdapter.IControlFactory to use to create the SWT
Control.public FXControlAdapter(T control)
FXControlAdapter which wraps the given SWT
Control.control - The SWT Control to wrap in this
FXControlAdapter.protected double computeMaxHeight(double width)
computeMaxHeight in class Regionprotected double computeMaxWidth(double height)
computeMaxWidth in class Regionprotected double computeMinHeight(double width)
computeMinHeight in class Regionprotected double computeMinWidth(double height)
computeMinWidth in class Regionprotected double computePrefHeight(double width)
computePrefHeight in class Regionprotected double computePrefWidth(double height)
computePrefWidth in class Regionpublic void dispose()
FXControlAdapter, so that the SWT
Control will not be re-created when the FXCanvas changes.protected ObservableList<Node> getChildren()
getChildren in class Parentpublic T getControl()
Control that is wrapped by this
FXControlAdapter.Control that is wrapped by this
FXControlAdapter.protected void hookControl(T control)
Control into the JavaFX scene graph, for example,
registering event forwarding from SWT to JavaFX.control - The Control which is wrapped by this
FXControlAdapter.registerSwtToFXEventForwarders(FXCanvas)protected void init()
FXControlAdapter. Per default, this
FXControlAdapter is added to the focus traversal cycle and JavaFX
listeners are registered for forwarding JavaFX state to SWT.registerListeners()protected void registerListeners()
Scene changes which
will then hook the SWT Control to the FXCanvas of the new
Scene.unregisterListeners(),
setCanvas(FXCanvas)protected void registerSwtToFXEventForwarders(FXCanvas newCanvas)
FXCanvas.newCanvas - The FXCanvas for which event forwarding is registered.unregisterSwtToFXEventForwarders()public void relocate(double paramDouble1,
double paramDouble2)
protected void setCanvas(FXCanvas newCanvas)
FXCanvas in which the Control is hooked. An
FXControlAdapter.IControlFactory has to be available for re-creating the
Control within the new FXCanvas, otherwise an exception
is thrown.newCanvas - The new FXCanvas for the Control.IllegalArgumentException - when the FXCanvas is changed, but no
FXControlAdapter.IControlFactory is available.setControl(Control)protected void setControl(T control)
Control of this FXControlAdapter to the given
value and hooks or
unhooks the Control,
respectively.control - The new Control for this FXControlAdapter.hookControl(Control),
unhookControl(Control)protected void unhookControl(T control)
Control from the JavaFX scene graph, for
example, unregistering event forwarding from SWT to JavaFX.control - The Control which is wrapped by this
FXControlAdapter.hookControl(Control),
unregisterSwtToFXEventForwarders()protected void unregisterListeners()
registerListeners().protected void unregisterSwtToFXEventForwarders()
registerSwtToFXEventForwarders(FXCanvas).public void updateSwtBounds()
bounds of the
Control which is wrapped by this FXControlAdapter. This
method is automatically called when this FXControlAdapter is
relocated or
resized.Copyright (c) 2014, 2016 itemis AG and others. All rights reserved.