|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.util.Workarounds
public class Workarounds
Utility class providing help for bugs or specialities present in some versions of the JRE or
in some libraries. Workarounds
is implemented as singleton, as there is only one JRE and
usually libraries are not loaded multiple times as well.
Constructor Summary | |
---|---|
Workarounds()
|
Method Summary | |
---|---|
void |
addWorkaround(Workaround workaround)
Adds a new workaround to this Workarounds . |
static Workarounds |
getDefault()
Gets access to the currently used Workarounds s. |
Workaround[] |
getWorkarounds()
Gets all the Workaround s 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)
Seets 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 Workaround s, in the order
of which the workarounds were installed. |
boolean |
supportsTranslucency(Window window)
Tells whether there is a least one Workaround that supports perpixel translucency. |
boolean |
supportsTransparency(Window window)
Tells whether there is at least one Workaround that supports perpixel 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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Workarounds()
Method Detail |
---|
public static Workarounds getDefault()
Workarounds
s.
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 workaround
className
- the name of the class to install
true
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 null
public void addWorkaround(Workaround workaround)
Workarounds
.
workaround
- the new workaround, not null
public void removeWorkaround(Workaround workaround)
Workarounds
.
workaround
- the workaround to removepublic Workaround[] getWorkarounds()
Workaround
s 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 perpixel transparency. Transparency
means that some pixels are visible, while others are not.
window
- the window to test
public 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 visible
true
if the window was made transparentpublic boolean supportsTranslucency(Window window)
Workaround
that supports perpixel translucency. Translucency
means that some pixels may have another alpha value than others.
window
- the window to test
public 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 translucent
true
if the winodw is now translucentpublic void setup(DockController controller)
Workaround.setup(DockController)
method of all installed Workaround
s, in the order
of which the workarounds were installed.
controller
- a newly created controller
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |