|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbibliothek.gui.dock.station.split.DefaultSplitLayoutManager
public class DefaultSplitLayoutManager
The default implementation of SplitLayoutManager.
| Constructor Summary | |
|---|---|
DefaultSplitLayoutManager()
|
|
| Method Summary | |
|---|---|
void |
calculateDivider(SplitDockStation station,
PutInfo putInfo,
Leaf origin,
StationDropItem item)
Calculates the value a divider should have if the Dockable
of putInfo is added alongside of origin. |
protected PutInfo |
calculateSideSnap(SplitDockStation station,
int x,
int y,
Leaf leaf,
Dockable drop)
Calculates where to add a Dockable if the mouse is outside
this station. |
void |
install(SplitDockStation station)
Called by a SplitDockStation when this manager will be used
by the station. |
PutInfo |
prepareDrop(SplitDockStation station,
StationDropItem item)
Call forwarded from DockStation.prepareDrop. |
PutInfo |
prepareMove(SplitDockStation station,
StationDropItem item)
Call forwarded from DockStation.prepareDrop if
the operation is a move operation (if the dockable is already a child of this station). |
void |
uninstall(SplitDockStation station)
Called by a SplitDockStation which used this manager and no
longer does. |
void |
updateBounds(Root root,
double x,
double y,
double factorW,
double factorH)
Called when the bounds of all DockableDisplayer of a station have
to be updated. |
protected double |
validateDivider(SplitDockStation station,
double divider,
Dimension minimumLeft,
Dimension minimumRight,
SplitDockStation.Orientation orientation,
double width,
double height)
Tests whether the specified divider-value is legal or not. |
double |
validateDivider(SplitDockStation station,
double divider,
Node node)
Tests whether the specified divider-value is legal or not. |
PutInfo |
validatePutInfo(SplitDockStation station,
PutInfo putInfo)
Checks whether info is valid or not. |
Dockable |
willMakeFullscreen(SplitDockStation station,
Dockable dockable)
Called before the station changes its fullscreen-Dockable. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultSplitLayoutManager()
| Method Detail |
|---|
public void install(SplitDockStation station)
SplitLayoutManagerSplitDockStation when this manager will be used
by the station.
install in interface SplitLayoutManagerstation - the invoking stationpublic void uninstall(SplitDockStation station)
SplitLayoutManagerSplitDockStation which used this manager and no
longer does.
uninstall in interface SplitLayoutManagerstation - the invoking station
public Dockable willMakeFullscreen(SplitDockStation station,
Dockable dockable)
SplitLayoutManager
willMakeFullscreen in interface SplitLayoutManagerstation - the invoking stationdockable - the element which the station wants to make fullscreen,
can be null
station or null.
public PutInfo prepareDrop(SplitDockStation station,
StationDropItem item)
SplitLayoutManagerDockStation.prepareDrop.
This method calculates where to drop a new Dockable.SplitLayoutManager may or may not set the CombinerTarget and CombinerSource of
the created PutInfo. If there is no combiner information but the mouse is over the center or the title
of a selected Leaf, then the SplitDockStation will create the missing information automatically.
If there is already information set, then the station will silently assume that this manager did set the information
and that the information is correct.
prepareDrop in interface SplitLayoutManagerstation - the calling stationitem - the element that might be dropped
dockable or null if the element should not be dropped
public PutInfo prepareMove(SplitDockStation station,
StationDropItem item)
SplitLayoutManagerDockStation.prepareDrop if
the operation is a move operation (if the dockable is already a child of this station).
This method calculates where to move a Dockable of station.
prepareMove in interface SplitLayoutManagerstation - the calling stationitem - the element that might be dropped
dockable or null if the element should not be droppedSplitLayoutManager.prepareDrop(SplitDockStation, StationDropItem)
protected PutInfo calculateSideSnap(SplitDockStation station,
int x,
int y,
Leaf leaf,
Dockable drop)
Dockable if the mouse is outside
this station.
station - the station onto which drop might be droppedx - The x-coordinate of the mousey - The y-coordinate of the mouseleaf - The leaf which was the old parent of the moved Dockable
or nulldrop - the element that will be dropped
null
public void calculateDivider(SplitDockStation station,
PutInfo putInfo,
Leaf origin,
StationDropItem item)
SplitLayoutManagerDockable
of putInfo is added alongside of origin. The
result has to be stored directly in putInfo.
calculateDivider in interface SplitLayoutManagerstation - the station for which the calculation has to be doneputInfo - the new child of the stationorigin - a leaf of this station or nullitem - detailed information about the drag and drop operation that is going on
public double validateDivider(SplitDockStation station,
double divider,
Node node)
SplitLayoutManagerdivider-value is legal or not.
validateDivider in interface SplitLayoutManagerstation - the station for which the divider is calculateddivider - the value of a divider on a Nodenode - the Node for which the test is performed
divider
protected double validateDivider(SplitDockStation station,
double divider,
Dimension minimumLeft,
Dimension minimumRight,
SplitDockStation.Orientation orientation,
double width,
double height)
divider-value is legal or not.
station - the station for which the divider is intendeddivider - the value of a divider on a NodeminimumLeft - the minimal number of pixels on the left or top side of the dividerminimumRight - the minimal number of pixels on the right or bottom side of the dividerorientation - the orientation of the dividerwidth - the relative width of the base (in respect to the size of this station)height - the relative height of the base (in respect to the size of this station)
divider
public PutInfo validatePutInfo(SplitDockStation station,
PutInfo putInfo)
SplitLayoutManagerinfo is valid or not.
validatePutInfo in interface SplitLayoutManagerstation - the station for which info will be usedputInfo - the preferred drop location
PutInfo, info or null.
public void updateBounds(Root root,
double x,
double y,
double factorW,
double factorH)
SplitLayoutManagerDockableDisplayer of a station have
to be updated. Subclasses normally can just call
Root.updateBounds(double, double, double, double, double, double, boolean)
with width and height set to 1.0.
updateBounds in interface SplitLayoutManagerroot - the root of a tree of Dockablesx - the left boundy - the top boundfactorW - a factor with which all x-coordinates have to be multiplied in
order to get coordinates in pixels. 0 if the basic station has no size.factorH - a factor with which all y-coordinates have to be multiplied in
order to get coordinates in pixels. 0 if the basic station has no size.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||