Class PrivateApi
java.lang.Object
ch.swingfx.window.translucentandshaped.PrivateApi
- All Implemented Interfaces:
ITranslucentAndShapedWindowApi
Wrapper around com.sun.awt.AWTUtilities API for Translucent and Shaped Window support.
As of JRE 6 update 10 there is a private API for creating 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
As of JRE 6 update 10 there is a private API for creating these types of windows.
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 Method
private static Object
private static Object
enum constants from com.sun.awt.AWTUtilities$Translucencyprivate static Method
private static Method
private static Method
private static Object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloat
getWindowOpacity
(Window window) getWindowShape
(Window window) static boolean
Test if com.sun.awt.AWTUtilities (jdk 6u10) is availableboolean
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
-
isSupported
private static boolean isSupportedtrue if we support this API -
PERPIXEL_TRANSPARENT
enum constants from com.sun.awt.AWTUtilities$Translucency -
TRANSLUCENT
-
PERPIXEL_TRANSLUCENT
-
isTranslucencySupported
-
setWindowOpacity
-
getWindowOpacity
-
setWindowShape
-
getWindowShape
-
setWindowOpaque
-
isWindowOpaque
-
isTranslucencyCapable
-
-
Constructor Details
-
PrivateApi
public PrivateApi()
-
-
Method Details
-
isSupported
public static boolean isSupported()Test if com.sun.awt.AWTUtilities (jdk 6u10) is available- Returns:
- true if com.sun.awt.AWTUtilities (jdk 6u10) is available
-
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
-