A comparator for shapes that orders them by increasing z-index, or for identical z-indices, orders them by increasing insertion time (i.e., newer shapes are after older shapes).
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
ZIndexComparator()
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int
|
compare(Shape shape1, Shape shape2)
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int
|
compareTimestamps(Shape shape1, Shape shape2)
Compare the insertion times of two shapes.
|
Methods inherited from
class
java.lang.Object
| |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Object
|
clone()
| ||||||||||
boolean
|
equals(Object arg0)
| ||||||||||
void
|
finalize()
| ||||||||||
final
Class<?>
|
getClass()
| ||||||||||
int
|
hashCode()
| ||||||||||
final
void
|
notify()
| ||||||||||
final
void
|
notifyAll()
| ||||||||||
String
|
toString()
| ||||||||||
final
void
|
wait()
| ||||||||||
final
void
|
wait(long arg0, int arg1)
| ||||||||||
final
void
|
wait(long arg0)
|
Methods inherited from
interface
java.util.Comparator
| |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract
int
|
compare(T arg0, T arg1)
| ||||||||||
abstract
boolean
|
equals(Object arg0)
|
Compare the insertion times of two shapes.
-1 if shape1 was added to the ShapeSet before shape2, 0 if they were added at the same time, or 1 if shape2 was added before shape1.