Top Description Inners Fields Constructors Methods
com.sun.javafx.embed.swing

public Class SwingNodeHelper

extends NodeHelper
Class Inheritance
Imports
com.sun.javafx.geom.BaseBounds, com.sun.javafx.geom.transform.BaseTransform, com.sun.javafx.scene.NodeHelper, com.sun.javafx.sg.prism.NGNode, com.sun.javafx.tk.Toolkit, com.sun.javafx.util.Utils, java.util.HashSet, .Set, java.util.concurrent.locks.ReentrantLock, javafx.application.Platform, javafx.embed.swing.SwingNode, javafx.scene.Node, javax.swing.SwingUtilities

Used to access internal methods of SwingNode.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface

Field Summary

Modifier and TypeField and Description
private static final Set<Object>
private static SwingNodeHelper.SwingNodeAccessor
private static final SwingNodeHelper

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected boolean
computeContainsImpl(Node node, double localX, double localY)

Implements abstract com.sun.javafx.scene.NodeHelper.computeContainsImpl.

protected BaseBounds
protected NGNode
private static SwingNodeHelper
public static Object
public static ReentrantLock
public static void
initHelper(SwingNode swingNode)

public static void
leaveFXNestedLoop(Object
the Object that identifies the nested event loop, which must not be null
nestedLoopKey
)

The runnable is responsible for leaving the nested event loop.

public static void
repaintDirtyRegion(SwingNode node, final int dirtyX, final int dirtyY, final int dirtyWidth, final int dirtyHeight)

public static void
runOnEDT(final Runnable
Runnable to be invoked
r
)

If called from the event dispatch thread invokes a runnable directly blocking the calling code Otherwise uses SwingUtilities.invokeLater without blocking

public static void
runOnEDTAndWait(Object
the Object that identifies the nested event loop, which must not be null
nestedLoopKey
,
Runnable
Runnable to be invoked
r
)

The runnable is responsible for entering the nested event loop.

public static void
runOnFxThread(Runnable
Runnable to be invoked
runnable
)

If called from the FX Application Thread invokes a runnable directly blocking the calling code Otherwise uses Platform.runLater without blocking

public static void
setGrabbed(SwingNode node, boolean grab)

public static void
setImageBounds(SwingNode node, final int x, final int y, final int w, final int h)

public static void
setImageBuffer(SwingNode node, final int[] data, final int x, final int y, final int w, final int h, final int linestride, final double scaleX, final double scaleY)

public static void
setSwingMaxHeight(SwingNode node, int swingMaxHeight)

public static void
setSwingMaxWidth(SwingNode node, int swingMaxWidth)

public static void
setSwingMinHeight(SwingNode node, int swingMinHeight)

public static void
setSwingMinWidth(SwingNode node, int swingMinWidth)

public static void
public static void
setSwingPrefHeight(SwingNode node, int swingPrefHeight)

public static void
setSwingPrefWidth(SwingNode node, int swingPrefWidth)

public static void
ungrabFocus(SwingNode node, boolean postUngrabEvent)

protected void
Inherited from com.sun.javafx.scene.NodeHelper:
addTransitionTimercomputeContainscomputeGeomBoundscomputeIntersectscomputeIntersectsImplcomputeLayoutBoundscomputeLayoutBoundsImplcreatePeerfindStylesfindTransitionDefinitionfindTransitionDefinitionsfindTransitionTimergeomChangedgeomChangedImplgetAccessiblegetHelpergetLeafTransformgetMatchingStylesgetNodeAccessorgetPeergetPivotXgetPivotYgetPivotZgetSubScenegetTransitionPropertyintersectsintersectsBoundsisDerivedDepthTestisDirtyisDirtyEmptyisInitialCssStateisShowMnemonicsisTreeShowingisTreeVisiblelayoutBoundsChangedlayoutNodeForPrintingmarkDirtymarkDirtyImplnotifyLayoutBoundsChangednotifyLayoutBoundsChangedImplpickNodepickNodeLocalpickNodeLocalImplprocessCSSprocessCSSImplreapplyCSSrecalculateRelativeSizePropertiesremoveTransitionTimerrequestFocusVisiblesetHelpersetNodeAccessorsetShowMnemonicsshowMnemonicsPropertysyncPeertransformsChangedtransformsChangedImpltraversetreeVisiblePropertyupdatePeer

Field Detail

eventLoopKeysback to summary
private static final Set<Object> eventLoopKeys
swingNodeAccessorback to summary
private static SwingNodeHelper.SwingNodeAccessor swingNodeAccessor
theInstanceback to summary
private static final SwingNodeHelper theInstance

Constructor Detail

SwingNodeHelperback to summary
public SwingNodeHelper()

Method Detail

computeContainsImplback to summary
protected boolean computeContainsImpl(Node node, double localX, double localY)

Implements abstract com.sun.javafx.scene.NodeHelper.computeContainsImpl.

Annotations
@Override
computeGeomBoundsImplback to summary
protected BaseBounds computeGeomBoundsImpl(Node node, BaseBounds bounds, BaseTransform tx)

Implements abstract com.sun.javafx.scene.NodeHelper.computeGeomBoundsImpl.

Annotations
@Override
createPeerImplback to summary
protected NGNode createPeerImpl(Node node)

Implements abstract com.sun.javafx.scene.NodeHelper.createPeerImpl.

Annotations
@Override
getInstanceback to summary
private static SwingNodeHelper getInstance()
getLightweightFrameback to summary
public static Object getLightweightFrame(SwingNode node)
getPaintLockback to summary
public static ReentrantLock getPaintLock(SwingNode node)
initHelperback to summary
public static void initHelper(SwingNode swingNode)
leaveFXNestedLoopback to summary
public static void leaveFXNestedLoop(Object nestedLoopKey)

The runnable is responsible for leaving the nested event loop.

Parameters
nestedLoopKey:Object

the Object that identifies the nested event loop, which must not be null

repaintDirtyRegionback to summary
public static void repaintDirtyRegion(SwingNode node, final int dirtyX, final int dirtyY, final int dirtyWidth, final int dirtyHeight)
runOnEDTback to summary
public static void runOnEDT(final Runnable r)

If called from the event dispatch thread invokes a runnable directly blocking the calling code Otherwise uses SwingUtilities.invokeLater without blocking

Parameters
r:Runnable

Runnable to be invoked

runOnEDTAndWaitback to summary
public static void runOnEDTAndWait(Object nestedLoopKey, Runnable r)

The runnable is responsible for entering the nested event loop.

Parameters
nestedLoopKey:Object

the Object that identifies the nested event loop, which must not be null

r:Runnable

Runnable to be invoked

runOnFxThreadback to summary
public static void runOnFxThread(Runnable runnable)

If called from the FX Application Thread invokes a runnable directly blocking the calling code Otherwise uses Platform.runLater without blocking

Parameters
runnable:Runnable

Runnable to be invoked

setGrabbedback to summary
public static void setGrabbed(SwingNode node, boolean grab)
setImageBoundsback to summary
public static void setImageBounds(SwingNode node, final int x, final int y, final int w, final int h)
setImageBufferback to summary
public static void setImageBuffer(SwingNode node, final int[] data, final int x, final int y, final int w, final int h, final int linestride, final double scaleX, final double scaleY)
setSwingMaxHeightback to summary
public static void setSwingMaxHeight(SwingNode node, int swingMaxHeight)
setSwingMaxWidthback to summary
public static void setSwingMaxWidth(SwingNode node, int swingMaxWidth)
setSwingMinHeightback to summary
public static void setSwingMinHeight(SwingNode node, int swingMinHeight)
setSwingMinWidthback to summary
public static void setSwingMinWidth(SwingNode node, int swingMinWidth)
setSwingNodeAccessorback to summary
public static void setSwingNodeAccessor(final SwingNodeHelper.SwingNodeAccessor newAccessor)
setSwingPrefHeightback to summary
public static void setSwingPrefHeight(SwingNode node, int swingPrefHeight)
setSwingPrefWidthback to summary
public static void setSwingPrefWidth(SwingNode node, int swingPrefWidth)
ungrabFocusback to summary
public static void ungrabFocus(SwingNode node, boolean postUngrabEvent)
updatePeerImplback to summary
protected void updatePeerImpl(Node node)

