|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbibliothek.gui.dock.station.screen.DisplayerScreenDockWindow
bibliothek.gui.dock.station.screen.AbstractScreenDockWindow
public abstract class AbstractScreenDockWindow
This abstract implementation of ScreenDockWindow uses a DockableDisplayer
to show the Dockable. It can operate with any window. Clients need to
call init(Component, Container, boolean) to put this object onto some
Container.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class bibliothek.gui.dock.station.screen.DisplayerScreenDockWindow |
|---|
DisplayerScreenDockWindow.Background |
| Constructor Summary | |
|---|---|
protected |
AbstractScreenDockWindow(ScreenDockStation station)
Creates a new window. |
|
AbstractScreenDockWindow(ScreenDockStation station,
java.awt.Component window,
java.awt.Container contentParent,
boolean resizeable)
Creates a new window. |
| Method Summary | |
|---|---|
void |
checkWindowBounds()
Ensures the correctness of the boundaries of this window. |
protected void |
convertPointToScreen(java.awt.Point point,
java.awt.Component component)
Converts point which is relative to component to a point on the screen. |
protected SecureContainer |
createContent()
Creates the component that will be used as content-pane. |
DockableDisplayer |
getDisplayer()
Gets the displayer which is shown on this dialog. |
protected java.awt.Container |
getDisplayerParent()
Gets the container on which the displayer is shown. |
java.awt.Insets |
getDockableInsets()
Makes a guess how big the insets of the Dockable compared to
the whole dialog are. |
protected javax.swing.Icon |
getTitleIcon()
Gets the icon which should be used in the title. |
protected java.lang.String |
getTitleText()
Gets the text which should be used in the title. |
java.awt.Rectangle |
getWindowBounds()
Gets the boundaries of the window. |
protected java.awt.Component |
getWindowComponent()
Gets the component on which ScreenDockWindow.setWindowBounds(java.awt.Rectangle, boolean)
is applied. |
protected void |
init(java.awt.Component window,
java.awt.Container contentParent,
boolean resizeable)
Initializes this window. |
void |
invalidate()
Invalidates the layout of this window. |
boolean |
isVisible()
Tells whether this window is visible or not. |
protected 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. |
protected void |
setCursor(java.awt.Cursor cursor)
Sets the current cursor of this window |
void |
setDockable(Dockable dockable)
Sets the Dockable which should be shown on this window. |
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 |
setTitleIcon(javax.swing.Icon titleIcon)
Explicitly sets the icon of the title. |
void |
setTitleText(java.lang.String titleText)
Explicitly sets the text of the title. |
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. |
protected void |
showDisplayer(DockableDisplayer displayer)
Forces the subclass of this window to show displayer. |
protected void |
updateTitleIcon()
Called when the icon of the title should be updated. |
protected void |
updateTitleText()
Called when the text of the title should be updated. |
void |
validate()
Forces this window to update the boundaries of its children. |
| Methods inherited from class bibliothek.gui.dock.station.screen.DisplayerScreenDockWindow |
|---|
addScreenDockWindowListener, contains, discardDisplayer, fireFullscreenChanged, fireShapeChanged, fireVisibilityChanged, getController, getDockable, getNormalBounds, getOffsetDrop, getOffsetMove, getStation, getTitleCenter, inCombineArea, inTitleArea, isFullscreen, isShowTitle, listeners, removeScreenDockWindowListener, setFullscreen, setFullscreenStrategy, setNormalBounds, setShowTitle |
| 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 |
|---|
destroy, toFront |
| Constructor Detail |
|---|
protected AbstractScreenDockWindow(ScreenDockStation station)
init(Component, Container, boolean)
when using this constructor.
station - the owner of this window
public AbstractScreenDockWindow(ScreenDockStation station,
java.awt.Component window,
java.awt.Container contentParent,
boolean resizeable)
station - the owner of this windowwindow - the root component of this windowcontentParent - the container onto which the contents of this window will be putresizeable - whether this window should create its own resizing system or notinit(Component, Container, boolean)| Method Detail |
|---|
protected void init(java.awt.Component window,
java.awt.Container contentParent,
boolean resizeable)
window - the component which represents the window. This component
will be used when calling methods like setWindowBounds(Rectangle, boolean). It
is the root of this whole window.contentParent - the container which will be used as parent for the
contents of this window. This method will change the LayoutManager
and add a child to contentParent. This component can be
the same as window.resizeable - If true, then a new border is installed
for the displayer parent, and some MouseListeners
are installed. When the mouse is over the border it will change the cursor
and the user can resize or move the window. If false
nothing happens and the resizing system has to be implemented by the
subclass.public 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 ScreenDockWindowsetController in class DisplayerScreenDockWindowcontroller - the new controller, can be nullprotected java.awt.Component getWindowComponent()
DisplayerScreenDockWindowScreenDockWindow.setWindowBounds(java.awt.Rectangle, boolean)
is applied.
getWindowComponent in class DisplayerScreenDockWindowprotected void setBackground(BackgroundAlgorithm background)
DisplayerScreenDockWindow
setBackground in class DisplayerScreenDockWindowbackground - the algorithm, may be nullpublic void setDockable(Dockable dockable)
ScreenDockWindowDockable which should be shown on this window.
setDockable in interface ScreenDockWindowsetDockable in class DisplayerScreenDockWindowdockable - the new element, can be null to remove
an old Dockableprotected void showDisplayer(DockableDisplayer displayer)
DisplayerScreenDockWindowdisplayer. Only
one displayer should be shown at any time. A new displayer replaces
an old one.
showDisplayer in class DisplayerScreenDockWindowdisplayer - the displayer to show or null to remove
the current displayerpublic void setTitleIcon(javax.swing.Icon titleIcon)
titleIcon - the new icon or null to use the
Dockables icon.protected javax.swing.Icon getTitleIcon()
protected void updateTitleIcon()
getTitleIcon()public void setTitleText(java.lang.String titleText)
titleText - the new text or null to use
the Dockables title text.protected java.lang.String getTitleText()
nullprotected void updateTitleText()
getTitleText()public java.awt.Rectangle getWindowBounds()
ScreenDockWindow
public void setPaintCombining(CombinerTarget target)
ScreenDockWindowDockable 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 calledpublic void setVisible(boolean visible)
ScreenDockWindow
visible - the new statepublic boolean isVisible()
ScreenDockWindow
public void setWindowBounds(java.awt.Rectangle bounds,
boolean screenCoordinates)
ScreenDockWindowScreenDockStation.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).public void checkWindowBounds()
ScreenDockWindowScreenDockStation.getBoundaryRestriction() to do so.
public void invalidate()
Component.invalidate()public void validate()
ScreenDockWindow
protected void setCursor(java.awt.Cursor cursor)
cursor - the cursorComponent.setCursor(Cursor)
protected void convertPointToScreen(java.awt.Point point,
java.awt.Component component)
point which is relative to component to a point on the screen.
point - the point to modifycomponent - specifies the coordinate systemSwingUtilities.convertPointToScreen(Point, Component)public java.awt.Insets getDockableInsets()
Dockable compared to
the whole dialog are.
protected SecureContainer createContent()
content-pane.
This method is invoked by the constructor.
protected java.awt.Container getDisplayerParent()
public DockableDisplayer getDisplayer()
nullshowDisplayer(DockableDisplayer)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||