public class ScreenWindowShapeAdapter extends Object
ScreenWindowShapeAdapter
makes a connection between a ScreenDockWindow
and a ScreenWindowShape
forwarding events and calls from one of the to the other.Constructor and Description |
---|
ScreenWindowShapeAdapter(ScreenDockWindow screenDockWindow,
Window window)
Creates a new adapter.
|
Modifier and Type | Method and Description |
---|---|
void |
disable()
Disables this adapater, the
ScreenWindowShape is set to null by this method. |
ScreenDockWindow |
getScreenDockWindow()
Gets the
ScreenDockWindow whose shape is changed. |
Window |
getWindow()
Gets the
Window whose shape is changed. |
boolean |
isEnabled()
Whether this adapter actually forwards the shapes.
|
void |
setShape(ScreenWindowShape shape)
Sets the shape to apply, this method does nothing if this adapter is not
enabled . |
protected void |
setShape(Shape shape)
Sets the shape of
the window . |
public ScreenWindowShapeAdapter(ScreenDockWindow screenDockWindow, Window window)
screenDockWindow
- the window representing window
window
- the window whose shape is changedpublic ScreenDockWindow getScreenDockWindow()
ScreenDockWindow
whose shape is changed.null
public Window getWindow()
Window
whose shape is changed.null
public boolean isEnabled()
public void disable()
ScreenWindowShape
is set to null
by this method.public void setShape(ScreenWindowShape shape)
enabled
.shape
- the shape to apply or null
protected void setShape(Shape shape)
the window
. This method calls Workarounds.setTransparent(Window, Shape)
,
if transparency cannot be set then disable()
is called.shape
- the shape to set, not null