jpicedt.graphic.view
Class HitInfo.List
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractSet<E>
java.util.TreeSet<HitInfo>
jpicedt.graphic.view.HitInfo.List
- All Implemented Interfaces:
- Serializable, Cloneable, Iterable<HitInfo>, Collection<HitInfo>, NavigableSet<HitInfo>, Set<HitInfo>, SortedSet<HitInfo>, HitInfo
- Enclosing interface:
- HitInfo
public static class HitInfo.List
- extends TreeSet<HitInfo>
- implements HitInfo
A collection of HitInfo
's that are appropriate when a
mouse-event hits several Element
's at once. Members are
sorted in descending z-order of the associated Element
.
- See Also:
- Serialized Form
Methods inherited from class java.util.TreeSet |
add, addAll, ceiling, clear, clone, comparator, contains, descendingIterator, descendingSet, first, floor, headSet, headSet, higher, isEmpty, iterator, last, lower, pollFirst, pollLast, remove, size, subSet, subSet, tailSet, tailSet |
HitInfo.List
public HitInfo.List(HitInfo hi)
getTarget
public Element getTarget()
- Specified by:
getTarget
in interface HitInfo
- Returns:
- the first
Element
in the list on which the hit
occured. Since element are appended in descending z-order,
getTarget()
thus returns the highest-z element.
getMouseEvent
public PEMouseEvent getMouseEvent()
- Specified by:
getMouseEvent
in interface HitInfo
- Returns:
- the mouse-event that triggered this
HitInfo
. Arbitrarily returns the mouse-event attached
to the element having the highest z, yet all HitInfo
's
in this list "should" have the same mouse-event.
append
public HitInfo.List append(HitInfo hi)
- Append the given
HitInfo
to this List.
- Specified by:
append
in interface HitInfo
- Returns:
- this for convenience (and also to implement the
HitInfo
interface)
toString
public String toString()
- Overrides:
toString
in class AbstractCollection<HitInfo>
Submit a bug : syd@jpicedt.org