public class Workarounds extends Object
Workarounds is implemented as singleton, as there is only one JRE and
usually libraries are not loaded multiple times as well.| Constructor and Description |
|---|
Workarounds() |
| Modifier and Type | Method and Description |
|---|---|
void |
addWorkaround(Workaround workaround)
Adds a new workaround to this
Workarounds. |
static Workarounds |
getDefault()
Gets access to the currently used
Workaroundss. |
Workaround[] |
getWorkarounds()
Gets all the
Workarounds that are currently active. |
void |
markAsGlassPane(Component component)
This method is necessary since 1.6.14, it marks a component as
transparent.
|
void |
removeWorkaround(Workaround workaround)
Removes a workaround from this
Workarounds. |
static void |
setDefault(Workarounds workarounds)
Sets the
Workarounds that should be used. |
boolean |
setTranslucent(Window window)
Makes
window translucent, meaning that the opacity of each pixel is defined by the
alpha value or the Color that was used to paint over that pixel. |
boolean |
setTransparent(Window window,
Shape shape)
Makes
window transparent, any pixel not inside shape is not painted. |
void |
setup(DockController controller)
Calls the
Workaround.setup(DockController) method of all installed Workarounds, in the order
of which the workarounds were installed. |
boolean |
supportsTranslucency(Window window)
Tells whether there is a least one
Workaround that supports per-pixel translucency. |
boolean |
supportsTransparency(Window window)
Tells whether there is at least one
Workaround that supports per-pixel transparency. |
static boolean |
tryAddWorkaround(String className)
Tries first to call
Class.forName(String) with className as argument, then creates
a new object, casts it to a Workaround, and finally installs that workaround |
public static Workarounds getDefault()
Workaroundss.public static boolean tryAddWorkaround(String className)
Class.forName(String) with className as argument, then creates
a new object, casts it to a Workaround, and finally installs that workaroundclassName - the name of the class to installtrue if a new Workaround was installed@ClientOnly public static void setDefault(Workarounds workarounds)
Workarounds that should be used. This method will never be called from
the framework itself. Calling this method has no effect on workarounds that are already
applied.workarounds - the new workarounds, not nullpublic void addWorkaround(Workaround workaround)
Workarounds.workaround - the new workaround, not nullpublic void removeWorkaround(Workaround workaround)
Workarounds.workaround - the workaround to removepublic Workaround[] getWorkarounds()
Workarounds that are currently active.public void markAsGlassPane(Component component)
component
are not visible.component - the component to mark completely transparentpublic boolean supportsTransparency(Window window)
Workaround that supports per-pixel transparency. Transparency
means that some pixels are visible, while others are not.window - the window to testpublic boolean setTransparent(Window window, Shape shape)
window transparent, any pixel not inside shape is not painted.window - the window that should be transparentshape - the visible part of the window, null if the entire window should be visibletrue if the window was made transparentpublic boolean supportsTranslucency(Window window)
Workaround that supports per-pixel translucency. Translucency
means that some pixels may have another alpha value than others.window - the window to testpublic boolean setTranslucent(Window window)
window translucent, meaning that the opacity of each pixel is defined by the
alpha value or the Color that was used to paint over that pixel.window - the window that should be translucenttrue if the window is now translucentpublic void setup(DockController controller)
Workaround.setup(DockController) method of all installed Workarounds, in the order
of which the workarounds were installed.controller - a newly created controllerCopyright © 2017 Docking Frames. All rights reserved.