public final class QuantumToolkit extends Toolkit
Modifier and Type | Class and Description |
---|---|
(package private) static class |
QuantumToolkit.QuantumImage |
Toolkit.ImageAccessor, Toolkit.ImageRenderingContext, Toolkit.PaintAccessor, Toolkit.Task, Toolkit.WritableImageAccessor
Modifier and Type | Field and Description |
---|---|
private float |
_maxPixelScale |
private DelayedRunnable |
animationRunnable |
private java.util.concurrent.atomic.AtomicBoolean |
animationRunning |
private java.lang.ClassLoader |
ccl |
private QuantumClipboard |
clipboard |
private PaintCollector |
collector |
private java.util.Map<java.lang.Object,java.lang.Object> |
contextMap |
private static boolean |
debug |
(package private) static boolean |
drawInPaint |
private java.util.HashMap<java.lang.Object,EventLoop> |
eventLoopMap |
(package private) int |
FULLSPEED_INTERVAL |
private int |
inPulse |
private java.util.concurrent.CountDownLatch |
launchLatch |
(package private) static boolean |
liveResize |
private static boolean |
multithreaded |
(package private) boolean |
nativeSystemVsync |
private java.util.concurrent.atomic.AtomicBoolean |
nextPulseRequested |
private static boolean |
noRenderJobs |
private PerformanceTracker |
perfTracker |
private GraphicsPipeline |
pipeline |
(package private) int |
PULSE_INTERVAL |
static boolean |
pulseDebug |
private static java.lang.Integer |
pulseHZ |
private java.lang.Runnable |
pulseRunnable |
private java.util.concurrent.atomic.AtomicBoolean |
pulseRunning |
private Timer |
pulseTimer |
private QuantumRenderer |
renderer |
private static ScreenConfigurationAccessor |
screenAccessor |
private java.lang.Thread |
shutdownHook |
private static boolean |
singleThreaded |
private GlassSystemMenu |
systemMenu |
private java.lang.Runnable |
timerRunnable |
(package private) static BasicStroke |
tmpStroke |
private java.util.concurrent.atomic.AtomicBoolean |
toolkitRunning |
private java.lang.Runnable |
userRunnable |
static boolean |
verbose |
Constructor and Description |
---|
QuantumToolkit() |
Modifier and Type | Method and Description |
---|---|
void |
accumulateStrokeBounds(Shape shape,
float[] bbox,
StrokeType pgtype,
double strokewidth,
StrokeLineCap pgcap,
StrokeLineJoin pgjoin,
float miterLimit,
BaseTransform tx) |
java.util.concurrent.Future |
addRenderJob(RenderJob r) |
private void |
assertToolkitRunning() |
private static void |
assignScreensAdapters() |
private WindowStage |
blockOwnerStage(TKStage stage) |
boolean |
canStartNestedEventLoop()
Indicates whether or not a nested event loop can be started
from the current thread in the current state.
|
void |
checkFxUserThread() |
(package private) static TransferMode |
clipboardActionToTransferMode(int action) |
void |
closeAppletWindow()
Perform cleanup in preparation for applet termination, including closing
the applet window.
|
private static java.util.List<CommonDialogs.ExtensionFilter> |
convertExtensionFilters(java.util.List<FileChooser.ExtensionFilter> extensionFilters) |
HitInfo |
convertHitInfoToFX(java.lang.Object hit) |
PathElement[] |
convertShapeToFXPath(java.lang.Object shape) |
private java.util.List<Stop> |
convertStops(java.util.List<Stop> paintStops) |
AppletWindow |
createAppletWindow(long parent,
java.lang.String serverName)
Creates an AppletWindow using the provided window pointer as the parent
window.
|
protected java.lang.Object |
createColorPaint(Color color) |
protected java.lang.Object |
createImagePatternPaint(ImagePattern paint) |
protected java.lang.Object |
createLinearGradientPaint(LinearGradient paint) |
PerformanceTracker |
createPerformanceTracker() |
PlatformImage |
createPlatformImage(int w,
int h) |
protected java.lang.Object |
createRadialGradientPaint(RadialGradient paint) |
Shape |
createStrokedShape(Shape shape,
StrokeType pgtype,
double strokewidth,
StrokeLineCap pgcap,
StrokeLineJoin pgjoin,
float miterLimit,
float[] dashArray,
float dashOffset) |
Path2D |
createSVGPath2D(SVGPath svgpath) |
java.lang.Object |
createSVGPathObject(SVGPath svgpath) |
TKStage |
createTKEmbeddedStage(HostInterface host,
java.security.AccessControlContext acc) |
TKStage |
createTKPopupStage(Window peerWindow,
StageStyle popupStyle,
TKStage owner,
java.security.AccessControlContext acc) |
TKStage |
createTKStage(Window peerWindow,
boolean securityDialog,
StageStyle stageStyle,
boolean primary,
Modality modality,
TKStage owner,
boolean rtl,
java.security.AccessControlContext acc) |
void |
defer(java.lang.Runnable runnable) |
void |
dispose() |
void |
enableDrop(TKScene s,
TKDropTargetListener l) |
private void |
endPulseRunning() |
java.lang.Object |
enterNestedEventLoop(java.lang.Object key)
Enter a nested event loop and block until the corresponding
exitNestedEventLoop call is made.
|
void |
exit() |
void |
exitNestedEventLoop(java.lang.Object key,
java.lang.Object rval)
Exit a nested event loop and unblock the caller of the
corresponding enterNestedEventLoop.
|
Dimension2D |
getBestCursorSize(int preferredWidth,
int preferredHeight) |
java.util.Map<java.lang.Object,java.lang.Object> |
getContextMap() |
FilterContext |
getFilterContext(java.lang.Object config) |
FontLoader |
getFontLoader() |
protected static java.lang.Thread |
getFxUserThread() |
int |
getKeyCodeForChar(java.lang.String character) |
AbstractMasterTimer |
getMasterTimer() |
int |
getMaximumCursorColors() |
float |
getMaxRenderScale() |
int |
getMultiClickMaxX() |
int |
getMultiClickMaxY() |
long |
getMultiClickTime() |
TKClipboard |
getNamedClipboard(java.lang.String name) |
PerformanceTracker |
getPerformanceTracker() |
java.lang.Object |
getPrimaryScreen() |
int |
getRefreshRate() |
ScreenConfigurationAccessor |
getScreenConfigurationAccessor() |
java.util.List<?> |
getScreens() |
TKClipboard |
getSystemClipboard() |
TKSystemMenu |
getSystemMenu() |
TextLayoutFactory |
getTextLayoutFactory() |
java.lang.String |
getThemeName() |
(package private) boolean |
hasNativeSystemVsync() |
boolean |
imageContains(java.lang.Object image,
float x,
float y)
Tests whether the pixel on the given coordinates in the given image
is non-empty (not fully transparent).
|
boolean |
init() |
private static void |
initSceneGraph()
Method to initialize the Scene Graph on the JavaFX application thread.
|
private void |
initStroke(StrokeType pgtype,
double strokewidth,
StrokeLineCap pgcap,
StrokeLineJoin pgjoin,
float miterLimit,
float[] dashArray,
float dashOffset) |
void |
installInputMethodRequests(TKScene scene,
InputMethodRequests requests) |
boolean |
isBackwardTraversalKey(KeyEvent e) |
boolean |
isForwardTraversalKey(KeyEvent e) |
boolean |
isMSAASupported() |
boolean |
isNestedLoopRunning() |
boolean |
isSupported(ConditionalFeature feature) |
(package private) boolean |
isVsyncEnabled() |
ImageLoader |
loadImage(java.io.InputStream stream,
int width,
int height,
boolean preserveRatio,
boolean smooth) |
ImageLoader |
loadImage(java.lang.String url,
int width,
int height,
boolean preserveRatio,
boolean smooth) |
AbstractRemoteResource<? extends ImageLoader> |
loadImageAsync(AsyncOperationListener listener,
java.lang.String url,
int width,
int height,
boolean preserveRatio,
boolean smooth) |
ImageLoader |
loadPlatformImage(java.lang.Object platformImage) |
private static void |
notifyScreenListener(TKScreenConfigurationListener listener) |
(package private) void |
postPulse() |
protected void |
pulse() |
(package private) void |
pulse(boolean collect) |
(package private) void |
pulseFromQueue() |
private java.lang.String |
pulseString() |
void |
registerDragGestureListener(TKScene s,
java.util.Set<TransferMode> tm,
TKDragGestureListener l) |
java.lang.Object |
renderToImage(Toolkit.ImageRenderingContext p) |
void |
requestNextPulse() |
(package private) void |
runToolkit() |
static <T> T |
runWithoutRenderLock(java.util.function.Supplier<T> supplier)
Runs the specified supplier, releasing the renderLock if needed.
|
static <T> T |
runWithRenderLock(java.util.function.Supplier<T> supplier)
Runs the specified supplier, first acquiring the renderLock.
|
void |
setAnimationRunnable(DelayedRunnable animationRunnable) |
private boolean |
setPulseRunning() |
ScreenConfigurationAccessor |
setScreenConfigurationListener(TKScreenConfigurationListener listener) |
(package private) boolean |
shouldWaitForRenderingToComplete() |
java.io.File |
showDirectoryChooser(TKStage ownerWindow,
java.lang.String title,
java.io.File initialDirectory) |
CommonDialogs.FileChooserResult |
showFileChooser(TKStage ownerWindow,
java.lang.String title,
java.io.File initialDirectory,
java.lang.String initialFileName,
FileChooserType fileChooserType,
java.util.List<FileChooser.ExtensionFilter> extensionFilters,
FileChooser.ExtensionFilter selectedFilter) |
void |
startDrag(TKScene scene,
java.util.Set<TransferMode> tm,
TKDragSourceListener l,
Dragboard dragboard)
This function is called when a drag originates within a JavaFX application.
|
void |
startup(java.lang.Runnable userStartupRunnable)
This method is invoked by PlatformImpl.
|
boolean |
strokeContains(Shape shape,
double x,
double y,
StrokeType pgtype,
double strokewidth,
StrokeLineCap pgcap,
StrokeLineJoin pgjoin,
float miterLimit) |
Filterable |
toFilterable(Image img) |
private Color |
toPrismColor(Color color) |
(package private) void |
vsyncHint() |
void |
waitFor(Toolkit.Task t) |
addPostSceneTkPulseListener, addSceneTkPulseListener, addShutdownHook, addStageTkPulseListener, addTkListener, clampStopOffset, createLocalClipboard, firePulse, getDefaultImageSmooth, getHighlightedRegions, getImageAccessor, getInputStream, getPaint, getPaintAccessor, getPlatformShortcutKey, getToolkit, getWritableImageAccessor, isFxUserThread, loadMSWindowsLibraries, notifyLastNestedLoopExited, notifyShutdownHooks, notifyWindowListeners, pauseCurrentThread, pauseScenes, removePostSceneTkPulseListener, removeSceneTkPulseListener, removeShutdownHook, removeStageTkPulseListener, removeTkListener, resumeScenes, setFxUserThread, setImageAccessor, setLastTkPulseListener, setPaintAccessor, setWritableImageAccessor, stopDrag, toColor4f, toShadowMode
public static final boolean verbose
public static final boolean pulseDebug
private static final boolean multithreaded
private static boolean debug
private static java.lang.Integer pulseHZ
static final boolean liveResize
static final boolean drawInPaint
private static boolean singleThreaded
private static boolean noRenderJobs
private java.util.concurrent.atomic.AtomicBoolean toolkitRunning
private java.util.concurrent.atomic.AtomicBoolean animationRunning
private java.util.concurrent.atomic.AtomicBoolean nextPulseRequested
private java.util.concurrent.atomic.AtomicBoolean pulseRunning
private int inPulse
private java.util.concurrent.CountDownLatch launchLatch
final int PULSE_INTERVAL
final int FULLSPEED_INTERVAL
boolean nativeSystemVsync
private float _maxPixelScale
private java.lang.Runnable pulseRunnable
private java.lang.Runnable userRunnable
private java.lang.Runnable timerRunnable
private Timer pulseTimer
private java.lang.Thread shutdownHook
private PaintCollector collector
private QuantumRenderer renderer
private GraphicsPipeline pipeline
private java.lang.ClassLoader ccl
private java.util.HashMap<java.lang.Object,EventLoop> eventLoopMap
private final PerformanceTracker perfTracker
private static ScreenConfigurationAccessor screenAccessor
private java.util.Map<java.lang.Object,java.lang.Object> contextMap
private DelayedRunnable animationRunnable
static BasicStroke tmpStroke
private QuantumClipboard clipboard
private GlassSystemMenu systemMenu
public void startup(java.lang.Runnable userStartupRunnable)
private void assertToolkitRunning()
boolean shouldWaitForRenderingToComplete()
private static void initSceneGraph()
void runToolkit()
public static <T> T runWithoutRenderLock(java.util.function.Supplier<T> supplier)
T
- the type of the return valuesupplier
- the supplier to be runpublic static <T> T runWithRenderLock(java.util.function.Supplier<T> supplier)
T
- the type of the return valuesupplier
- the supplier to be runboolean hasNativeSystemVsync()
boolean isVsyncEnabled()
public void checkFxUserThread()
checkFxUserThread
in class Toolkit
protected static java.lang.Thread getFxUserThread()
public java.util.concurrent.Future addRenderJob(RenderJob r)
addRenderJob
in class Toolkit
void postPulse()
private java.lang.String pulseString()
private boolean setPulseRunning()
private void endPulseRunning()
void pulseFromQueue()
protected void pulse()
void pulse(boolean collect)
void vsyncHint()
public AppletWindow createAppletWindow(long parent, java.lang.String serverName)
Toolkit
createAppletWindow
in class Toolkit
parent
- the native parent which will contain the primary stage
window(s). Used on Windows/Linux platforms.serverName
- the name of CARemoteLayerServer which
will be used to register native layer. Used on Mac platform.public void closeAppletWindow()
Toolkit
closeAppletWindow
in class Toolkit
public TKStage createTKStage(Window peerWindow, boolean securityDialog, StageStyle stageStyle, boolean primary, Modality modality, TKStage owner, boolean rtl, java.security.AccessControlContext acc)
createTKStage
in class Toolkit
public boolean canStartNestedEventLoop()
Toolkit
canStartNestedEventLoop
in class Toolkit
public java.lang.Object enterNestedEventLoop(java.lang.Object key)
Toolkit
rval
object supplied to the exitNestedEventLoop method call that unblocks it.enterNestedEventLoop
in class Toolkit
key
- the Object that identifies the nested event loop, which
must not be nullpublic void exitNestedEventLoop(java.lang.Object key, java.lang.Object rval)
Toolkit
exitNestedEventLoop
in class Toolkit
key
- the Object that identifies the nested event loop, which
must not be nullrval
- an Object that is returned to the caller of the
corresponding enterNestedEventLoop. This may be null.public TKStage createTKPopupStage(Window peerWindow, StageStyle popupStyle, TKStage owner, java.security.AccessControlContext acc)
createTKPopupStage
in class Toolkit
public TKStage createTKEmbeddedStage(HostInterface host, java.security.AccessControlContext acc)
createTKEmbeddedStage
in class Toolkit
public ScreenConfigurationAccessor setScreenConfigurationListener(TKScreenConfigurationListener listener)
setScreenConfigurationListener
in class Toolkit
private static void assignScreensAdapters()
private static void notifyScreenListener(TKScreenConfigurationListener listener)
public java.lang.Object getPrimaryScreen()
getPrimaryScreen
in class Toolkit
public java.util.List<?> getScreens()
getScreens
in class Toolkit
public ScreenConfigurationAccessor getScreenConfigurationAccessor()
getScreenConfigurationAccessor
in class Toolkit
public PerformanceTracker getPerformanceTracker()
getPerformanceTracker
in class Toolkit
public PerformanceTracker createPerformanceTracker()
createPerformanceTracker
in class Toolkit
public float getMaxRenderScale()
public ImageLoader loadImage(java.lang.String url, int width, int height, boolean preserveRatio, boolean smooth)
public ImageLoader loadImage(java.io.InputStream stream, int width, int height, boolean preserveRatio, boolean smooth)
public AbstractRemoteResource<? extends ImageLoader> loadImageAsync(AsyncOperationListener listener, java.lang.String url, int width, int height, boolean preserveRatio, boolean smooth)
loadImageAsync
in class Toolkit
public void dispose()
public boolean isForwardTraversalKey(KeyEvent e)
isForwardTraversalKey
in class Toolkit
public boolean isBackwardTraversalKey(KeyEvent e)
isBackwardTraversalKey
in class Toolkit
public java.util.Map<java.lang.Object,java.lang.Object> getContextMap()
getContextMap
in class Toolkit
public int getRefreshRate()
getRefreshRate
in class Toolkit
public void setAnimationRunnable(DelayedRunnable animationRunnable)
setAnimationRunnable
in class Toolkit
public void requestNextPulse()
requestNextPulse
in class Toolkit
public void waitFor(Toolkit.Task t)
protected java.lang.Object createColorPaint(Color color)
createColorPaint
in class Toolkit
protected java.lang.Object createLinearGradientPaint(LinearGradient paint)
createLinearGradientPaint
in class Toolkit
protected java.lang.Object createRadialGradientPaint(RadialGradient paint)
createRadialGradientPaint
in class Toolkit
protected java.lang.Object createImagePatternPaint(ImagePattern paint)
createImagePatternPaint
in class Toolkit
private void initStroke(StrokeType pgtype, double strokewidth, StrokeLineCap pgcap, StrokeLineJoin pgjoin, float miterLimit, float[] dashArray, float dashOffset)
public void accumulateStrokeBounds(Shape shape, float[] bbox, StrokeType pgtype, double strokewidth, StrokeLineCap pgcap, StrokeLineJoin pgjoin, float miterLimit, BaseTransform tx)
accumulateStrokeBounds
in class Toolkit
public boolean strokeContains(Shape shape, double x, double y, StrokeType pgtype, double strokewidth, StrokeLineCap pgcap, StrokeLineJoin pgjoin, float miterLimit)
strokeContains
in class Toolkit
public Shape createStrokedShape(Shape shape, StrokeType pgtype, double strokewidth, StrokeLineCap pgcap, StrokeLineJoin pgjoin, float miterLimit, float[] dashArray, float dashOffset)
createStrokedShape
in class Toolkit
public Dimension2D getBestCursorSize(int preferredWidth, int preferredHeight)
getBestCursorSize
in class Toolkit
public int getMaximumCursorColors()
getMaximumCursorColors
in class Toolkit
public int getKeyCodeForChar(java.lang.String character)
getKeyCodeForChar
in class Toolkit
public PathElement[] convertShapeToFXPath(java.lang.Object shape)
convertShapeToFXPath
in class Toolkit
public HitInfo convertHitInfoToFX(java.lang.Object hit)
convertHitInfoToFX
in class Toolkit
public Filterable toFilterable(Image img)
toFilterable
in class Toolkit
public FilterContext getFilterContext(java.lang.Object config)
getFilterContext
in class Toolkit
public AbstractMasterTimer getMasterTimer()
getMasterTimer
in class Toolkit
public FontLoader getFontLoader()
getFontLoader
in class Toolkit
public TextLayoutFactory getTextLayoutFactory()
getTextLayoutFactory
in class Toolkit
public java.lang.Object createSVGPathObject(SVGPath svgpath)
createSVGPathObject
in class Toolkit
public Path2D createSVGPath2D(SVGPath svgpath)
createSVGPath2D
in class Toolkit
public boolean imageContains(java.lang.Object image, float x, float y)
Toolkit
imageContains
in class Toolkit
public boolean isNestedLoopRunning()
isNestedLoopRunning
in class Toolkit
public boolean isSupported(ConditionalFeature feature)
isSupported
in class Toolkit
public boolean isMSAASupported()
isMSAASupported
in class Toolkit
static TransferMode clipboardActionToTransferMode(int action)
public TKClipboard getSystemClipboard()
getSystemClipboard
in class Toolkit
public TKSystemMenu getSystemMenu()
getSystemMenu
in class Toolkit
public TKClipboard getNamedClipboard(java.lang.String name)
getNamedClipboard
in class Toolkit
public void startDrag(TKScene scene, java.util.Set<TransferMode> tm, TKDragSourceListener l, Dragboard dragboard)
Toolkit
public void enableDrop(TKScene s, TKDropTargetListener l)
enableDrop
in class Toolkit
public void registerDragGestureListener(TKScene s, java.util.Set<TransferMode> tm, TKDragGestureListener l)
registerDragGestureListener
in class Toolkit
public void installInputMethodRequests(TKScene scene, InputMethodRequests requests)
installInputMethodRequests
in class Toolkit
public ImageLoader loadPlatformImage(java.lang.Object platformImage)
loadPlatformImage
in class Toolkit
public PlatformImage createPlatformImage(int w, int h)
createPlatformImage
in class Toolkit
public java.lang.Object renderToImage(Toolkit.ImageRenderingContext p)
renderToImage
in class Toolkit
public CommonDialogs.FileChooserResult showFileChooser(TKStage ownerWindow, java.lang.String title, java.io.File initialDirectory, java.lang.String initialFileName, FileChooserType fileChooserType, java.util.List<FileChooser.ExtensionFilter> extensionFilters, FileChooser.ExtensionFilter selectedFilter)
showFileChooser
in class Toolkit
public java.io.File showDirectoryChooser(TKStage ownerWindow, java.lang.String title, java.io.File initialDirectory)
showDirectoryChooser
in class Toolkit
private WindowStage blockOwnerStage(TKStage stage)
private static java.util.List<CommonDialogs.ExtensionFilter> convertExtensionFilters(java.util.List<FileChooser.ExtensionFilter> extensionFilters)
public long getMultiClickTime()
getMultiClickTime
in class Toolkit
public int getMultiClickMaxX()
getMultiClickMaxX
in class Toolkit
public int getMultiClickMaxY()
getMultiClickMaxY
in class Toolkit
public java.lang.String getThemeName()
getThemeName
in class Toolkit