gcspy.vis
Class Markers

java.lang.Object
  extended by gcspy.vis.Markers

 class Markers
extends java.lang.Object

Keeps track of marker ranges

Author:
Tony Printezis, Richard Jones

Constructor Summary
Markers()
          New empty markers
 
Method Summary
 MarkerRange add(int m1, int m2)
          Create and add a new marker range
 void addRange(MarkerRange newRange)
          Extend a range of markers
 void clear()
          Clear the list of markers
 java.util.Iterator<MarkerRange> iterator()
          Get an iterator for the markers
 void remove(MarkerRange range)
          Remove a marker range
 void removeRange(MarkerRange newRange)
          Remove a range of markers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Markers

public Markers()
New empty markers

Method Detail

iterator

public java.util.Iterator<MarkerRange> iterator()
Get an iterator for the markers

Returns:
an iterator for thes markers

add

public MarkerRange add(int m1,
                       int m2)
Create and add a new marker range

Parameters:
m1 - The index of one end of the range
m2 - The indes of the other end of the range
Returns:
@ return the new range

remove

public void remove(MarkerRange range)
Remove a marker range

Parameters:
range - The range ot remove

addRange

public void addRange(MarkerRange newRange)
Extend a range of markers

Parameters:
newRange - The new range

removeRange

public void removeRange(MarkerRange newRange)
Remove a range of markers

Parameters:
newRange - The new range

clear

public void clear()
Clear the list of markers