|
||||||||||
| 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, however subclasses are encouraged to use a
StationChildHandle to manage displayers and title.
New implementations of ScreenDockWindow may require the implementation of a ScreenDockFullscreenStrategy
as well.
| Method Summary | |
|---|---|
void |
addScreenDockWindowListener(ScreenDockWindowListener listener)
Adds a listener to this window, the listener has to be informed about changes of this window. |
void |
checkWindowBounds()
Ensures the correctness of the boundaries of this window. |
boolean |
contains(int x,
int y)
Tells whether the point x/y is over this window or not. |
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. |
java.awt.Insets |
getDockableInsets()
Gets the distances between the edges of the window and the edges of the Dockable. |
java.awt.Rectangle |
getNormalBounds()
Gets the boundaries this window should use if not in fullscreen mode. |
java.awt.Point |
getOffsetDrop()
Gets an offset that will be added to the location when dropping a window. |
java.awt.Point |
getOffsetMove()
Gets an offset that will be subtracted from the location when moving the window around. |
ScreenDockStation |
getStation()
Gets the station which owns this window. |
java.awt.Point |
getTitleCenter()
Gets the center of the title of this window. |
java.awt.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. |
boolean |
inTitleArea(int x,
int y)
Checks whether at x/y there is a title. |
boolean |
isFullscreen()
Tells whether this window is in fullscreen mode or not. |
boolean |
isVisible()
Tells whether this window is visible or not. |
void |
removeScreenDockWindowListener(ScreenDockWindowListener listener)
Removes a listener from this window. |
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 |
setFullscreen(boolean fullscreen)
Changes the mode of this window to fullscreen or to normal. |
void |
setFullscreenStrategy(ScreenDockFullscreenStrategy strategy)
Tells this window what strategy to use for handling fullscreen mode. |
void |
setNormalBounds(java.awt.Rectangle bounds)
Sets the boundaries this window should use if not in fullscreen mode. |
void |
setPaintCombining(CombinerTarget target)
Sets whether this window should paint some additional markings which indicate that a Dockable is about to be dropped onto it. |
void |
setVisible(boolean visible)
Changes the visibility state of this window. |
void |
setWindowBounds(java.awt.Rectangle bounds,
boolean screenCoordinates)
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 addScreenDockWindowListener(ScreenDockWindowListener listener)
listener - the new listenervoid removeScreenDockWindowListener(ScreenDockWindowListener listener)
listener - the listener to removevoid 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 nullScreenDockStation getStation()
nullvoid setDockable(Dockable dockable)
Dockable which should be shown on this window.
dockable - the new element, can be null to remove
an old DockableDockable getDockable()
Dockable which is currently shown in this window.
nullsetDockable(Dockable)java.awt.Point getTitleCenter()
nullvoid toFront()
void setFullscreenStrategy(ScreenDockFullscreenStrategy strategy)
strategy - the strategyvoid setFullscreen(boolean fullscreen)
ScreenDockFullscreenStrategy.setFullscreen(ScreenDockWindow, boolean),
subclasses may execute additional code.
fullscreen - the new stateboolean isFullscreen()
ScreenDockFullscreenStrategy.isFullscreen(ScreenDockWindow), subclasses
may execute additional checks.
true if fullscreen mode is activevoid setVisible(boolean visible)
visible - the new stateboolean isVisible()
void destroy()
void setPaintCombining(CombinerTarget target)
Dockable is about to be dropped onto it.ScreenDockStation.getPaint() to get
an algorithm that paints.
target - if null then nothing should be painted, otherwise
the method CombinerTarget.paint(java.awt.Graphics, java.awt.Component, bibliothek.gui.dock.station.StationPaint, Rectangle, Rectangle)
should be calledjava.awt.Rectangle getWindowBounds()
void setWindowBounds(java.awt.Rectangle bounds,
boolean screenCoordinates)
ScreenDockStation.getBoundaryRestriction() to check the validity
of the new bounds.
bounds - the new location and sizescreenCoordinates - whether the location is relative to the real screen (true)
or relative to the coordinate of this window (false).void setNormalBounds(java.awt.Rectangle bounds)
ScreenDockFullscreenStrategy and is usually set to null if this
window is not in fullscreen mode.
bounds - the normal bounds, can be nulljava.awt.Rectangle getNormalBounds()
nullvoid checkWindowBounds()
ScreenDockStation.getBoundaryRestriction() to do so.
void validate()
java.awt.Insets getDockableInsets()
Dockable. This is only an estimate and does not have
to be correct. Implementations using DockableDisplayer should
call DockableDisplayer.getDockableInsets() as well.
nulljava.awt.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.
nulljava.awt.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
boolean inTitleArea(int x,
int y)
x/y there is a title.
x - an x coordinate in the screeny - an y coordinate in the screen
true if there is a title, false
otherwise
boolean contains(int x,
int y)
x/y is over this window or not.
x - an x coordinate in the screeny - an y coordinate in the screen
true if this window is under
x/y, false otherwise
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||