|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.gui.dock.station.screen.window.DisplayerScreenDockWindow
public abstract class DisplayerScreenDockWindow
A window that uses a DockableDisplayer
to show the Dockable
.
Nested Class Summary | |
---|---|
protected class |
DisplayerScreenDockWindow.Background
The algorithm that paints the background of this window. |
Constructor Summary | |
---|---|
DisplayerScreenDockWindow(ScreenDockStation station,
WindowConfiguration configuration)
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. |
boolean |
contains(int x,
int y)
Tells whether the point x/y is over this window or not. |
protected WindowMover |
createTitleMover()
Creates a new WindowMover which is used to move this window if the DockTitle
is dragged by the mouse. |
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 |
WindowConfiguration |
getConfiguration()
Gets the configuration which was used to set up this window. |
DockController |
getController()
Gets the controller in whose realm this window is used. |
Dockable |
getDockable()
Gets the Dockable which is currently shown in this window. |
DockableDisplayer |
getDockableDisplayer()
Gets the DockableDisplayer which manages the dockable . |
Dimension |
getMinimumWindowSize()
Gets the minimum size this window should have. |
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. 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. |
ScreenDockStation |
getStation()
Gets the station which owns this window. |
Point |
getTitleCenter()
Gets the center of the title of this window. |
protected abstract Component |
getWindowComponent()
Gets the component on which ScreenDockWindow.setWindowBounds(java.awt.Rectangle, boolean)
is applied. |
boolean |
inCombineArea(int x,
int y)
Checks what would happen if a Dockable is dropped at point
x/y . |
protected void |
init(WindowConfiguration configuration)
Called the first time when a Dockable is set. |
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. |
protected boolean |
isMoveOnTitleGrab()
Tells whether this window can be moved by grabbing the title. |
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. |
protected abstract void |
setBackground(BackgroundAlgorithm background)
Sets the algorithm that paints the background of 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, setPaintRemoval, setPreventFocusStealing, setVisible, setWindowBounds, toFront, validate |
Constructor Detail |
---|
public DisplayerScreenDockWindow(ScreenDockStation station, WindowConfiguration configuration)
station
- the owner of this window, not null
configuration
- default configuration of this window, cannot be changed once the window is
createdMethod Detail |
---|
protected void init(WindowConfiguration configuration)
Dockable
is set.
configuration
- the configuration that is to be appliedprotected boolean isMoveOnTitleGrab()
WindowMover
has been createdprotected WindowMover createTitleMover()
WindowMover
which is used to move this window if the DockTitle
is dragged by the mouse. This method is only called if WindowConfiguration.isMoveOnTitleGrab()
returns true.
null
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, boolean)
is applied.
protected abstract void setBackground(BackgroundAlgorithm background)
background
- the algorithm, may be null
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 DockableDisplayer getDockableDisplayer()
ScreenDockWindow
DockableDisplayer
which manages the dockable
.
getDockableDisplayer
in interface ScreenDockWindow
null
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
public WindowConfiguration getConfiguration()
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 Dimension getMinimumWindowSize()
ScreenDockWindow
BoundaryRestriction
, but there are no guarantees that
the window is not made smaller than this size.
getMinimumWindowSize
in interface ScreenDockWindow
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 getTitleCenter()
ScreenDockWindow
getTitleCenter
in interface ScreenDockWindow
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 inTitleArea(int x, int y)
ScreenDockWindow
x/y
there is a title.
inTitleArea
in interface ScreenDockWindow
x
- an x coordinate in the screeny
- an y coordinate in the screen
true
if there is a title, false
otherwisepublic 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 boolean contains(int x, int y)
ScreenDockWindow
x/y
is over this window or not.
contains
in interface ScreenDockWindow
x
- an x coordinate in the screeny
- an y coordinate in the screen
true
if this
window is under
x/y
, 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 |