|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ScreenDockWindow
A ScreenDockWindow
is used by a ScreenDockStation
to show
a Dockable
on the screen. Subclasses are free to show the Dockable
in any way they like, there are however a few things that should be handled
the same way in all implementations:
DisplayerCollection
accessible through ScreenDockStation.getDisplayers()
to
create and destroy DockableDisplayer
s.ScreenDockStation.createDockTitle(Dockable)
to create new DockTitle
s for Dockable
s
Method Summary | |
---|---|
void |
checkWindowBounds()
Ensures the correctness of the boundaries of this window. |
void |
destroy()
Informs this window that it is no longer used by the station and will never be used again. |
Dockable |
getDockable()
Gets the Dockable which is currently shown in this window. |
Insets |
getDockableInsets()
Gets the distances between the edges of the window and the edges of the Dockable . |
Point |
getOffsetDrop()
Gets an offset that will be added to the location when dropping a window. A value of null indicates that no such offset is
available. |
Point |
getOffsetMove()
Gets an offset that will be subtracted from the location when moving the window around. |
Rectangle |
getWindowBounds()
Gets the boundaries of the window. |
boolean |
inCombineArea(int x,
int y)
Checks what would happen if a Dockable is dropped at point
x/y . |
void |
setController(DockController controller)
Sets the controller in whose realm this window will be used. |
void |
setDockable(Dockable dockable)
Sets the Dockable which should be shown on this window. |
void |
setPaintCombining(boolean paint)
Sets whether this window should paint some additional markings which indicate that a Dockable is about to be dropped onto it.Subclasses should use ScreenDockStation.getPaint() to get
an algorithm that paints. |
void |
setVisible(boolean visible)
Changes the visibility state of this window. |
void |
setWindowBounds(Rectangle bounds)
Sets the bounds the window is supposed to have. |
void |
toFront()
Called when this window should become the focus owner and be shown at the most prominent location. |
void |
validate()
Forces this window to update the boundaries of its children. |
Method Detail |
---|
void setController(DockController controller)
ScreenDockStation
was set, so AbstractDockStation.getController()
will always
return the same value as controller
. This also implies
that any method of the station called from this method already uses the
new controller.
controller
- the new controller, can be null
void setDockable(Dockable dockable)
Dockable
which should be shown on this window.
dockable
- the new element, can be null
to remove
an old Dockable
Dockable getDockable()
Dockable
which is currently shown in this window.
null
setDockable(Dockable)
void toFront()
void setVisible(boolean visible)
visible
- the new statevoid destroy()
void setPaintCombining(boolean paint)
Dockable
is about to be dropped onto it.ScreenDockStation.getPaint()
to get
an algorithm that paints.
paint
- true
if something should be painted,
false
otherwiseRectangle getWindowBounds()
void setWindowBounds(Rectangle bounds)
ScreenDockStation.getBoundaryRestriction()
to check the validity
of the new bounds.
bounds
- the new location and sizevoid checkWindowBounds()
ScreenDockStation.getBoundaryRestriction()
to do so.
void validate()
Insets getDockableInsets()
Dockable
. This is only an estimate and does not have
to be correct. Implementations using DockableDisplayer
should
call DockableDisplayer.getDockableInsets()
as well.
null
Point getOffsetMove()
DockTitle
of the Dockable
shown in this
window. The value null
can be returned to indicate
that such an offset is not available.
null
Point getOffsetDrop()
null
indicates that no such offset is
available.
null
boolean inCombineArea(int x, int y)
Dockable
is dropped at point
x/y
.
x
- an x coordinate in the screeny
- an y coordinate in the screen
true
if dropping a Dockable
at
x/y
should lead to a combination of the dropped element
and the element in this window, false
otherwise
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |