public class FlapSideDropLayer extends Object implements DockStationDropLayer
FlapDockStation, it has a high priority if there
are no children in the FlapDockStation (which makes the station very small).| Constructor and Description |
|---|
FlapSideDropLayer(FlapDockStation station)
Creates a new layer.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canCompare(DockStationDropLayer level)
Tells whether this level contains code to tell whether it has a higher or lower priority as
level. |
int |
compare(DockStationDropLayer level)
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.
|
public FlapSideDropLayer(FlapDockStation station)
station - the owner of this layerpublic DockStation getStation()
DockStationDropLayerDockStation which created this level.getStation in interface DockStationDropLayerpublic Component getComponent()
DockStationDropLayerComponent which is associated with this level. The Component can be used to order
levels because Components can overlap each other. This is an optional method, a result of
null is perfectly valid.getComponent in interface DockStationDropLayernullpublic DockStationDropLayer modify(DockStationDropLayer child)
DockStationDropLayerDockStationDropLayer 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 DockStationDropLayerchild - the child to modify, this method may either directly modify child, create a wrapper or
a copy of childchild or a new DockStationDropLayer replacing child, not nullpublic boolean contains(int x,
int y)
DockStationDropLayerlevel contains the point x/y, which is the position
of the mouse on the screen.contains in interface DockStationDropLayerx - the x-coordinate of the mouse on the screeny - the y-coordinate of the mouse on the screentrue if this level contains x/y, false
otherwisepublic LayerPriority getPriority()
DockStationDropLayergetPriority in interface DockStationDropLayernullpublic void setPriority(LayerPriority priority)
DockStationDropLayersetPriority in interface DockStationDropLayerpriority - the new priority, must not be nullpublic boolean canCompare(DockStationDropLayer level)
DockStationDropLayerlevel. 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 DockStationDropLayerlevel - some other level to checktrue if this DockStationDropLayer contains code to compare level with
thispublic int compare(DockStationDropLayer level)
DockStationDropLayerlevel. This method is only called if DockStationDropLayer.canCompare(DockStationDropLayer)
returned true for level. This method works like Comparable.compareTo(Object).compare in interface DockStationDropLayerlevel - another level to comparelevel.Copyright © 2017 Docking Frames. All rights reserved.