|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbibliothek.gui.dock.station.layer.OrderedLayerCollection
public class OrderedLayerCollection
The OrderedLayerCollection is a helper class that allows order a set
DockStations according to the rules defined in DockStationDropLayer.
| Constructor Summary | |
|---|---|
OrderedLayerCollection()
|
|
| Method Summary | |
|---|---|
void |
add(DockStation station)
Adds an additional station which is to be ordered. |
protected int |
compare(DockStationDropLayer a,
DockStationDropLayer b)
Works like Comparator.compare(Object, Object), compares a to b. |
List<DockStation> |
sort(int x,
int y)
Sorts the current set of DockStations currently known to this
collection. |
protected List<DockStationDropLayer> |
sort(List<DockStationDropLayer> layers)
Creates a new ordered list containing all items of layer, the new list
is built by an algorithm that is resistent against inconstant ordering. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OrderedLayerCollection()
| Method Detail |
|---|
public void add(DockStation station)
station - the additional station
public List<DockStation> sort(int x,
int y)
DockStations currently known to this
collection.
x - the x-coordinate of the mouse on the screeny - the y-coordinate of the mouse on the screen
protected List<DockStationDropLayer> sort(List<DockStationDropLayer> layers)
layer, the new list
is built by an algorithm that is resistent against inconstant ordering.
layers - the layers to order
protected int compare(DockStationDropLayer a,
DockStationDropLayer b)
Comparator.compare(Object, Object), compares a to b.
a - the first object to compareb - the second object to compare
a is less/equal/greater than b.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||