|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.gui.dock.station.screen.DisplayerScreenDockWindow
public abstract class DisplayerScreenDockWindow
A window that uses a DockableDisplayer
to show the Dockable
.
Constructor Summary | |
---|---|
DisplayerScreenDockWindow(ScreenDockStation station)
Creates a new window |
Method Summary | |
---|---|
void |
addScreenDockWindowListener(ScreenDockWindowListener listener)
Adds a listener to this window, the listener has to be informed about changes of this window. |
protected void |
discardDisplayer()
Replaces the current DockableDisplayer with a new instance. |
protected void |
fireFullscreenChanged()
Informs all listeners that the fullscreen state changed |
protected void |
fireShapeChanged()
Informs all listeners that the current size or position changed |
protected void |
fireVisibilityChanged()
Informs all listeners that the visibility state changed |
DockController |
getController()
Gets the controller in whose realm this window is used. |
Dockable |
getDockable()
Gets the Dockable which is currently shown in this window. |
Rectangle |
getNormalBounds()
Gets the boundaries this window should use if not in fullscreen mode. |
Point |
getOffsetDrop()
Gets an offset that will be added to the location when dropping a window. |
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. |
protected abstract Component |
getWindowComponent()
Gets the component on which ScreenDockWindow.setWindowBounds(java.awt.Rectangle)
is applied. |
boolean |
inCombineArea(int x,
int y)
Checks what would happen if a Dockable is dropped at point
x/y . |
boolean |
isFullscreen()
Tells whether this window is in fullscreen mode or not. |
boolean |
isShowTitle()
Tells whether the DockTitle is generally shown. |
protected ScreenDockWindowListener[] |
listeners()
Gets a list of all listeners that are currently registered. |
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(Rectangle bounds)
Sets the boundaries this window should use if not in fullscreen mode. |
void |
setShowTitle(boolean showTitle)
Sets whether the DockTitle should be shown or not. |
protected abstract void |
showDisplayer(DockableDisplayer displayer)
Forces the subclass of this window to show displayer . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface bibliothek.gui.dock.station.screen.ScreenDockWindow |
---|
checkWindowBounds, destroy, getDockableInsets, getWindowBounds, isVisible, setPaintCombining, setVisible, setWindowBounds, toFront, validate |
Constructor Detail |
---|
public DisplayerScreenDockWindow(ScreenDockStation station)
station
- the owner of this window, not null
Method Detail |
---|
public void addScreenDockWindowListener(ScreenDockWindowListener listener)
ScreenDockWindow
addScreenDockWindowListener
in interface ScreenDockWindow
listener
- the new listenerpublic void removeScreenDockWindowListener(ScreenDockWindowListener listener)
ScreenDockWindow
removeScreenDockWindowListener
in interface ScreenDockWindow
listener
- the listener to removeprotected ScreenDockWindowListener[] listeners()
protected void fireFullscreenChanged()
protected void fireVisibilityChanged()
protected void fireShapeChanged()
protected abstract void showDisplayer(DockableDisplayer displayer)
displayer
. Only
one displayer should be shown at any time. A new displayer replaces
an old one.
displayer
- the displayer to show or null
to remove
the current displayerprotected abstract Component getWindowComponent()
ScreenDockWindow.setWindowBounds(java.awt.Rectangle)
is applied.
public void setShowTitle(boolean showTitle)
DockTitle
should be shown or not.
showTitle
- true
if the title should be visible,
false
otherwisepublic boolean isShowTitle()
DockTitle
is generally shown.
true
if the title is shownpublic Dockable getDockable()
ScreenDockWindow
Dockable
which is currently shown in this window.
getDockable
in interface ScreenDockWindow
null
ScreenDockWindow.setDockable(Dockable)
public void setDockable(Dockable dockable)
ScreenDockWindow
Dockable
which should be shown on this window.
setDockable
in interface ScreenDockWindow
dockable
- the new element, can be null
to remove
an old Dockable
protected void discardDisplayer()
DockableDisplayer
with a new instance.
public void setFullscreenStrategy(ScreenDockFullscreenStrategy strategy)
ScreenDockWindow
setFullscreenStrategy
in interface ScreenDockWindow
strategy
- the strategypublic boolean isFullscreen()
ScreenDockWindow
ScreenDockFullscreenStrategy.isFullscreen(ScreenDockWindow)
, subclasses
may execute additional checks.
isFullscreen
in interface ScreenDockWindow
true
if fullscreen mode is activepublic void setFullscreen(boolean fullscreen)
ScreenDockWindow
ScreenDockFullscreenStrategy.setFullscreen(ScreenDockWindow, boolean)
,
subclasses may execute additional code.
setFullscreen
in interface ScreenDockWindow
fullscreen
- the new statepublic void setNormalBounds(Rectangle bounds)
ScreenDockWindow
ScreenDockFullscreenStrategy
and is usually set to null
if this
window is not in fullscreen mode.
setNormalBounds
in interface ScreenDockWindow
bounds
- the normal bounds, can be null
public Rectangle getNormalBounds()
ScreenDockWindow
getNormalBounds
in interface ScreenDockWindow
null
public void setController(DockController controller)
ScreenDockWindow
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.
setController
in interface ScreenDockWindow
controller
- the new controller, can be null
public Point getOffsetDrop()
ScreenDockWindow
null
indicates that no such offset is
available.
getOffsetDrop
in interface ScreenDockWindow
null
public Point getOffsetMove()
ScreenDockWindow
DockTitle
of the Dockable
shown in this
window. The value null
can be returned to indicate
that such an offset is not available.
getOffsetMove
in interface ScreenDockWindow
null
public boolean inCombineArea(int x, int y)
ScreenDockWindow
Dockable
is dropped at point
x/y
.
inCombineArea
in interface ScreenDockWindow
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
otherwisepublic DockController getController()
null
public ScreenDockStation getStation()
ScreenDockWindow
getStation
in interface ScreenDockWindow
null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |