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 Method
private static Method
private static boolean
true if we support this APIprivate static Method
private static Method
private static final int
private static final int
private static Object
private static Object
enum constants from java.awt.GraphicsDevice$WindowTranslucencyprivate static Method
private static Method
private static Object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloat
getWindowOpacity
(Window window) getWindowShape
(Window window) static boolean
boolean
boolean
isTranslucencySupported
(Translucency translucencyKind, GraphicsDevice gd) boolean
isWindowOpaque
(Window window) void
setWindowOpacity
(Window window, float opacity) void
setWindowOpaque
(Window window, boolean isOpaque) void
setWindowShape
(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:
isTranslucencySupported
in interfaceITranslucentAndShapedWindowApi
-
setWindowOpacity
- Specified by:
setWindowOpacity
in interfaceITranslucentAndShapedWindowApi
-
getWindowOpacity
- Specified by:
getWindowOpacity
in interfaceITranslucentAndShapedWindowApi
-
setWindowShape
- Specified by:
setWindowShape
in interfaceITranslucentAndShapedWindowApi
-
getWindowShape
- Specified by:
getWindowShape
in interfaceITranslucentAndShapedWindowApi
-
setWindowOpaque
- Specified by:
setWindowOpaque
in interfaceITranslucentAndShapedWindowApi
-
isWindowOpaque
- Specified by:
isWindowOpaque
in interfaceITranslucentAndShapedWindowApi
-
isTranslucencyCapable
- Specified by:
isTranslucencyCapable
in interfaceITranslucentAndShapedWindowApi
-
getApiType
- Specified by:
getApiType
in interfaceITranslucentAndShapedWindowApi
-