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 |
---|---|
java.awt.Dimension |
getAddSize(ScreenDockStation station,
Dockable dockable)
Called when
dockable is added to station , but not by a drag and drop
operation. |
java.awt.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 strategyjava.awt.Dimension 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 dockable
dockable
- the item that is about to be droppeddockable
. This size will be validated by the
current BoundaryRestriction
.java.awt.Dimension getAddSize(ScreenDockStation station, Dockable dockable)
dockable
is added to station
, but not by a drag and drop
operation.station
- the new parent of dockable
dockable
- the item that is about to be droppeddockable
, usually this is the preferred size