Esempio n. 1
0
 /** Get the hash code of a object. */
 @Override
 public int hashCodeOf(final DisplayItem obj) {
   if (obj == null) {
     return 0;
   }
   return obj.hashCode();
 }
Esempio n. 2
0
 /**
  * Compare two instances of the object and there relative offset that is needed for ordering
  * this objects.
  */
 @Override
 public int compare(final DisplayItem o1, final DisplayItem o2) {
   return o2.getZOrder() - o1.getZOrder();
 }
Esempio n. 3
0
 /**
  * Remove item from screen
  *
  * @param item
  */
 public void remove(final DisplayItem item) {
   synchronized (display) {
     display.remove(item);
     removedAreaList.add(new Rectangle(item.getLastDisplayRect()));
   }
 }