public abstract class Toolkit extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
Toolkit.ImageAccessor |
static class |
Toolkit.ImageRenderingContext |
static interface |
Toolkit.PaintAccessor |
static interface |
Toolkit.Task |
static interface |
Toolkit.WritableImageAccessor |
Modifier | Constructor and Description |
---|---|
protected |
Toolkit() |
Modifier and Type | Method and Description |
---|---|
abstract void |
accumulateStrokeBounds(Shape shape,
float[] bbox,
StrokeType type,
double strokewidth,
StrokeLineCap cap,
StrokeLineJoin join,
float miterLimit,
BaseTransform tx) |
void |
addPostSceneTkPulseListener(TKPulseListener listener) |
abstract Future |
addRenderJob(RenderJob rj) |
void |
addSceneTkPulseListener(TKPulseListener listener) |
void |
addShutdownHook(Runnable hook) |
void |
addStageTkPulseListener(TKPulseListener listener) |
void |
addTkListener(TKListener listener) |
abstract boolean |
canStartNestedEventLoop()
Indicates whether or not a nested event loop can be started
from the current thread in the current state.
|
void |
checkFxUserThread() |
protected static double |
clampStopOffset(double offset) |
abstract void |
closeAppletWindow()
Perform cleanup in preparation for applet termination, including closing
the applet window.
|
abstract HitInfo |
convertHitInfoToFX(Object hit) |
abstract PathElement[] |
convertShapeToFXPath(Object shape) |
abstract AppletWindow |
createAppletWindow(long parent,
String serverName)
Creates an AppletWindow using the provided window pointer as the parent
window.
|
protected abstract Object |
createColorPaint(Color paint) |
protected abstract Object |
createImagePatternPaint(ImagePattern paint) |
protected abstract Object |
createLinearGradientPaint(LinearGradient paint) |
TKClipboard |
createLocalClipboard() |
abstract PerformanceTracker |
createPerformanceTracker() |
abstract PlatformImage |
createPlatformImage(int w,
int h) |
protected abstract Object |
createRadialGradientPaint(RadialGradient paint) |
abstract Shape |
createStrokedShape(Shape shape,
StrokeType type,
double strokewidth,
StrokeLineCap cap,
StrokeLineJoin join,
float miterLimit,
float[] dashArray,
float dashOffset) |
abstract Path2D |
createSVGPath2D(SVGPath svgpath) |
abstract Object |
createSVGPathObject(SVGPath svgpath) |
abstract TKStage |
createTKEmbeddedStage(HostInterface host,
AccessControlContext acc) |
abstract TKStage |
createTKPopupStage(Window peerWindow,
StageStyle popupStyle,
TKStage owner,
AccessControlContext acc) |
abstract TKStage |
createTKStage(Window peerWindow,
boolean securityDialog,
StageStyle stageStyle,
boolean primary,
Modality modality,
TKStage owner,
boolean rtl,
AccessControlContext acc) |
abstract void |
defer(Runnable runnable) |
abstract void |
enableDrop(TKScene s,
TKDropTargetListener l) |
abstract Object |
enterNestedEventLoop(Object key)
Enter a nested event loop and block until the corresponding
exitNestedEventLoop call is made.
|
void |
exit() |
abstract void |
exitNestedEventLoop(Object key,
Object rval)
Exit a nested event loop and unblock the caller of the
corresponding enterNestedEventLoop.
|
void |
firePulse() |
abstract Dimension2D |
getBestCursorSize(int preferredWidth,
int preferredHeight) |
abstract Map<Object,Object> |
getContextMap() |
boolean |
getDefaultImageSmooth() |
abstract FilterContext |
getFilterContext(Object config) |
abstract FontLoader |
getFontLoader() |
protected static Thread |
getFxUserThread() |
Set<HighlightRegion> |
getHighlightedRegions()
Getter for the set of regions to be highlighted using the JMX tooling
interface.
|
static Toolkit.ImageAccessor |
getImageAccessor() |
InputStream |
getInputStream(String url,
Class base) |
abstract int |
getKeyCodeForChar(String character) |
abstract AbstractMasterTimer |
getMasterTimer() |
abstract int |
getMaximumCursorColors() |
abstract int |
getMultiClickMaxX() |
abstract int |
getMultiClickMaxY() |
abstract long |
getMultiClickTime() |
abstract TKClipboard |
getNamedClipboard(String name) |
Object |
getPaint(Paint paint) |
static Toolkit.PaintAccessor |
getPaintAccessor() |
abstract PerformanceTracker |
getPerformanceTracker() |
KeyCode |
getPlatformShortcutKey()
Returns the key code for the key which is commonly used on the
corresponding platform as a modifier key in shortcuts.
|
abstract Object |
getPrimaryScreen() |
abstract int |
getRefreshRate() |
abstract ScreenConfigurationAccessor |
getScreenConfigurationAccessor() |
abstract List<?> |
getScreens() |
abstract TKClipboard |
getSystemClipboard() |
abstract TKSystemMenu |
getSystemMenu() |
abstract TextLayoutFactory |
getTextLayoutFactory() |
String |
getThemeName() |
static Toolkit |
getToolkit() |
static Toolkit.WritableImageAccessor |
getWritableImageAccessor() |
abstract boolean |
imageContains(Object image,
float x,
float y)
Tests whether the pixel on the given coordinates in the given image
is non-empty (not fully transparent).
|
abstract boolean |
init() |
abstract void |
installInputMethodRequests(TKScene scene,
InputMethodRequests requests) |
abstract boolean |
isBackwardTraversalKey(KeyEvent e) |
abstract boolean |
isForwardTraversalKey(KeyEvent e) |
boolean |
isFxUserThread() |
boolean |
isMSAASupported() |
abstract boolean |
isNestedLoopRunning() |
boolean |
isSupported(ConditionalFeature feature) |
abstract ImageLoader |
loadImage(InputStream stream,
int width,
int height,
boolean preserveRatio,
boolean smooth) |
abstract ImageLoader |
loadImage(String url,
int width,
int height,
boolean preserveRatio,
boolean smooth) |
abstract AsyncOperation |
loadImageAsync(AsyncOperationListener<? extends ImageLoader> listener,
String url,
int width,
int height,
boolean preserveRatio,
boolean smooth) |
static void |
loadMSWindowsLibraries() |
abstract ImageLoader |
loadPlatformImage(Object platformImage) |
void |
notifyLastNestedLoopExited() |
protected void |
notifyShutdownHooks() |
void |
notifyWindowListeners(List<TKStage> windows) |
void |
pauseCurrentThread()
Used to pause current thread when the Scene-graph is in "PAUSED" mode.
|
void |
pauseScenes() |
abstract void |
registerDragGestureListener(TKScene s,
Set<TransferMode> tm,
TKDragGestureListener l) |
void |
removePostSceneTkPulseListener(TKPulseListener listener) |
void |
removeSceneTkPulseListener(TKPulseListener listener) |
void |
removeShutdownHook(Runnable hook) |
void |
removeStageTkPulseListener(TKPulseListener listener) |
void |
removeTkListener(TKListener listener) |
abstract Object |
renderToImage(Toolkit.ImageRenderingContext context) |
abstract void |
requestNextPulse() |
void |
resumeScenes() |
abstract void |
setAnimationRunnable(DelayedRunnable animationRunnable) |
protected static void |
setFxUserThread(Thread t) |
static void |
setImageAccessor(Toolkit.ImageAccessor accessor) |
void |
setLastTkPulseListener(TKPulseListener listener) |
static void |
setPaintAccessor(Toolkit.PaintAccessor accessor) |
abstract ScreenConfigurationAccessor |
setScreenConfigurationListener(TKScreenConfigurationListener listener) |
static void |
setWritableImageAccessor(Toolkit.WritableImageAccessor accessor) |
abstract File |
showDirectoryChooser(TKStage ownerWindow,
String title,
File initialDirectory) |
abstract CommonDialogs.FileChooserResult |
showFileChooser(TKStage ownerWindow,
String title,
File initialDirectory,
String initialFileName,
FileChooserType fileChooserType,
List<FileChooser.ExtensionFilter> extensionFilters,
FileChooser.ExtensionFilter selectedFilter) |
abstract void |
startDrag(TKScene scene,
Set<TransferMode> tm,
TKDragSourceListener l,
Dragboard dragboard)
This function is called when a drag originates within a JavaFX application.
|
abstract void |
startup(Runnable runnable) |
void |
stopDrag(Dragboard dragboard) |
abstract boolean |
strokeContains(Shape shape,
double x,
double y,
StrokeType type,
double strokewidth,
StrokeLineCap cap,
StrokeLineJoin join,
float miterLimit) |
Color4f |
toColor4f(Color color) |
abstract Filterable |
toFilterable(Image img) |
AbstractShadow.ShadowMode |
toShadowMode(BlurType blurType) |
abstract void |
waitFor(Toolkit.Task t) |
public static void loadMSWindowsLibraries()
public static Toolkit getToolkit()
protected static Thread getFxUserThread()
protected static void setFxUserThread(Thread t)
public void checkFxUserThread()
public boolean isFxUserThread()
public abstract boolean init()
public abstract boolean canStartNestedEventLoop()
public abstract Object enterNestedEventLoop(Object key)
rval
object supplied to the exitNestedEventLoop method call that unblocks it.key
- the Object that identifies the nested event loop, which
must not be nullIllegalArgumentException
- if the specified key is associated
with a nested event loop that has not yet returnedNullPointerException
- if the key is nullIllegalStateException
- if this method is called on a thread
other than the FX Application threadpublic abstract void exitNestedEventLoop(Object key, Object rval)
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.IllegalArgumentException
- if the specified key is not associated
with an active nested event loopNullPointerException
- if the key is nullIllegalStateException
- if this method is called on a thread
other than the FX Application threadpublic abstract boolean isNestedLoopRunning()
public abstract TKStage createTKStage(Window peerWindow, boolean securityDialog, StageStyle stageStyle, boolean primary, Modality modality, TKStage owner, boolean rtl, AccessControlContext acc)
public abstract TKStage createTKPopupStage(Window peerWindow, StageStyle popupStyle, TKStage owner, AccessControlContext acc)
public abstract TKStage createTKEmbeddedStage(HostInterface host, AccessControlContext acc)
public abstract AppletWindow createAppletWindow(long parent, String serverName)
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 abstract void closeAppletWindow()
public void firePulse()
public void addStageTkPulseListener(TKPulseListener listener)
public void removeStageTkPulseListener(TKPulseListener listener)
public void addSceneTkPulseListener(TKPulseListener listener)
public void removeSceneTkPulseListener(TKPulseListener listener)
public void addPostSceneTkPulseListener(TKPulseListener listener)
public void removePostSceneTkPulseListener(TKPulseListener listener)
public void addTkListener(TKListener listener)
public void removeTkListener(TKListener listener)
public void setLastTkPulseListener(TKPulseListener listener)
public void addShutdownHook(Runnable hook)
public void removeShutdownHook(Runnable hook)
protected void notifyShutdownHooks()
public void notifyLastNestedLoopExited()
public abstract void requestNextPulse()
public InputStream getInputStream(String url, Class base) throws IOException
IOException
public abstract ImageLoader loadImage(String url, int width, int height, boolean preserveRatio, boolean smooth)
public abstract ImageLoader loadImage(InputStream stream, int width, int height, boolean preserveRatio, boolean smooth)
public abstract AsyncOperation loadImageAsync(AsyncOperationListener<? extends ImageLoader> listener, String url, int width, int height, boolean preserveRatio, boolean smooth)
public abstract ImageLoader loadPlatformImage(Object platformImage)
public abstract PlatformImage createPlatformImage(int w, int h)
public boolean getDefaultImageSmooth()
public abstract void startup(Runnable runnable)
public abstract void defer(Runnable runnable)
public void exit()
public abstract int getRefreshRate()
public abstract void setAnimationRunnable(DelayedRunnable animationRunnable)
public abstract PerformanceTracker getPerformanceTracker()
public abstract PerformanceTracker createPerformanceTracker()
public abstract void waitFor(Toolkit.Task t)
protected static final double clampStopOffset(double offset)
protected abstract Object createLinearGradientPaint(LinearGradient paint)
protected abstract Object createRadialGradientPaint(RadialGradient paint)
protected abstract Object createImagePatternPaint(ImagePattern paint)
public abstract void accumulateStrokeBounds(Shape shape, float[] bbox, StrokeType type, double strokewidth, StrokeLineCap cap, StrokeLineJoin join, float miterLimit, BaseTransform tx)
public abstract boolean strokeContains(Shape shape, double x, double y, StrokeType type, double strokewidth, StrokeLineCap cap, StrokeLineJoin join, float miterLimit)
public abstract Shape createStrokedShape(Shape shape, StrokeType type, double strokewidth, StrokeLineCap cap, StrokeLineJoin join, float miterLimit, float[] dashArray, float dashOffset)
public abstract int getKeyCodeForChar(String character)
public abstract Dimension2D getBestCursorSize(int preferredWidth, int preferredHeight)
public abstract int getMaximumCursorColors()
public abstract PathElement[] convertShapeToFXPath(Object shape)
public abstract Filterable toFilterable(Image img)
public abstract FilterContext getFilterContext(Object config)
public abstract boolean isForwardTraversalKey(KeyEvent e)
public abstract boolean isBackwardTraversalKey(KeyEvent e)
public abstract AbstractMasterTimer getMasterTimer()
public abstract FontLoader getFontLoader()
public abstract TextLayoutFactory getTextLayoutFactory()
public abstract boolean imageContains(Object image, float x, float y)
public abstract TKClipboard getSystemClipboard()
public TKClipboard createLocalClipboard()
public abstract TKSystemMenu getSystemMenu()
public abstract TKClipboard getNamedClipboard(String name)
public boolean isSupported(ConditionalFeature feature)
public boolean isMSAASupported()
public abstract ScreenConfigurationAccessor setScreenConfigurationListener(TKScreenConfigurationListener listener)
public abstract Object getPrimaryScreen()
public abstract List<?> getScreens()
public abstract ScreenConfigurationAccessor getScreenConfigurationAccessor()
public abstract void registerDragGestureListener(TKScene s, Set<TransferMode> tm, TKDragGestureListener l)
public abstract void startDrag(TKScene scene, Set<TransferMode> tm, TKDragSourceListener l, Dragboard dragboard)
public void stopDrag(Dragboard dragboard)
public abstract void enableDrop(TKScene s, TKDropTargetListener l)
public AbstractShadow.ShadowMode toShadowMode(BlurType blurType)
public abstract void installInputMethodRequests(TKScene scene, InputMethodRequests requests)
public abstract Object renderToImage(Toolkit.ImageRenderingContext context)
public KeyCode getPlatformShortcutKey()
KeyCode.CONTROL
on Windows (Ctrl + C, Ctrl + V ...) and
KeyCode.META
on MacOS (Cmd + C, Cmd + V ...).public abstract CommonDialogs.FileChooserResult showFileChooser(TKStage ownerWindow, String title, File initialDirectory, String initialFileName, FileChooserType fileChooserType, List<FileChooser.ExtensionFilter> extensionFilters, FileChooser.ExtensionFilter selectedFilter)
public abstract File showDirectoryChooser(TKStage ownerWindow, String title, File initialDirectory)
public abstract long getMultiClickTime()
public abstract int getMultiClickMaxX()
public abstract int getMultiClickMaxY()
public void pauseScenes()
public void resumeScenes()
public void pauseCurrentThread()
Platform.runLater(Runnable)
to block the thread and not to pass the runnable to FX event queue.public Set<HighlightRegion> getHighlightedRegions()
public static void setWritableImageAccessor(Toolkit.WritableImageAccessor accessor)
public static Toolkit.WritableImageAccessor getWritableImageAccessor()
public static void setPaintAccessor(Toolkit.PaintAccessor accessor)
public static Toolkit.PaintAccessor getPaintAccessor()
public static void setImageAccessor(Toolkit.ImageAccessor accessor)
public static Toolkit.ImageAccessor getImageAccessor()
public String getThemeName()
Copyright © 2020. All rights reserved.