|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.gui.dock.station.layer.DefaultDropLayer
public class DefaultDropLayer
This DockStationDropLayer
represents the base area of a DockStation
, the area
with priority LayerPriority.BASE
and whose Component
is the component is the result of
Dockable.getComponent()
(assuming the station is also a dockable).
Constructor Summary | |
---|---|
DefaultDropLayer(DockStation station)
Creates a new layer. |
Method Summary | |
---|---|
boolean |
canCompare(DockStationDropLayer layer)
Tells whether this level contains code to tell whether it has a higher or lower priority as level . |
int |
compare(DockStationDropLayer layer)
Compares this level with level . |
boolean |
contains(int x,
int y)
Tells whether this level contains the point x/y , which is the position
of the mouse on the screen. |
Component |
getComponent()
Gets a Component which is associated with this level. |
LayerPriority |
getPriority()
Gets the basic priority of this level. |
DockStation |
getStation()
Gets the DockStation which created this level. |
DockStationDropLayer |
modify(DockStationDropLayer child)
This method is called for any DockStationDropLayer whose station
is a child to the station of this level. |
void |
setPriority(LayerPriority priority)
Sets a new priority for this level. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultDropLayer(DockStation station)
station
- the station which owns this layerMethod Detail |
---|
public boolean canCompare(DockStationDropLayer layer)
DockStationDropLayer
level
. For most implementations the result of this method should be false
.true
, then the ordering defined by the custom algorithm supercedes
any other conditions.
canCompare
in interface DockStationDropLayer
layer
- some other level to check
true
if this DockStationDropLayer
contains code to compare level
with
this
public int compare(DockStationDropLayer layer)
DockStationDropLayer
level
. This method is only called if DockStationDropLayer.canCompare(DockStationDropLayer)
returned true
for level
. This method works like Comparable.compareTo(Object)
.
compare
in interface DockStationDropLayer
layer
- another level to compare
level
.public boolean contains(int x, int y)
DockStationDropLayer
level
contains the point x/y
, which is the position
of the mouse on the screen.
contains
in interface DockStationDropLayer
x
- the x-coordinate of the mouse on the screeny
- the y-coordinate of the mouse on the screen
true
if this
level contains x/y
, false
otherwisepublic Component getComponent()
DockStationDropLayer
Component
which is associated with this level. The Component
can be used to order
levels because Component
s can overlap each other. This is an optional method, a result of
null
is perfectly valid.
getComponent
in interface DockStationDropLayer
null
public LayerPriority getPriority()
DockStationDropLayer
getPriority
in interface DockStationDropLayer
null
public void setPriority(LayerPriority priority)
DockStationDropLayer
setPriority
in interface DockStationDropLayer
priority
- the new priority, must not be null
public DockStation getStation()
DockStationDropLayer
DockStation
which created this level.
getStation
in interface DockStationDropLayer
public DockStationDropLayer modify(DockStationDropLayer child)
DockStationDropLayer
DockStationDropLayer
whose station
is a child to the station of this
level. This method may modify the level, e.g. increase or
decrease its priority. This method is called before this
level itself gets modified by its
parents. This method is called independent of whether DockStationDropLayer.contains(int, int)
returns true
or false
.
modify
in interface DockStationDropLayer
child
- the child to modify, this method may either directly modify child
, create a wrapper or
a copy of child
child
or a new DockStationDropLayer
replacing child
, not null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |