public final class ProprietaryUtils
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
HEAVY_WEIGHT_POPUP |
static int |
LIGHT_WEIGHT_POPUP
Key used to indicate a light weight popup should be used.
|
static int |
MEDIUM_WEIGHT_POPUP
Key used to indicate a medium weight Popup should be used.
|
| Constructor and Description |
|---|
ProprietaryUtils() |
| Modifier and Type | Method and Description |
|---|---|
static javax.swing.Popup |
createHeavyweightPopup(java.awt.Component invoker,
java.awt.Component content,
int x,
int y)
Returns heavyweight popup instance.
|
static float |
getWindowOpacity(java.awt.Window window)
Returns window opacity.
|
static boolean |
isAllowLinuxTransparency()
Returns whether per-pixel transparent windows usage is allowed on Linux systems or not.
|
static boolean |
isWindowOpaque(java.awt.Window window)
Returns whether window is opaque or not.
|
static boolean |
isWindowTransparencyAllowed()
Returns whether window transparency is supported on current OS or not.
|
static void |
setAllowLinuxTransparency(boolean allow)
Sets whether per-pixel transparent windows usage is allowed on Linux systems or not.
|
protected static void |
setupOpacityBackgroundColor(boolean opaque,
java.awt.Component component)
Changes component background color to match opacity.
|
static void |
setupUIDefaults(javax.swing.UIDefaults table)
Installs some proprietary L&F defaults for proper text rendering.
|
static void |
setWindowOpacity(java.awt.Window window,
float opacity)
Sets window opacity if that option is supported by the underlying system.
|
static void |
setWindowOpaque(java.awt.Window window,
boolean opaque)
Sets window opaque if that option is supported by the underlying system.
|
public static final int LIGHT_WEIGHT_POPUP
public static final int MEDIUM_WEIGHT_POPUP
public static final int HEAVY_WEIGHT_POPUP
public static boolean isAllowLinuxTransparency()
public static void setAllowLinuxTransparency(boolean allow)
allow - whether per-pixel transparent windows usage is allowed on Linux systems or notpublic static void setupUIDefaults(javax.swing.UIDefaults table)
table.put ( sun.swing.SwingUtilities2.AA_TEXT_PROPERTY_KEY, sun.swing.SwingUtilities2.AATextInfo.getAATextInfo ( true ) );
but it doesn't directly use any proprietary API.table - defaults tablepublic static boolean isWindowTransparencyAllowed()
public static void setWindowOpaque(java.awt.Window window,
boolean opaque)
window - window to processopaque - whether should make window opaque or notprotected static void setupOpacityBackgroundColor(boolean opaque,
java.awt.Component component)
throws java.lang.NoSuchMethodException,
java.lang.reflect.InvocationTargetException,
java.lang.IllegalAccessException
opaque - whether component should should be opaque or notcomponent - component to processjava.lang.NoSuchMethodExceptionjava.lang.reflect.InvocationTargetExceptionjava.lang.IllegalAccessExceptionpublic static boolean isWindowOpaque(java.awt.Window window)
window - window to processpublic static void setWindowOpacity(java.awt.Window window,
float opacity)
window - window to processopacity - new window opacitypublic static float getWindowOpacity(java.awt.Window window)
window - window to processpublic static javax.swing.Popup createHeavyweightPopup(java.awt.Component invoker,
java.awt.Component content,
int x,
int y)
invoker - invoker componentcontent - popup contentx - popup initial location X coordinatey - popup initial location Y coordinate