http://www.jpicedt.org

jpicedt.graphic.view
Class HitInfo.List

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractSet<E>
          extended by java.util.TreeSet<HitInfo>
              extended by 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

Nested Class Summary
 
Nested classes/interfaces inherited from interface jpicedt.graphic.view.HitInfo
HitInfo.AbstractHitInfo, HitInfo.Composite, HitInfo.EnvelopeStroke, HitInfo.HighlighterStroke, HitInfo.Interior, HitInfo.InverseZOrderingComparator, HitInfo.List, HitInfo.Point, HitInfo.Stroke, HitInfo.Text
 
Constructor Summary
HitInfo.List(HitInfo hi)
           
 
Method Summary
 HitInfo.List append(HitInfo hi)
          Append the given HitInfo to this List.
 PEMouseEvent getMouseEvent()
           
 Element getTarget()
           
 String toString()
           
 
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
 
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
containsAll, retainAll, toArray, toArray
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray
 

Constructor Detail

HitInfo.List

public HitInfo.List(HitInfo hi)
Method Detail

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>

http://www.jpicedt.org

Submit a bug : syd@jpicedt.org