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, toShadowModepublic 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 Toolkitprotected static java.lang.Thread getFxUserThread()
public java.util.concurrent.Future addRenderJob(RenderJob r)
addRenderJob in class Toolkitvoid 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)
ToolkitcreateAppletWindow in class Toolkitparent - 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()
ToolkitcloseAppletWindow in class Toolkitpublic TKStage createTKStage(Window peerWindow, boolean securityDialog, StageStyle stageStyle, boolean primary, Modality modality, TKStage owner, boolean rtl, java.security.AccessControlContext acc)
createTKStage in class Toolkitpublic boolean canStartNestedEventLoop()
ToolkitcanStartNestedEventLoop in class Toolkitpublic java.lang.Object enterNestedEventLoop(java.lang.Object key)
Toolkitrval
object supplied to the exitNestedEventLoop method call that unblocks it.enterNestedEventLoop in class Toolkitkey - the Object that identifies the nested event loop, which
must not be nullpublic void exitNestedEventLoop(java.lang.Object key,
java.lang.Object rval)
ToolkitexitNestedEventLoop in class Toolkitkey - 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 Toolkitpublic TKStage createTKEmbeddedStage(HostInterface host, java.security.AccessControlContext acc)
createTKEmbeddedStage in class Toolkitpublic ScreenConfigurationAccessor setScreenConfigurationListener(TKScreenConfigurationListener listener)
setScreenConfigurationListener in class Toolkitprivate static void assignScreensAdapters()
private static void notifyScreenListener(TKScreenConfigurationListener listener)
public java.lang.Object getPrimaryScreen()
getPrimaryScreen in class Toolkitpublic java.util.List<?> getScreens()
getScreens in class Toolkitpublic ScreenConfigurationAccessor getScreenConfigurationAccessor()
getScreenConfigurationAccessor in class Toolkitpublic PerformanceTracker getPerformanceTracker()
getPerformanceTracker in class Toolkitpublic PerformanceTracker createPerformanceTracker()
createPerformanceTracker in class Toolkitpublic 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 Toolkitpublic void dispose()
public boolean isForwardTraversalKey(KeyEvent e)
isForwardTraversalKey in class Toolkitpublic boolean isBackwardTraversalKey(KeyEvent e)
isBackwardTraversalKey in class Toolkitpublic java.util.Map<java.lang.Object,java.lang.Object> getContextMap()
getContextMap in class Toolkitpublic int getRefreshRate()
getRefreshRate in class Toolkitpublic void setAnimationRunnable(DelayedRunnable animationRunnable)
setAnimationRunnable in class Toolkitpublic void requestNextPulse()
requestNextPulse in class Toolkitpublic void waitFor(Toolkit.Task t)
protected java.lang.Object createColorPaint(Color color)
createColorPaint in class Toolkitprotected java.lang.Object createLinearGradientPaint(LinearGradient paint)
createLinearGradientPaint in class Toolkitprotected java.lang.Object createRadialGradientPaint(RadialGradient paint)
createRadialGradientPaint in class Toolkitprotected java.lang.Object createImagePatternPaint(ImagePattern paint)
createImagePatternPaint in class Toolkitprivate 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 Toolkitpublic boolean strokeContains(Shape shape, double x, double y, StrokeType pgtype, double strokewidth, StrokeLineCap pgcap, StrokeLineJoin pgjoin, float miterLimit)
strokeContains in class Toolkitpublic Shape createStrokedShape(Shape shape, StrokeType pgtype, double strokewidth, StrokeLineCap pgcap, StrokeLineJoin pgjoin, float miterLimit, float[] dashArray, float dashOffset)
createStrokedShape in class Toolkitpublic Dimension2D getBestCursorSize(int preferredWidth, int preferredHeight)
getBestCursorSize in class Toolkitpublic int getMaximumCursorColors()
getMaximumCursorColors in class Toolkitpublic int getKeyCodeForChar(java.lang.String character)
getKeyCodeForChar in class Toolkitpublic PathElement[] convertShapeToFXPath(java.lang.Object shape)
convertShapeToFXPath in class Toolkitpublic HitInfo convertHitInfoToFX(java.lang.Object hit)
convertHitInfoToFX in class Toolkitpublic Filterable toFilterable(Image img)
toFilterable in class Toolkitpublic FilterContext getFilterContext(java.lang.Object config)
getFilterContext in class Toolkitpublic AbstractMasterTimer getMasterTimer()
getMasterTimer in class Toolkitpublic FontLoader getFontLoader()
getFontLoader in class Toolkitpublic TextLayoutFactory getTextLayoutFactory()
getTextLayoutFactory in class Toolkitpublic java.lang.Object createSVGPathObject(SVGPath svgpath)
createSVGPathObject in class Toolkitpublic Path2D createSVGPath2D(SVGPath svgpath)
createSVGPath2D in class Toolkitpublic boolean imageContains(java.lang.Object image,
float x,
float y)
ToolkitimageContains in class Toolkitpublic boolean isNestedLoopRunning()
isNestedLoopRunning in class Toolkitpublic boolean isSupported(ConditionalFeature feature)
isSupported in class Toolkitpublic boolean isMSAASupported()
isMSAASupported in class Toolkitstatic TransferMode clipboardActionToTransferMode(int action)
public TKClipboard getSystemClipboard()
getSystemClipboard in class Toolkitpublic TKSystemMenu getSystemMenu()
getSystemMenu in class Toolkitpublic TKClipboard getNamedClipboard(java.lang.String name)
getNamedClipboard in class Toolkitpublic void startDrag(TKScene scene, java.util.Set<TransferMode> tm, TKDragSourceListener l, Dragboard dragboard)
Toolkitpublic void enableDrop(TKScene s, TKDropTargetListener l)
enableDrop in class Toolkitpublic void registerDragGestureListener(TKScene s, java.util.Set<TransferMode> tm, TKDragGestureListener l)
registerDragGestureListener in class Toolkitpublic void installInputMethodRequests(TKScene scene, InputMethodRequests requests)
installInputMethodRequests in class Toolkitpublic ImageLoader loadPlatformImage(java.lang.Object platformImage)
loadPlatformImage in class Toolkitpublic PlatformImage createPlatformImage(int w, int h)
createPlatformImage in class Toolkitpublic java.lang.Object renderToImage(Toolkit.ImageRenderingContext p)
renderToImage in class Toolkitpublic 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 Toolkitpublic java.io.File showDirectoryChooser(TKStage ownerWindow, java.lang.String title, java.io.File initialDirectory)
showDirectoryChooser in class Toolkitprivate WindowStage blockOwnerStage(TKStage stage)
private static java.util.List<CommonDialogs.ExtensionFilter> convertExtensionFilters(java.util.List<FileChooser.ExtensionFilter> extensionFilters)
public long getMultiClickTime()
getMultiClickTime in class Toolkitpublic int getMultiClickMaxX()
getMultiClickMaxX in class Toolkitpublic int getMultiClickMaxY()
getMultiClickMaxY in class Toolkitpublic java.lang.String getThemeName()
getThemeName in class Toolkit