bibliothek.util.workarounds
Interface Workaround

All Known Implementing Classes:
Java6Workaround, Java7Workaround

public interface Workaround

A Workaround provides code to workaround an issue that is only present in some versions of the JRE or in some libraries.

Author:
Benjamin Sigg

Method Summary
 void markAsGlassPane(Component component)
          Called for any Component which is used as glass pane (as invisible panel).
 boolean setTranslucent(Window window)
          Makes the window window translucent.
 boolean setTransparent(Window window, Shape shape)
          Makes the window window transparent in all the regions that are not inside shape.
 void setup(DockController controller)
          Called whenever a new DockController is created, the Workaround may modify the controller in any way it likes (e.g.
 boolean supportsPerpixelTranslucency(Window window)
          Tells whether this Workaround has the abbility to make window translucent.
 boolean supportsPerpixelTransparency(Window window)
          Tells whether this Workaround has the abbility to make window transparent.
 

Method Detail

setup

void setup(DockController controller)
Called whenever a new DockController is created, the Workaround may modify the controller in any way it likes (e.g. install specialied factories).

Parameters:
controller - the DockController which was just created and initialized

markAsGlassPane

void markAsGlassPane(Component component)
Called for any Component which is used as glass pane (as invisible panel).

Parameters:
component - the component that is invisible

supportsPerpixelTranslucency

boolean supportsPerpixelTranslucency(Window window)
Tells whether this Workaround has the abbility to make window translucent. Translucent means that each pixel of the window can have its own alpha value.

Parameters:
window - the window to test
Returns:
whether translucency is an option

setTranslucent

boolean setTranslucent(Window window)
Makes the window window translucent. See Workarounds.setTranslucent(Window) for a more detailed description.

Parameters:
window - the window that should be transparent
Returns:
whether translucency is supported for window

supportsPerpixelTransparency

boolean supportsPerpixelTransparency(Window window)
Tells whether this Workaround has the abbility to make window transparent. Transparent means that some pixels of the window cannot be seen.

Parameters:
window - the widnow to test
Returns:
whether transparency is an option

setTransparent

boolean setTransparent(Window window,
                       Shape shape)
Makes the window window transparent in all the regions that are not inside shape.

Parameters:
window - the window that should be transparent
shape - the shape of the window, or null if the window should not be transparent
Returns:
whether transparency is supported for window