|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbibliothek.gui.dock.common.CControl
public class CControl
Manages the interaction between SingleCDockable, MultipleCDockable
and CStations.
Clients should call read and write of the
ApplicationResourceManager, accessible through getResources(),
to store or load the configuration.
Clients which do no longer need a CControl can call destroy()
to free resources.
| Field Summary | |
|---|---|
static PropertyKey<CControl> |
CCONTROL
A key for this CControl. |
static String |
CONTENT_AREA_STATIONS_ID
the unique id of the default- CContentArea created by this control |
static String |
EXTERNALIZED_STATION_ID
the unique id of the station that handles the externalized dockables |
static PropertyKey<KeyStroke> |
KEY_CLOSE
KeyStroke used to close a CDockable. |
static PropertyKey<KeyStroke> |
KEY_GOTO_EXTERNALIZED
KeyStroke used to change a CDockable into
externalized-state. |
static PropertyKey<KeyStroke> |
KEY_GOTO_MAXIMIZED
KeyStroke used to change a CDockable into
maximized-state. |
static PropertyKey<KeyStroke> |
KEY_GOTO_MINIMIZED
KeyStroke used to change a CDockable into
minimized-state. |
static PropertyKey<KeyStroke> |
KEY_GOTO_NORMALIZED
KeyStroke used to change a CDockable into
normalized-state. |
static PropertyKey<KeyStroke> |
KEY_MAXIMIZE_CHANGE
KeyStroke used to change a CDockable into maximized-state,
or to go out of maximized-state when needed. |
static PropertyKey<ConflictResolver<RequestDimension>> |
RESIZE_LOCK_CONFLICT_RESOLVER
ConflictResolver used to determine what happens when there is
a conflict between two resize requests on a SplitDockStation like
CGridArea, CWorkingArea or CContentArea. |
| Constructor Summary | |
|---|---|
CControl()
Creates a new control. |
|
CControl(boolean restrictedEnvironment)
Creates a new control |
|
CControl(JFrame frame)
Creates a new control |
|
CControl(JFrame frame,
boolean restrictedEnvironment)
Creates a new control |
|
CControl(JFrame frame,
CControlFactory factory)
Creates a new control |
|
CControl(WindowProvider window)
Creates a new control |
|
CControl(WindowProvider window,
boolean restrictedEnvironment)
Creates a new control |
|
CControl(WindowProvider window,
CControlFactory factory)
Creates a new control |
|
| Method Summary | ||
|---|---|---|
void |
add(CStation<?> station,
boolean root)
Adds an additional station to this control. |
|
|
add(M dockable)
Adds a dockable to this control. |
|
|
add(M dockable,
String uniqueId)
Adds a dockable to this control. |
|
|
add(S dockable)
Adds a dockable to this control. |
|
void |
add(String id,
MultipleCDockableFactory<?,?> factory)
Deprecated. use addMultipleDockableFactory(String, MultipleCDockableFactory) |
|
void |
addContentArea(CContentArea content)
Deprecated. this method has not the same behavior as createContentArea(String),
this method will either be removed in future releases or change its
behavior |
|
void |
addControlListener(CControlListener listener)
Adds a listener to this control. |
|
void |
addDestroyHook(DestroyHook hook)
Adds a destroy-hook. |
|
void |
addDoubleClickListener(CDoubleClickListener listener)
Adds a global mouse double click listener to this control. |
|
void |
addFocusListener(CFocusListener listener)
Adds a new focus listener to this control. |
|
void |
addGlobalKeyListener(KeyListener listener)
Adds a key listener to this control that will be informed about any KeyEvent that gets processed or analyzed by this control. |
|
void |
addKeyboardListener(CKeyboardListener listener)
Adds a global keyboard listener to this control. |
|
void |
addMultipleDockableFactory(String id,
MultipleCDockableFactory<?,?> factory)
Adds a factory to this control. |
|
void |
addPropertyListener(CDockablePropertyListener listener)
Adds a global property listener. |
|
void |
addResizeRequestListener(ResizeRequestListener listener)
Adds a ResizeRequestListener to this CControl. |
|
void |
addSingleBackupFactory(String id,
SingleCDockableBackupFactory backupFactory)
Adds a backup factory to this control. |
|
void |
addStateListener(CDockableStateListener listener)
Adds a global state listener. |
|
void |
addVetoClosingListener(CVetoClosingListener listener)
Adds listener to this control, the listener will be informed whenever a set of
CDockables is about to be closed. |
|
void |
addVetoFocusListener(CVetoFocusListener listener)
Adds a new veto focus listener to this control. |
|
CContentArea |
createContentArea(String uniqueId)
Creates and adds a new CContentArea. |
|
CGridArea |
createGridArea(String uniqueId)
Creates a new area where normalized CDockables can be stored. |
|
CMinimizeArea |
createMinimizeArea(String uniqueId)
Creates a new area where minimized CDockables can be stored. |
|
CWorkingArea |
createWorkingArea(String uniqueId)
Creates and adds a new CWorkingArea to this control. |
|
void |
delete(String name)
Deletes a layout that has been stored earlier. |
|
void |
destroy()
Frees as much resources as possible. |
|
CDockable |
getCDockable(int index)
Gets the index'th dockable that is registered in this control |
|
int |
getCDockableCount()
Gets the number of CDockables that are registered in this
CControl. |
|
CContentArea |
getContentArea()
Gets the element that should be in the center of the mainframe. |
|
List<CContentArea> |
getContentAreas()
Gets an unmodifiable list of all CContentAreas registered at
this control |
|
CLocation |
getDefaultLocation()
Gets the location where CDockables are opened when nothing else
is specified. |
|
CControlFactory |
getFactory()
Gets the factory which is mainly used to create new elements for this control. |
|
CLocationModeManager |
getLocationManager()
Gets the manager that is responsible to handle all changes of the modes (maximized, normalized, ... ) of Dockables. |
|
CMaximizeBehavior |
getMaximizeBehavior()
Gets the currently used maximize-behavior. |
|
MissingCDockableStrategy |
getMissingStrategy()
Gets the strategy that tells what to do if layout information of a missing CDockable is found. |
|
MultipleCDockable |
getMultipleDockable(String id)
Searches and returns the one MultipleCDockable which uses
the unique identifier id. |
|
MultipleCDockableFactory<?,?> |
getMultipleDockableFactory(String id)
Searches for the MultipleCDockableFactory with the identifier
id. |
|
PreferenceModel |
getPreferenceModel()
Gets the preference model which is used to translate between the preferences and this. |
|
PreferenceStorage |
getPreferences()
Gets the storage container for PreferenceModels for this control. |
|
|
getProperty(PropertyKey<A> key)
Gets the value of a property. |
|
CControlRegister |
getRegister()
Gets the set of dockables, stations and other elemnts that are used by this control. |
|
ApplicationResourceManager |
getResources()
Grants access to the manager that reads and stores configurations of the common-project. |
|
WindowProvider |
getRootWindow()
Gets the root window of the application. |
|
SingleCDockableBackupFactory |
getSingleBackupFactory(String id)
Searches for the SingleCDockableBackupFactory which was registered
with the key id. |
|
SingleCDockable |
getSingleDockable(String id)
Searches for the SingleCDockable which has the unique identifier
id. |
|
CStation<?> |
getStation(DockStation intern)
Searches the CStation whose internal representation
is intern. |
|
CStation<?> |
getStation(String id)
Searches the CStation with unique identifier id. |
|
List<CStation<?>> |
getStations()
Gets an unmodifiable list of all stations that are currently registered at this control. |
|
ThemeMap |
getThemes()
Gets the list of installed themes. |
|
void |
handleResizeRequests()
Informs all ResizeRequestListeners, that the
resize request of all
CDockables should be processed. |
|
DockFrontend |
intern()
Gets the representation of the layer beneath the common-layer. |
|
String[] |
layouts()
Gets a list of all layouts that are currently known. |
|
void |
load(String name)
Loads an earlier stored layout. |
|
|
putProperty(PropertyKey<A> key,
A value)
Changes the value of a property. |
|
protected
|
putProperty(PropertyKey<A> key,
A value,
Priority priority)
Changes the value of a property. |
|
void |
read(DataInputStream in)
Reads the current and other known layouts from in. |
|
void |
read(File file)
Reads the current and other known layouts from file. |
|
void |
readXML(File file)
Reads the current and other known layouts from file. |
|
void |
readXML(XElement element)
Reads the current and other known layouts from element. |
|
void |
remove(CStation<?> station)
Removes a CStation from this control. |
|
void |
remove(MultipleCDockable dockable)
Removes a dockable from this control. |
|
boolean |
remove(SingleCDockable dockable)
Removes dockable from this control. |
|
void |
removeContentArea(CContentArea content)
Removes content from the list of known contentareas. |
|
void |
removeControlListener(CControlListener listener)
Removes a listener from this control. |
|
void |
removeDestroyHook(DestroyHook hook)
Removes a destroy-hook from this CControl. |
|
void |
removeDoubleClickListener(CDoubleClickListener listener)
Removes a listener from this control. |
|
void |
removeFocusListener(CFocusListener listener)
Removes a listener from this control. |
|
void |
removeGlobalKeyListener(KeyListener listener)
Removes a global KeyListener from this control. |
|
void |
removeKeyboardListener(CKeyboardListener listener)
Removes a listener from this control. |
|
void |
removeMultipleDockableFactory(String id)
Removes the MultipleCDockableFactory with identifier id
from this control. |
|
void |
removePropertyListener(CDockablePropertyListener listener)
Removes a global listener from this control. |
|
void |
removeResizeRequestListener(ResizeRequestListener listener)
Removes a ResizeRequestListener from this CControl. |
|
void |
removeSingleBackupFactory(String id)
Removes a backup factory from this control. |
|
boolean |
removeSingleDockable(String id)
Removes the SingleCDockable with the identifier id. |
|
void |
removeStateListener(CDockableStateListener listener)
Removes a global state listener. |
|
void |
removeVetoClosingListener(CVetoClosingListener listener)
Removes a listener from this control. |
|
void |
removeVetoFocusListener(CVetoFocusListener listener)
Removes a listener from this control. |
|
void |
replace(MultipleCDockable oldDockable,
MultipleCDockable newDockable)
Replaces oldDockable with newDockable. |
|
void |
save(String name)
Stores the current layout with the given name. |
|
void |
setDefaultLocation(CLocation defaultLocation)
Sets the location where CDockables are opened when there is
nothing else specified for these CDockables. |
|
void |
setMaximizeArea(String id)
Makes sure that all CDockables are maximized onto the area
which is registered under the given unique id. |
|
void |
setMaximizeBehavior(CMaximizeBehavior behavior)
Sets the CMaximizeBehavior. |
|
void |
setMissingStrategy(MissingCDockableStrategy missingStrategy)
Sets the strategy that tells what to do if layout information of a missing CDockable is found. |
|
void |
setPreferenceModel(PreferenceModel preferenceModel)
Sets the PreferenceModel which will be used to translate between
this and the preferences. |
|
void |
setRootWindow(WindowProvider window)
Sets the root window of the application. |
|
void |
setTheme(DockTheme theme)
Deprecated. replaced by setTheme(String). While this method still
works, the theme will not get stored persistent and any module using
the ThemeMap (getThemes()) will not be informed about
the change. |
|
void |
setTheme(String theme)
Sets the theme of the elements in the realm of this control. |
|
void |
write(DataOutputStream out)
Writes the current and all known layouts into out. |
|
void |
write(File file)
Writes the current and all known layouts into file. |
|
void |
writeXML(File file)
Writes the current and all known layouts into file in xml format. |
|
void |
writeXML(XElement element)
Writes the current and all known layouts into element. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final PropertyKey<CControl> CCONTROL
CControl. Will be set with the highest priority. To be used
wherever a DockController but not a CControl is accessible.
public static final PropertyKey<KeyStroke> KEY_MAXIMIZE_CHANGE
KeyStroke used to change a CDockable into maximized-state,
or to go out of maximized-state when needed.
public static final PropertyKey<KeyStroke> KEY_GOTO_MAXIMIZED
KeyStroke used to change a CDockable into
maximized-state.
public static final PropertyKey<KeyStroke> KEY_GOTO_NORMALIZED
KeyStroke used to change a CDockable into
normalized-state.
public static final PropertyKey<KeyStroke> KEY_GOTO_MINIMIZED
KeyStroke used to change a CDockable into
minimized-state.
public static final PropertyKey<KeyStroke> KEY_GOTO_EXTERNALIZED
KeyStroke used to change a CDockable into
externalized-state.
public static final PropertyKey<KeyStroke> KEY_CLOSE
KeyStroke used to close a CDockable.
public static final PropertyKey<ConflictResolver<RequestDimension>> RESIZE_LOCK_CONFLICT_RESOLVER
ConflictResolver used to determine what happens when there is
a conflict between two resize requests on a SplitDockStation like
CGridArea, CWorkingArea or CContentArea.
DefaultConflictResolver,
FullLockConflictResolverpublic static final String EXTERNALIZED_STATION_ID
public static final String CONTENT_AREA_STATIONS_ID
CContentArea created by this control
| Constructor Detail |
|---|
public CControl()
CControl(WindowProvider)
would be the better choice than this constructor.
public CControl(JFrame frame)
frame - the main frame of the application, needed to create
dialogs for externalized CDockablespublic CControl(boolean restrictedEnvironment)
restrictedEnvironment - whether this application runs in a
restricted environment and is not allowed to listen for global events.public CControl(WindowProvider window)
window - a provider for the main window of this application. Needed
to create dialogs for externalized CDockables. Must not be null, but
its search method may return null
public CControl(JFrame frame,
boolean restrictedEnvironment)
frame - the main frame of the application, needed to create
dialogs for externalized CDockablesrestrictedEnvironment - whether this application runs in a
restricted environment and is not allowed to listen for global events.
public CControl(WindowProvider window,
boolean restrictedEnvironment)
window - a provider for the main window of this application. Needed
to create dialogs for externalized CDockables. Must not be null, but
its search method may return nullrestrictedEnvironment - whether this application runs in a
restricted environment and is not allowed to listen for global events.
public CControl(JFrame frame,
CControlFactory factory)
frame - the main frame of the application, needed to create
dialogs for externalized CDockablesfactory - a factory which is used to create new elements for this
control.
public CControl(WindowProvider window,
CControlFactory factory)
window - a provider for the main window of this application. Needed
to create dialogs for externalized CDockables. Must not be null, but
its search method may return nullfactory - a factory which is used to create new elements for this
control.| Method Detail |
|---|
public void addControlListener(CControlListener listener)
listener - the new listenerpublic void removeControlListener(CControlListener listener)
listener - the listener to removepublic void addFocusListener(CFocusListener listener)
listener - the new listenerpublic void removeFocusListener(CFocusListener listener)
listener - the listener to removepublic void addVetoFocusListener(CVetoFocusListener listener)
listener - the new listenerpublic void removeVetoFocusListener(CVetoFocusListener listener)
listener - the listener to removepublic void addStateListener(CDockableStateListener listener)
CDockable that is known to this
control.
listener - the new listenerpublic void removeStateListener(CDockableStateListener listener)
listener - the listener to removepublic void addPropertyListener(CDockablePropertyListener listener)
CDockable that is known to this
control.
listener - the new listenerpublic void removePropertyListener(CDockablePropertyListener listener)
listener - the listener to removepublic void addKeyboardListener(CKeyboardListener listener)
Component which is a child
of a CDockable.CDockable will always
be informed first.
listener - the new listenerpublic void removeKeyboardListener(CKeyboardListener listener)
listener - the listener to removepublic void addGlobalKeyListener(KeyListener listener)
KeyEvent that gets processed or analyzed by this control. Especially
any event that gets forwarded to a CKeyboardListener gets also
forwarded to listener.
listener - the new listenerpublic void removeGlobalKeyListener(KeyListener listener)
KeyListener from this control.
listener - the listener to removepublic void addDoubleClickListener(CDoubleClickListener listener)
Component which
is a child of a CDockable.CDockable will always
be informed first.
listener - the new listenerpublic void removeDoubleClickListener(CDoubleClickListener listener)
listener - the listener to removepublic void addVetoClosingListener(CVetoClosingListener listener)
listener to this control, the listener will be informed whenever a set of
CDockables is about to be closed.CVetoClosingListeners added to the CControl are invoked before listeners that
are added to a CDockable.
listener - the new listener, not nullpublic void removeVetoClosingListener(CVetoClosingListener listener)
listener - the listener to removepublic void destroy()
CControl will no longer
work correctly after this method was called.
public CWorkingArea createWorkingArea(String uniqueId)
CWorkingArea to this control. The area
is not made visible by this method.
uniqueId - the unique id of the area
public CMinimizeArea createMinimizeArea(String uniqueId)
CDockables can be stored. This
method adds the new area directly as a root station to this control.
uniqueId - a unique identifier
public CGridArea createGridArea(String uniqueId)
CDockables can be stored.
This method adds the new area directly as a root station to this control
uniqueId - a unique identifier
public CContentArea createContentArea(String uniqueId)
CContentArea.
uniqueId - the unique id of the new contentarea, the id must be unique
in respect to all other contentareas which are registered at this control.
IllegalArgumentException - if the id is not unique
NullPointerException - if the id is null
@Deprecated
@Todo(priority=MAJOR,
compatibility=BREAK_MAJOR,
target=VERSION_1_1_0,
description="remove this method, replace by something better")
public void addContentArea(CContentArea content)
createContentArea(String),
this method will either be removed in future releases or change its
behavior
CContentArea to this control.
content - the new area
IllegalArgumentException - if the area is already in use or if
the area was not created using thispublic void removeContentArea(CContentArea content)
content from the list of known contentareas. This also removes
the stations of content from this control. Elements aboard the
stations are made invisible, but not removed from this control.
content - the contentarea to remove
IllegalArgumentException - if the default-contentarea equals contentpublic CControlRegister getRegister()
nullpublic List<CContentArea> getContentAreas()
CContentAreas registered at
this control
public CControlFactory getFactory()
public CLocationModeManager getLocationManager()
Dockables.
public void addDestroyHook(DestroyHook hook)
CControl is
destroyed through destroy().
hook - the new hookpublic void removeDestroyHook(DestroyHook hook)
CControl.
hook - the hook to removepublic ApplicationResourceManager getResources()
ApplicationResources to this manager,
however clients are strongly discouraged from removing ApplicationResource
which they did not add by themself.
public <A> void putProperty(PropertyKey<A> key,
A value)
KEY_MAXIMIZE_CHANGEKEY_GOTO_EXTERNALIZEDKEY_GOTO_MAXIMIZEDKEY_GOTO_MINIMIZEDKEY_GOTO_NORMALIZEDKEY_CLOSE
A - the type of the valuekey - the name of the propertyvalue - the new value, can be null
protected <A> void putProperty(PropertyKey<A> key,
A value,
Priority priority)
A - the type of the valuekey - the name of the propertypriority - the priority of the new valuevalue - the new value, can be nullputProperty(PropertyKey, Object)public <A> A getProperty(PropertyKey<A> key)
A - the type of the propertykey - the name of the property
nullpublic CContentArea getContentArea()
public void add(CStation<?> station,
boolean root)
CStations should
be root-stations, even if they are nested.
station - the new stationroot - true if the station should become a root station.
A root station often does not have a parent, the location of a CDockable
is always relative to its youngest parent that is a root station.public void remove(CStation<?> station)
CStation from this control. It is unspecified what
happens with the children on station
station - the station to removepublic List<CStation<?>> getStations()
public CStation<?> getStation(DockStation intern)
CStation whose internal representation
is intern.
intern - the internal representation
nullpublic CStation<?> getStation(String id)
CStation with unique identifier id.
id - the identifier
nullpublic <S extends SingleCDockable> S add(S dockable)
dockable was already registered at this CControl.
S - the type of the new elementdockable - the new element to show
dockable
IllegalArgumentException - if dockable already is registered at another CControl
or if the unique id of dockable already is used for another objectpublic SingleCDockable getSingleDockable(String id)
SingleCDockable which has the unique identifier
id.
id - the identifier to look out for
nullpublic boolean removeSingleDockable(String id)
SingleCDockable with the identifier id.
This has the same effect as calling remove(SingleCDockable).
id - the id of the element to remove
true if the element was removed, false
otherwisepublic boolean remove(SingleCDockable dockable)
dockable from this control. The location information
for dockable remains stored if either there is a
SingleCDockableBackupFactory
registered or the MissingCDockableStrategy
tells to store the values.
dockable - the element to remove
false otherwise
public void addSingleBackupFactory(String id,
SingleCDockableBackupFactory backupFactory)
SingleCDockable when one is requested that
is not yet in the cache.id available and
id should be visible, then the factory will be used
Instantaneously.
id - the id of the dockable that might be requestedbackupFactory - the new factorypublic SingleCDockableBackupFactory getSingleBackupFactory(String id)
SingleCDockableBackupFactory which was registered
with the key id.
id - the identifier of some factory
nullpublic void removeSingleBackupFactory(String id)
id will be deleted if neither a SingleCDockable
is added nor the MissingCDockableStrategy
tells to store the information.
id - the name of the factoryaddSingleBackupFactory(String, SingleCDockableBackupFactory)public <M extends MultipleCDockable> M add(M dockable)
M - the type of the new elementdockable - the new element to show
dockable
public <M extends MultipleCDockable> M add(M dockable,
String uniqueId)
add(MultipleCDockable).
M - the type of the new elementdockable - the new element to showuniqueId - id the unique id of the new element
dockable
IllegalArgumentException - if the unique identifier is already in
use, if dockable is already used elsewhere, if there is
no factory for dockable
NullPointerException - if any argument is null
public void replace(MultipleCDockable oldDockable,
MultipleCDockable newDockable)
oldDockable with newDockable. The new dockable
inherits settings and location of the old one.
oldDockable - the old dockable, not nullnewDockable - the new dockable, not nullpublic MultipleCDockable getMultipleDockable(String id)
MultipleCDockable which uses
the unique identifier id.
id - the identifier to look out for
id or null if nothing
was foundpublic void remove(MultipleCDockable dockable)
dockable - the element to removepublic int getCDockableCount()
CDockables that are registered in this
CControl.
public CDockable getCDockable(int index)
index - the index of the element
@Deprecated
public void add(String id,
MultipleCDockableFactory<?,?> factory)
addMultipleDockableFactory(String, MultipleCDockableFactory)
MultipleCDockables
when a layout is loaded.
id - the unique id of the factoryfactory - the new factory
public void addMultipleDockableFactory(String id,
MultipleCDockableFactory<?,?> factory)
MultipleCDockables
when a layout is loaded.
id - the unique id of the factoryfactory - the new factorypublic MultipleCDockableFactory<?,?> getMultipleDockableFactory(String id)
MultipleCDockableFactory with the identifier
id.
id - the identifier to search for
nullpublic void removeMultipleDockableFactory(String id)
MultipleCDockableFactory with identifier id
from this control. As a side effect all MultipleCDockables which
use that factory are removed as well. Nothing happens if there is no
factory registered with id.
id - the identifier of the factory to removepublic void setDefaultLocation(CLocation defaultLocation)
CDockables are opened when there is
nothing else specified for these CDockables.
defaultLocation - the location, can be nullpublic CLocation getDefaultLocation()
CDockables are opened when nothing else
is specified.
nullsetDefaultLocation(CLocation)public void setMaximizeArea(String id)
CDockables are maximized onto the area
which is registered under the given unique id.
id - the unique id of the areaCGridArea.getUniqueId(),
CContentArea.getCenterIdentifier()public void setMaximizeBehavior(CMaximizeBehavior behavior)
CMaximizeBehavior. The behavior decides what happens
when the user want's to maximize or to un-maximize a CDockable.
behavior - the new behavior, not nullpublic CMaximizeBehavior getMaximizeBehavior()
nullsetMaximizeBehavior(CMaximizeBehavior)@Deprecated public void setTheme(DockTheme theme)
setTheme(String). While this method still
works, the theme will not get stored persistent and any module using
the ThemeMap (getThemes()) will not be informed about
the change.
theme - the new themepublic void setTheme(String theme)
theme is used as key for ThemeMap.select(String).
theme - the name of the theme, this might be one of
ThemeMap.KEY_BASIC_THEME, ThemeMap.KEY_BUBBLE_THEME,
ThemeMap.KEY_ECLIPSE_THEME, ThemeMap.KEY_FLAT_THEME
or ThemeMap.KEY_SMOOTH_THEME. This can also be a any other
string which was used for ThemeMap.put(String, ThemeFactory),
ThemeMap.add(String, ThemeFactory) or ThemeMap.insert(int, String, ThemeFactory).public ThemeMap getThemes()
public void setRootWindow(WindowProvider window)
window - the new owner, can be nullpublic WindowProvider getRootWindow()
setRootWindow(WindowProvider),
however the provide returned by this method will return the same window
as specified by setRootWindow(WindowProvider).
nullpublic PreferenceStorage getPreferences()
PreferenceModels for this control.
The contents of this container are stored in the
resource manager.
getResources()public void setPreferenceModel(PreferenceModel preferenceModel)
PreferenceModel which will be used to translate between
this and the preferences. This
model can be set to null.null.
preferenceModel - the new model, it will used to translate
the contents of getPreferences() immediately, can be nullpublic PreferenceModel getPreferenceModel()
preferences and this.
nullsetPreferenceModel(PreferenceModel)public void setMissingStrategy(MissingCDockableStrategy missingStrategy)
CDockable is found.
missingStrategy - the strategy, null will set
the default strategypublic MissingCDockableStrategy getMissingStrategy()
CDockable is found.
nullpublic void addResizeRequestListener(ResizeRequestListener listener)
ResizeRequestListener to this CControl. The listener
will be informed when the resize requests of a CDockable should
be processed.
listener - the new listener, not nullpublic void removeResizeRequestListener(ResizeRequestListener listener)
ResizeRequestListener from this CControl.
listener - the listener to removepublic void handleResizeRequests()
ResizeRequestListeners, that the
resize request of all
CDockables should be processed. There are no
guarantees that a resize requests can be granted or even gets processed.CDockable.isResizeLockedHorizontally() and
CDockable.isResizeLockedVertically(). The behavior of that case is not
specified, but clients can assume that the locked components introduce
additional resize requests.
public DockFrontend intern()
public void write(File file)
throws IOException
file.getResources().writeFile( file ).
file - the file to override
IOException - if the file can't be written
public void write(DataOutputStream out)
throws IOException
out.getResources().writeStream( out ).
out - the stream to write into
IOException - if the stream is not writablepublic void writeXML(XElement element)
element.getResources().writeXML( element ).
element - the element to write into
public void writeXML(File file)
throws IOException
file in xml format.
file - the file to write into
IOException - if the file is not writable
public void read(File file)
throws IOException
file.getResources().readFile( file ).
file - the file to read from
IOException - if the file can't be read
public void read(DataInputStream in)
throws IOException
in.getResources().readStream( in ).
in - the stream to read from
IOException - if the stream can't be readpublic void readXML(XElement element)
element.getResources().readXML( element ).
element - the element to read
XException - if the xml file has the wrong structure
public void readXML(File file)
throws IOException
file.
file - the file to open and to read
IOException - if the file cannot be read
XException - if the xml file has the wrong structurepublic void save(String name)
name - the name of the current layout.public void load(String name)
name - the name of the layout.public void delete(String name)
name - the name of the layout to deletepublic String[] layouts()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||