public class DefaultFlapLayoutManager extends AbstractFlapLayoutManager implements FlapLayoutManager
FlapLayoutManager
. Uses the same size for all
children of one FlapDockStation
.Constructor and Description |
---|
DefaultFlapLayoutManager() |
Modifier and Type | Method and Description |
---|---|
int |
getSize(FlapDockStation station,
Dockable dockable)
Called when
dockable is about to open and station
has to find out which size dockable should have. |
void |
install(FlapDockStation station)
Called before this manager is used.
|
boolean |
isHold(FlapDockStation station,
Dockable dockable)
Called when
dockable is added to station and
station does not know whether dockable should
be hold open even when it is not focused. |
boolean |
isHoldSwitchable(FlapDockStation station,
Dockable dockable)
Tells whether the user is supposed to switch the
hold property. |
void |
setHold(FlapDockStation station,
Dockable dockable,
boolean hold)
Called when the user changes the hold property of
dockable . |
void |
setHoldSwitchable(FlapDockStation station,
Dockable dockable,
boolean switchable)
Sets the result of
isHoldSwitchable(FlapDockStation, Dockable) . |
void |
setSize(FlapDockStation station,
Dockable dockable,
int size)
Called when the user changes the size of
dockable . |
void |
uninstall(FlapDockStation station)
Called when this manager is no longer used.
|
addListener, fireHoldSwitchableChanged, removeListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addListener, removeListener
public void install(FlapDockStation station)
FlapLayoutManager
install
in interface FlapLayoutManager
station
- the station that will use this managerpublic void uninstall(FlapDockStation station)
FlapLayoutManager
uninstall
in interface FlapLayoutManager
station
- the station that will no longer use this managerpublic int getSize(FlapDockStation station, Dockable dockable)
FlapLayoutManager
dockable
is about to open and station
has to find out which size dockable
should have.getSize
in interface FlapLayoutManager
station
- the callerdockable
- the child of station
that is going to
be shown.dockable
public boolean isHold(FlapDockStation station, Dockable dockable)
FlapLayoutManager
dockable
is added to station
and
station
does not know whether dockable
should
be hold open even when it is not focused.isHold
in interface FlapLayoutManager
station
- the callerdockable
- the new element on station
public void setHold(FlapDockStation station, Dockable dockable, boolean hold)
FlapLayoutManager
dockable
.setHold
in interface FlapLayoutManager
station
- the callerdockable
- the child of station
whose property
has changedhold
- the new valuepublic void setSize(FlapDockStation station, Dockable dockable, int size)
FlapLayoutManager
dockable
.setSize
in interface FlapLayoutManager
station
- the callerdockable
- the element whose size has been changedsize
- the new sizepublic boolean isHoldSwitchable(FlapDockStation station, Dockable dockable)
FlapLayoutManager
hold
property.isHoldSwitchable
in interface FlapLayoutManager
station
- the callerdockable
- the child of station
whose property is askedtrue
if the hold property can be changed, false
if the user should not be
presented with a button to change the propertypublic void setHoldSwitchable(FlapDockStation station, Dockable dockable, boolean switchable)
isHoldSwitchable(FlapDockStation, Dockable)
. The result will be
reset to true
if dockable
is removed from station
.station
- the station for which the setting should be changeddockable
- a child of station
switchable
- whether the hold property of dockable
is switchable