Package ca.ualberta.stothard.cgview
Class SeriesImage
java.lang.Object
ca.ualberta.stothard.cgview.SeriesImage
- All Implemented Interfaces:
CgviewConstants
This class is used to encapsulate Cgview map information when a series of images is linked
together.
- Author:
- Paul Stothard
-
Field Summary
Fields inherited from interface ca.ualberta.stothard.cgview.CgviewConstants
BASES, BOUNDS_BUTTON, BOUNDS_FEATURE, BOUNDS_RULER, CENTISOMES, DECORATION_CLOCKWISE_ARROW, DECORATION_COUNTERCLOCKWISE_ARROW, DECORATION_HIDDEN, DECORATION_STANDARD, DIRECT_STRAND, INNER_LABELS_AUTO, INNER_LABELS_NO_SHOW, INNER_LABELS_SHOW, LABEL, LABEL_FORCE, LABEL_NONE, LABEL_ZOOMED, LEGEND_DRAW_ZOOMED, LEGEND_ITEM_ALIGN_CENTER, LEGEND_ITEM_ALIGN_LEFT, LEGEND_ITEM_ALIGN_RIGHT, LEGEND_LOWER_CENTER, LEGEND_LOWER_LEFT, LEGEND_LOWER_RIGHT, LEGEND_MIDDLE_CENTER, LEGEND_MIDDLE_LEFT, LEGEND_MIDDLE_LEFT_OF_CENTER, LEGEND_MIDDLE_RIGHT, LEGEND_MIDDLE_RIGHT_OF_CENTER, LEGEND_NO_DRAW_ZOOMED, LEGEND_UPPER_CENTER, LEGEND_UPPER_LEFT, LEGEND_UPPER_RIGHT, POSITIONS_AUTO, POSITIONS_NO_SHOW, POSITIONS_SHOW, REVERSE_STRAND, SWATCH_NO_SHOW, SWATCH_SHOW
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetClockwiseFilePrefix
(ArrayList toDrawCurrentZoom) Determines which SeriesImage is adjacent to this SeriesImage in the clockwise direction.getCounterclockwiseFilePrefix
(ArrayList toDrawCurrentZoom) Determines which SeriesImage is adjacent to this SeriesImage in the counterclockwise direction.int
Returns the zoom center value of this SeriesImage.protected String
getZoomInFilePrefix
(ArrayList labelBounds, int nextZoomValue) Examines the ArrayList of LabelBounds objects of typeCgviewConstants.BOUNDS_RULER
and determines which is the middle one.protected String
getZoomOutFilePrefix
(ArrayList previousSeriesImages, int previousZoom) Determines which SeriesImage should be linked to this SeriesImage using a zoom out button.int
Returns the zoom value of this SeriesImage.boolean
isEqual
(SeriesImage seriesImage) Compares a SeriesImage object to this SeriesImage and returns true if they are equal.
-
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
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
Examines the ArrayList of LabelBounds objects of typeCgviewConstants.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
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
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
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.
-