bibliothek.gui.dock.station.screen.window
Class DefaultScreenDockWindowFactory

java.lang.Object
  extended by bibliothek.gui.dock.station.screen.window.DefaultScreenDockWindowFactory
All Implemented Interfaces:
ScreenDockWindowFactory

public class DefaultScreenDockWindowFactory
extends Object
implements ScreenDockWindowFactory

A default implementation of ScreenDockWindowFactory.

Author:
Benjamin Sigg

Nested Class Summary
static class DefaultScreenDockWindowFactory.Kind
          The kind of window that can be produced
 
Constructor Summary
DefaultScreenDockWindowFactory()
           
 
Method Summary
 ScreenDockWindow createWindow(ScreenDockStation station, WindowConfiguration configuration)
          Creates a new window which will be used by station.
 DefaultScreenDockWindowFactory.Kind getKind()
          Gets the kind of window this factory creates.
 Icon getTitleIcon()
          Gets the icon which is used in decorated titles.
 String getTitleText()
          Gets the text which is used in decorated titles.
 boolean isShowDockTitle()
          Tells whether the DockTitle is normally shown on the window.
 boolean isUndecorated()
          Tells whether new windows will be decorated or not.
 void setKind(DefaultScreenDockWindowFactory.Kind kind)
          Sets the kind of window that this factory will create
 void setShowDockTitle(boolean showDockTitle)
          Sets whether the DockTitle is normally shown on the window.
 void setTitleIcon(Icon titleIcon)
          Sets the icon which should be used in the decorated title.
 void setTitleText(String titleText)
          Sets the text which is used in decorated titles.
 void setUndecorated(boolean undecorated)
          Sets whether the windows created by this factory should be undecorated or not.
 ScreenDockWindow updateWindow(ScreenDockWindow window, WindowConfiguration configuration, ScreenDockStation station)
          This method is called if the result of ScreenDockStation.getOwner() changed, i.e.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultScreenDockWindowFactory

public DefaultScreenDockWindowFactory()
Method Detail

setKind

public void setKind(DefaultScreenDockWindowFactory.Kind kind)
Sets the kind of window that this factory will create

Parameters:
kind - the kind of window

getKind

public DefaultScreenDockWindowFactory.Kind getKind()
Gets the kind of window this factory creates.

Returns:
the kind of window

setUndecorated

public void setUndecorated(boolean undecorated)
Sets whether the windows created by this factory should be undecorated or not.

Parameters:
undecorated - true if they should not be decorated, false otherwise

isUndecorated

public boolean isUndecorated()
Tells whether new windows will be decorated or not.

Returns:
true if they are not decorated

setShowDockTitle

public void setShowDockTitle(boolean showDockTitle)
Sets whether the DockTitle is normally shown on the window.

Parameters:
showDockTitle - true if the title is shown, false otherwise

isShowDockTitle

public boolean isShowDockTitle()
Tells whether the DockTitle is normally shown on the window.

Returns:
true if shown, false otherwise

setTitleIcon

public void setTitleIcon(Icon titleIcon)
Sets the icon which should be used in the decorated title.

Parameters:
titleIcon - the icon, null if the icon of the Dockable should be used.

getTitleIcon

public Icon getTitleIcon()
Gets the icon which is used in decorated titles.

Returns:
the icon, can be null

setTitleText

public void setTitleText(String titleText)
Sets the text which is used in decorated titles.

Parameters:
titleText - the text, null if the text of the Dockable should be used

getTitleText

public String getTitleText()
Gets the text which is used in decorated titles.

Returns:
the text, can be null

updateWindow

public ScreenDockWindow updateWindow(ScreenDockWindow window,
                                     WindowConfiguration configuration,
                                     ScreenDockStation station)
Description copied from interface: ScreenDockWindowFactory
This method is called if the result of ScreenDockStation.getOwner() changed, i.e. if the ScreenDockStation has a new owner. This method may replace the existing window with a new window if necessary.

Specified by:
updateWindow in interface ScreenDockWindowFactory
Parameters:
window - the currently shown window
configuration - the configuration that was used to create window
station - the owner of the window
Returns:
the replacement, a value of null or window means that nothing happens

createWindow

public ScreenDockWindow createWindow(ScreenDockStation station,
                                     WindowConfiguration configuration)
Description copied from interface: ScreenDockWindowFactory
Creates a new window which will be used by station.

Specified by:
createWindow in interface ScreenDockWindowFactory
Parameters:
station - the owner of the window
configuration - information about how the window has to look depending on its future Dockable and on the current ScreenDockWindowConfiguration.
Returns:
the new window