public class StationCombinerValue extends StationThemeItemValue<Combiner> implements CombinerValue, Combiner
StationCombinerValue
encloses a Combiner
and uses
the combiner as delegate. If the wrapper has no delegate, it uses
the DockUI
to get a combiner from the current DockTheme
.Modifier and Type | Field and Description |
---|---|
static Path |
KIND_STATION
What kind of
UIValue this is |
KIND_COMBINER
Constructor and Description |
---|
StationCombinerValue(String id,
DockStation station)
Creates a new value.
|
Modifier and Type | Method and Description |
---|---|
void |
aside(AsideRequest request)
Prepares the layout of the
DockStation s that are created by this Combiner to
keep track of a new DockableProperty with its own placeholder. |
Dockable |
combine(CombinerSource source,
CombinerTarget target)
Merges two
Dockable s into a new Dockable. |
CombinerTarget |
prepare(CombinerSource source,
Enforcement force)
Prepares information telling how two
Dockable s may be combined. |
get, getDelegate, getStation, set, setController, setDelegate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getStation
public StationCombinerValue(String id, DockStation station)
id
- the identifier of this value, used to read a resource from the ThemeManager
station
- the owner of this objectpublic CombinerTarget prepare(CombinerSource source, Enforcement force)
Combiner
Dockable
s may be combined.prepare
in interface Combiner
source
- the Dockable
s which may be combined, their parent station and
other helpful information.force
- how much the caller of this method would like the method not to return a
value of null
. Implementations should read the force
property, where a value of 1
means that this method must success, while 0
means that this method may or may not success. In general the modules in the framework expect that a value below
0.5
results in null
, while a value above 0.5f
results in a non-null
value.Dockable
s, may be null
to indicate that
a combination is not desiredpublic Dockable combine(CombinerSource source, CombinerTarget target)
Combiner
Dockable
s into a new Dockable. This method may
set the DockController
of the created element in order to initialize
it more efficiently.combine
in interface Combiner
source
- information about the two Dockable
s that are going to be merged, not null
. This
object may or may not have been created by this Combiner
, some sanity checks are advised before using ittarget
- information that was created by Combiner.prepare(CombinerSource, Enforcement)
using source
, not null
Dockable
, not null
public void aside(AsideRequest request)
Combiner
DockStation
s that are created by this Combiner
to
keep track of a new DockableProperty
with its own placeholder. The new property
is set "aside" an existing location. For more information please read the documentation
of DockElement.asDockable()
.aside
in interface Combiner
request
- information about a location and methods to create the neighbor locationDockStation.aside(AsideRequest)