public interface ScreenDropSizeStrategy
ScreenDropSizeStrategy is used by a ScreenDockStation to decide some details
on how to drop a Dockable.| Modifier and Type | Field and Description |
|---|---|
static ScreenDropSizeStrategy |
CURRENT_SIZE
The
getDropSize(ScreenDockStation, Dockable) of a Dockable is always its
current size when using this strategy. |
static ScreenDropSizeStrategy |
PREFERRED_SIZE
This strategy always returns the preferred size of a
Dockable. |
| Modifier and Type | Method and Description |
|---|---|
Dimension |
getAddSize(ScreenDockStation station,
Dockable dockable)
Called when
dockable is added to station, but not by a drag and drop
operation. |
Dimension |
getDropSize(ScreenDockStation station,
Dockable dockable)
Called when
dockable is about to be dropped into station and the
new size of dockable must be found. |
void |
install(ScreenDockStation station)
Informs this strategy that is is used by
station. |
void |
uninstall(ScreenDockStation station)
Informs this strategy that it is no longer used by
station. |
static final ScreenDropSizeStrategy CURRENT_SIZE
getDropSize(ScreenDockStation, Dockable) of a Dockable is always its
current size when using this strategy. This is the default strategy.static final ScreenDropSizeStrategy PREFERRED_SIZE
Dockable.void install(ScreenDockStation station)
station.station - the station using this strategyvoid uninstall(ScreenDockStation station)
station.station - the station no longer using this strategyDimension getDropSize(ScreenDockStation station, Dockable dockable)
dockable is about to be dropped into station and the
new size of dockable must be found.station - the new parent of dockabledockable - the item that is about to be droppeddockable. This size will be validated by the
current BoundaryRestriction.Dimension getAddSize(ScreenDockStation station, Dockable dockable)
dockable is added to station, but not by a drag and drop
operation.station - the new parent of dockabledockable - the item that is about to be droppeddockable, usually this is the preferred sizeCopyright © 2017 Docking Frames. All rights reserved.