Class OfficialApi
java.lang.Object
ch.swingfx.window.translucentandshaped.OfficialApi
- All Implemented Interfaces:
ITranslucentAndShapedWindowApi
Wrapper around the official API for creating translucent and shaped windows. As
of JRE 7 there is official support for these types of windows.
You shouldn't use this class directly. Instead use
Note: Only Sun/Oracle JREs support sun.awt.AWTUtilities. Other JDK/JREs (example OpenJDK) do not support the private API
You shouldn't use this class directly. Instead use
TranslucentAndShapedWindowApiFactory to
get the correct instance depending on your system JRE. For more details see
http://download.oracle.com/javase/tutorial/uiswing/misc/trans_shaped_windows.html#6u10Note: Only Sun/Oracle JREs support sun.awt.AWTUtilities. Other JDK/JREs (example OpenJDK) do not support the private API
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static Methodprivate static Methodprivate static booleantrue if we support this APIprivate static Methodprivate static Methodprivate static final intprivate static final intprivate static Objectprivate static Objectenum constants from java.awt.GraphicsDevice$WindowTranslucencyprivate static Methodprivate static Methodprivate static Object -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatgetWindowOpacity(Window window) getWindowShape(Window window) static booleanbooleanbooleanisTranslucencySupported(Translucency translucencyKind, GraphicsDevice gd) booleanisWindowOpaque(Window window) voidsetWindowOpacity(Window window, float opacity) voidsetWindowOpaque(Window window, boolean isOpaque) voidsetWindowShape(Window window, Shape shape)
-
Field Details
-
OPAQUE
private static final int OPAQUE- See Also:
-
NOT_OPAQUE
private static final int NOT_OPAQUE- See Also:
-
isSupported
private static boolean isSupportedtrue if we support this API -
PERPIXEL_TRANSPARENT
enum constants from java.awt.GraphicsDevice$WindowTranslucency -
TRANSLUCENT
-
PERPIXEL_TRANSLUCENT
-
isTranslucencySupported
-
setWindowOpacity
-
getWindowOpacity
-
setWindowShape
-
getWindowShape
-
isTranslucencyCapable
-
-
Constructor Details
-
OfficialApi
public OfficialApi()
-
-
Method Details
-
isSupported
public static boolean isSupported() -
isTranslucencySupported
- Specified by:
isTranslucencySupportedin interfaceITranslucentAndShapedWindowApi
-
setWindowOpacity
- Specified by:
setWindowOpacityin interfaceITranslucentAndShapedWindowApi
-
getWindowOpacity
- Specified by:
getWindowOpacityin interfaceITranslucentAndShapedWindowApi
-
setWindowShape
- Specified by:
setWindowShapein interfaceITranslucentAndShapedWindowApi
-
getWindowShape
- Specified by:
getWindowShapein interfaceITranslucentAndShapedWindowApi
-
setWindowOpaque
- Specified by:
setWindowOpaquein interfaceITranslucentAndShapedWindowApi
-
isWindowOpaque
- Specified by:
isWindowOpaquein interfaceITranslucentAndShapedWindowApi
-
isTranslucencyCapable
- Specified by:
isTranslucencyCapablein interfaceITranslucentAndShapedWindowApi
-
getApiType
- Specified by:
getApiTypein interfaceITranslucentAndShapedWindowApi
-