Class SeriesImage

java.lang.Object
ca.ualberta.stothard.cgview.SeriesImage
All Implemented Interfaces:
CgviewConstants

public class SeriesImage extends Object implements CgviewConstants
This class is used to encapsulate Cgview map information when a series of images is linked together.
Author:
Paul Stothard
  • Constructor Details

    • SeriesImage

      public SeriesImage(int zoomValue, int zoomCenter)
      Constructs a SeriesImage object.
      Parameters:
      zoomValue - the zoom value of the Cgview map.
      zoomCenter - the zoom center value of the Cgview map.
  • Method Details

    • getZoomValue

      public int getZoomValue()
      Returns the zoom value of this SeriesImage.
      Returns:
      the zoom value.
    • getZoomCenter

      public int getZoomCenter()
      Returns the zoom center value of this SeriesImage.
      Returns:
      the zoom center value.
    • isEqual

      public boolean isEqual(SeriesImage seriesImage)
      Compares a SeriesImage object to this SeriesImage and returns true if they are equal.
      Parameters:
      seriesImage - the SeriesImage to compare with this SeriesImage.
      Returns:
      whether or not the SeriesImage objects are equal.
    • getZoomInFilePrefix

      protected String getZoomInFilePrefix(ArrayList labelBounds, int nextZoomValue)
      Examines the ArrayList of LabelBounds objects of type CgviewConstants.BOUNDS_RULER and determines which is the middle one. A string intended to serve as part of a file name is constructed from the middle item's zoom value and zoom center value.
      Parameters:
      labelBounds - the collection of LabelBounds objects to examine.
      nextZoomValue - the zoom value of the next zoomed Cgview map.
      Returns:
      a file name prefix consisting of the next zoom value and the zoom center value from the middle LabelBounds entry of type CgviewConstants.BOUNDS_RULER.
    • getZoomOutFilePrefix

      protected String getZoomOutFilePrefix(ArrayList previousSeriesImages, int previousZoom)
      Determines which SeriesImage should be linked to this SeriesImage using a zoom out button.
      Parameters:
      previousSeriesImages - a collection of SeriesImage objects.
      previousZoom - the zoom value used for the previous set of Cgview images.
      Returns:
      a file name prefix to be used for linking purposes.
    • getClockwiseFilePrefix

      public String getClockwiseFilePrefix(ArrayList toDrawCurrentZoom)
      Determines which SeriesImage is adjacent to this SeriesImage in the clockwise direction.
      Parameters:
      toDrawCurrentZoom - a collection of SeriesImages drawn at the same zoom level as this SeriesImage.
      Returns:
      a file name prefix to be used for linking purposes.
    • getCounterclockwiseFilePrefix

      public String getCounterclockwiseFilePrefix(ArrayList toDrawCurrentZoom)
      Determines which SeriesImage is adjacent to this SeriesImage in the counterclockwise direction.
      Parameters:
      toDrawCurrentZoom - a collection of SeriesImages drawn at the same zoom level as this SeriesImage.
      Returns:
      a file name prefix to be used for linking purposes.