Overrides com.sun.javafx.scene.NodeHelper.updatePeerImpl.

Annotations
@Override
com.sun.javafx.embed.swing back to summary

public Interface SwingNodeHelper.SwingNodeAccessor


Method Summary

Modifier and TypeMethod and Description
public boolean
doComputeContains(Node node, double localX, double localY)

public BaseBounds
public NGNode
public void
public Object
public ReentrantLock
public void
repaintDirtyRegion(SwingNode node, final int dirtyX, final int dirtyY, final int dirtyWidth, final int dirtyHeight)

public void
setGrabbed(SwingNode node, boolean grab)

public void
setImageBounds(SwingNode node, final int x, final int y, final int w, final int h)

public void
setImageBuffer(SwingNode node, final int[] data, final int x, final int y, final int w, final int h, final int linestride, final double scaleX, final double scaleY)

public void
setSwingMaxHeight(SwingNode node, int swingMaxHeight)

public void
setSwingMaxWidth(SwingNode node, int swingMaxWidth)

public void
setSwingMinHeight(SwingNode node, int swingMinHeight)

public void
setSwingMinWidth(SwingNode node, int swingMinWidth)

public void
setSwingPrefHeight(SwingNode node, int swingPrefHeight)

public void
setSwingPrefWidth(SwingNode node, int swingPrefWidth)

public void
ungrabFocus(SwingNode node, boolean postUngrabEvent)

Method Detail

doComputeContainsback to summary
public boolean doComputeContains(Node node, double localX, double localY)
doComputeGeomBoundsback to summary
public BaseBounds doComputeGeomBounds(Node node, BaseBounds bounds, BaseTransform tx)
doCreatePeerback to summary
public NGNode doCreatePeer(Node node)
doUpdatePeerback to summary
public void doUpdatePeer(Node node)
getLightweightFrameback to summary
public Object getLightweightFrame(SwingNode node)
getPaintLockback to summary
public ReentrantLock getPaintLock(SwingNode node)
repaintDirtyRegionback to summary
public void repaintDirtyRegion(SwingNode node, final int dirtyX, final int dirtyY, final int dirtyWidth, final int dirtyHeight)
setGrabbedback to summary
public void setGrabbed(SwingNode node, boolean grab)
setImageBoundsback to summary
public void setImageBounds(SwingNode node, final int x, final int y, final int w, final int h)
setImageBufferback to summary
public void setImageBuffer(SwingNode node, final int[] data, final int x, final int y, final int w, final int h, final int linestride, final double scaleX, final double scaleY)
setSwingMaxHeightback to summary
public void setSwingMaxHeight(SwingNode node, int swingMaxHeight)
setSwingMaxWidthback to summary
public void setSwingMaxWidth(SwingNode node, int swingMaxWidth)
setSwingMinHeightback to summary
public void setSwingMinHeight(SwingNode node, int swingMinHeight)
setSwingMinWidthback to summary
public void setSwingMinWidth(SwingNode node, int swingMinWidth)
setSwingPrefHeightback to summary
public void setSwingPrefHeight(SwingNode node, int swingPrefHeight)
setSwingPrefWidthback to summary
public void setSwingPrefWidth(SwingNode node, int swingPrefWidth)
ungrabFocusback to summary
public void ungrabFocus(SwingNode node, boolean postUngrabEvent)