Package bibliothek.gui.dock.facile.mode
Class DefaultLocationMode<A extends StationModeArea>
java.lang.Object
bibliothek.gui.dock.facile.mode.AbstractLocationMode<A>
bibliothek.gui.dock.facile.mode.DefaultLocationMode<A>
- Type Parameters:
A- the areas that are managed by this mode
- All Implemented Interfaces:
LocationMode,Mode<Location>,Iterable<A>
- Direct Known Subclasses:
ExternalizedMode,MinimizedMode,NormalMode
public abstract class DefaultLocationMode<A extends StationModeArea>
extends AbstractLocationMode<A>
Abstract implementation of a
Mode that works with Locations. This
implementation offers a runApply(Dockable, Location, AffectedSet) and
Mode.apply(Dockable, Object, AffectedSet) method.- Author:
- Benjamin Sigg
-
Nested Class Summary
Nested classes/interfaces inherited from class bibliothek.gui.dock.facile.mode.AbstractLocationMode
AbstractLocationMode.DockableHandle -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThis default implementation just returns the location ofdockablebut does not change any properties.booleanisCurrentMode(Dockable dockable) This default implementation callsModeArea.isChild(Dockable)on each area of this mode and returnstrueif at least one area returnstrue.booleanrunApply(Dockable dockable, Location history, AffectedSet set) This default implementation uses theDockStation.move(Dockable, DockableProperty)andDockStation.drop(Dockable, DockableProperty)methods to putdockableat its location.Methods 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, spliteratorMethods inherited from interface bibliothek.gui.dock.facile.mode.LocationMode
ensureNotHidden, getExtendedModeMethods inherited from interface bibliothek.gui.dock.support.mode.Mode
getSettingFactory, getUniqueIdentifier, isDefaultMode, readSetting, writeSetting
-
Constructor Details
-
DefaultLocationMode
public DefaultLocationMode()
-
-
Method Details
-
current
This default implementation just returns the location ofdockablebut does not change any properties.- Parameters:
dockable- the element- Returns:
- history information that is needed when calling
Mode.apply(Dockable, Object, AffectedSet)
-
runApply
This default implementation uses theDockStation.move(Dockable, DockableProperty)andDockStation.drop(Dockable, DockableProperty)methods to putdockableat its location.- Specified by:
runApplyin classAbstractLocationMode<A extends StationModeArea>- Parameters:
dockable- the element whose mode becomesthishistory- history information that was returned by this mode when callingMode.current(Dockable)the last time.set- this method has to store allDockables which might have changed their mode in the set.- Returns:
trueifdockablewas moved,falseif the method failed to set the location ofdockablefor any reason
-
isCurrentMode
This default implementation callsModeArea.isChild(Dockable)on each area of this mode and returnstrueif at least one area returnstrue.- Parameters:
dockable- some dockable, notnull- Returns:
- whether
dockableis inthismode
-