Package bibliothek.gui.dock.facile.mode
Class NormalMode<M extends NormalModeArea>
java.lang.Object
bibliothek.gui.dock.facile.mode.AbstractLocationMode<A>
bibliothek.gui.dock.facile.mode.DefaultLocationMode<M>
bibliothek.gui.dock.facile.mode.NormalMode<M>
- All Implemented Interfaces:
LocationMode,Mode<Location>,Iterable<M>
- Direct Known Subclasses:
CNormalMode
- Author:
- Benjamin Sigg
-
Nested Class Summary
Nested classes/interfaces inherited from class bibliothek.gui.dock.facile.mode.AbstractLocationMode
AbstractLocationMode.DockableHandle -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringthe key used for theIconManagerto read theIconfor the "normalize"-actionstatic final PathThe unique identifier of this mode -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEmpty default constructor.NormalMode(CControl control) Creates a new normal mode.NormalMode(DockController controller) Creates a new mode. -
Method Summary
Modifier and TypeMethodDescriptionvoidensureNotHidden(Dockable dockable) Ensures that noDockablethat has this mode hidesdockable.Gets the unique identifier of this mode.Gets a factory for creating newModeSettings.Gets a unique identifier, only thisModemust have this identifier.booleanisCurrentMode(Dockable dockable) This default implementation callsModeArea.isChild(Dockable)on each area of this mode and returnstrueif at least one area returnstrue.booleanisDefaultMode(Dockable dockable) Checks whether this mode is a default mode ofdockable.voidreadSetting(ModeSetting<Location> setting) Sets the properties of this mode.voidwriteSetting(ModeSetting<Location> setting) Gets the current properties of this mode in an independent way.Methods inherited from class bibliothek.gui.dock.facile.mode.DefaultLocationMode
current, runApplyMethods inherited from class bibliothek.gui.dock.facile.mode.AbstractLocationMode
add, addLocationModeListener, apply, aside, createHandle, get, get, get, get, getActionsFor, getController, getDefaultArea, getManager, getRepresentation, getRepresentationIds, isModeAvailable, isModeHidden, isRepresenting, iterator, listeners, remove, removeLocationModeListener, setActionProvider, setController, setDefaultArea, setManager, setShouldAutoFocus, shouldAutoFocusMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
IDENTIFIER
The unique identifier of this mode -
ICON_IDENTIFIER
the key used for theIconManagerto read theIconfor the "normalize"-action- See Also:
-
-
Constructor Details
-
NormalMode
protected NormalMode()Empty default constructor. Subclasses should callAbstractLocationMode.setActionProvider(LocationModeActionProvider)to complete initialization of this mode. -
NormalMode
Creates a new normal mode.- Parameters:
control- the owner of this mode
-
NormalMode
Creates a new mode.- Parameters:
controller- the owner of this mode
-
-
Method Details
-
getUniqueIdentifier
Description copied from interface:ModeGets a unique identifier, only thisModemust have this identifier. Identifiers with the first segment being "dock" are reserved for this framework, clients may choose any other identifiers.- Returns:
- the identifier, not
null, should contain at least one segment.
-
getExtendedMode
Description copied from interface:LocationModeGets the unique identifier of this mode.- Returns:
- the unique identifier
-
isCurrentMode
Description copied from class:DefaultLocationModeThis default implementation callsModeArea.isChild(Dockable)on each area of this mode and returnstrueif at least one area returnstrue.- Specified by:
isCurrentModein interfaceLocationMode- Specified by:
isCurrentModein interfaceMode<M extends NormalModeArea>- Overrides:
isCurrentModein classDefaultLocationMode<M extends NormalModeArea>- Parameters:
dockable- some dockable, notnull- Returns:
- whether
dockableis inthismode
-
isDefaultMode
Description copied from interface:ModeChecks whether this mode is a default mode ofdockable. A default mode is a mode that is chosen per default, if no other mode is selected. There should be only one default-mode perDockable.- Parameters:
dockable- some dockable, notnull- Returns:
- whether this is a default mode
-
getSettingFactory
Description copied from interface:ModeGets a factory for creating newModeSettings.- Returns:
- the factory, can be
null
-
ensureNotHidden
Description copied from interface:LocationModeEnsures that noDockablethat has this mode hidesdockable. Note thatdockablemay or may not be in this mode.- Parameters:
dockable- the element which must not be hidden
-
writeSetting
Description copied from interface:ModeGets the current properties of this mode in an independent way.- Parameters:
setting- aModeSettingwith the same id as thisMode. This setting was created by aModeSettingFactorywith the same id as thisMode.
-
readSetting
Description copied from interface:ModeSets the properties of this mode. This method will only be called with aModeSettingthat has been created by the currentModeSettingFactory- Parameters:
setting- the new set of properties, notnull
-