public interface Divideable
Divideable
offers the information needed to represent a divider between two
SplitNode
s. The Divideable
may itself be a SplitNode
. The location of a divider
is encoded by a double
, where 0
means top/left, and 1.0
means bottom/right.Modifier and Type | Method and Description |
---|---|
double |
getActualDivider()
Gets the
divider as it is actually seen by the user. |
double |
getDivider()
Gets the location of the divider.
|
double |
getDividerAt(int x,
int y)
Calculates the value which the divider must have on condition that
the point
x/y lies inside the divider bounds . |
java.awt.Rectangle |
getDividerBounds(double divider,
java.awt.Rectangle bounds)
Calculates the location and the size of the area which represents the divider.
|
SplitDockStation.Orientation |
getOrientation()
Gets the orientation of this divideable.
|
void |
setDivider(double divider)
Sets the location of the divider.
|
double |
validateDivider(double divider)
Validates the new location
divider . |
double getDividerAt(int x, int y)
x/y
lies inside the divider bounds
.x
- x-coordinate of the point in pixely
- y-coordinate of the point in pixeljava.awt.Rectangle getDividerBounds(double divider, java.awt.Rectangle bounds)
divider
- The location of the divider, should be between 0 and 1.bounds
- A rectangle in which the result will be stored. It can be null
bounds
or a new Rectangle
if bounds
was null
SplitDockStation.Orientation getOrientation()
SplitDockStation.Orientation.VERTICAL
, one child
will be at the top and the other at the bottom.double getDivider()
setDivider(double)
double getActualDivider()
divider
as it is actually seen by the user. Usually this is equivalent
to validateDivider( getDivider() )
, subclasses may however consider other restrictions.void setDivider(double divider)
divider
.divider
- the dividerdouble validateDivider(double divider)
divider
.divider
- the new dividerdivider