public abstract class DisplayerScreenDockWindow extends Object implements ScreenDockWindow
DockableDisplayer to show the Dockable.| Modifier and Type | Class and Description |
|---|---|
protected class |
DisplayerScreenDockWindow.Background
The algorithm that paints the background of this window.
|
| Constructor and Description |
|---|
DisplayerScreenDockWindow(ScreenDockStation station,
WindowConfiguration configuration)
Creates a new window
|
| Modifier and Type | Method and Description |
|---|---|
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
|
protected void |
fireWindowClosing()
Informs all listeners that this window wants to be closed
|
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)
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. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcheckWindowBounds, destroy, getComponent, getDockableInsets, getWindowBounds, isVisible, setPaintCombining, setPaintRemoval, setPreventFocusStealing, setVisible, setWindowBounds, toFront, validatepublic DisplayerScreenDockWindow(ScreenDockStation station, WindowConfiguration configuration)
station - the owner of this window, not nullconfiguration - default configuration of this window, cannot be changed once the window is
createdprotected 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.nullpublic void addScreenDockWindowListener(ScreenDockWindowListener listener)
ScreenDockWindowaddScreenDockWindowListener in interface ScreenDockWindowlistener - the new listenerpublic void removeScreenDockWindowListener(ScreenDockWindowListener listener)
ScreenDockWindowremoveScreenDockWindowListener in interface ScreenDockWindowlistener - the listener to removeprotected ScreenDockWindowListener[] listeners()
protected void fireFullscreenChanged()
protected void fireVisibilityChanged()
protected void fireShapeChanged()
protected void fireWindowClosing()
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.protected abstract void setBackground(BackgroundAlgorithm background)
background - the algorithm, may be nullpublic 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()
ScreenDockWindowDockable which is currently shown in this window.getDockable in interface ScreenDockWindownullScreenDockWindow.setDockable(Dockable)public DockableDisplayer getDockableDisplayer()
ScreenDockWindowDockableDisplayer which manages the dockable.getDockableDisplayer in interface ScreenDockWindownullpublic void setDockable(Dockable dockable)
ScreenDockWindowDockable which should be shown on this window.setDockable in interface ScreenDockWindowdockable - the new element, can be null to remove
an old Dockablepublic WindowConfiguration getConfiguration()
protected void discardDisplayer()
DockableDisplayer with a new instance.public void setFullscreenStrategy(ScreenDockFullscreenStrategy strategy)
ScreenDockWindowsetFullscreenStrategy in interface ScreenDockWindowstrategy - the strategypublic boolean isFullscreen()
ScreenDockWindowScreenDockFullscreenStrategy.isFullscreen(ScreenDockWindow), subclasses
may execute additional checks.isFullscreen in interface ScreenDockWindowtrue if fullscreen mode is activepublic void setFullscreen(boolean fullscreen)
ScreenDockWindowScreenDockFullscreenStrategy.setFullscreen(ScreenDockWindow, boolean),
subclasses may execute additional code.setFullscreen in interface ScreenDockWindowfullscreen - the new statepublic void setNormalBounds(Rectangle bounds)
ScreenDockWindowScreenDockFullscreenStrategy and is usually set to null if this
window is not in fullscreen mode.setNormalBounds in interface ScreenDockWindowbounds - the normal bounds, can be nullpublic Rectangle getNormalBounds()
ScreenDockWindowgetNormalBounds in interface ScreenDockWindownullpublic Dimension getMinimumWindowSize()
ScreenDockWindowBoundaryRestriction, but there are no guarantees that
the window is not made smaller than this size.getMinimumWindowSize in interface ScreenDockWindowpublic void setController(DockController controller)
ScreenDockWindowScreenDockStation
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 ScreenDockWindowcontroller - the new controller, can be nullpublic Point getTitleCenter()
ScreenDockWindowgetTitleCenter in interface ScreenDockWindownullpublic Point getOffsetDrop()
ScreenDockWindownull indicates that no such offset is
available.getOffsetDrop in interface ScreenDockWindownullpublic Point getOffsetMove()
ScreenDockWindowDockTitle 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 ScreenDockWindownullpublic boolean inTitleArea(int x,
int y)
ScreenDockWindowx/y there is a title.inTitleArea in interface ScreenDockWindowx - an x coordinate in the screeny - an y coordinate in the screentrue if there is a title, false
otherwisepublic boolean inCombineArea(int x,
int y)
ScreenDockWindowDockable is dropped at point
x/y.inCombineArea in interface ScreenDockWindowx - an x coordinate in the screeny - an y coordinate in the screentrue 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)
ScreenDockWindowx/y is over this window or not.contains in interface ScreenDockWindowx - an x coordinate in the screeny - an y coordinate in the screentrue if this window is under
x/y, false otherwisepublic DockController getController()
nullpublic ScreenDockStation getStation()
ScreenDockWindowgetStation in interface ScreenDockWindownullCopyright © 2017 Docking Frames. All rights reserved.