org.cybertory.MSS
Class GridMaLayout

java.lang.Object
  extended byorg.cybertory.MSS.GridMaLayout
All Implemented Interfaces:
MaLayout, SelfScaler

public class GridMaLayout
extends java.lang.Object
implements MaLayout

This class encapsulates the layout of a microarray with zones on a uniform grid, and where each zone has the same number of rows and columns.


Constructor Summary
GridMaLayout(int numMetacols, int numMetarows, int numCols, int numRows, float leftMargin, float rightMargin, float topMargin, float bottomMargin, float gapBetweenZonesX, float gapBetweenZonesY, float featureCellSizeX, float featureCellSizeY)
           
 
Method Summary
 void addZonesGridLocations(java.awt.Point[] zoneGridLocations)
           
 MaDimensions getDimensions()
           
 float getHeight()
          Returns image height in pixels
 java.lang.Object getScaled(float pixelSize)
           
 float getWidth()
          Returns image width in pixels
 java.awt.geom.Point2D getZoneLocation(int zoneIndex)
          Get the location of a zone, given the index.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GridMaLayout

public GridMaLayout(int numMetacols,
                    int numMetarows,
                    int numCols,
                    int numRows,
                    float leftMargin,
                    float rightMargin,
                    float topMargin,
                    float bottomMargin,
                    float gapBetweenZonesX,
                    float gapBetweenZonesY,
                    float featureCellSizeX,
                    float featureCellSizeY)
Method Detail

getScaled

public java.lang.Object getScaled(float pixelSize)
Specified by:
getScaled in interface SelfScaler

addZonesGridLocations

public void addZonesGridLocations(java.awt.Point[] zoneGridLocations)

getDimensions

public MaDimensions getDimensions()
Specified by:
getDimensions in interface MaLayout

getWidth

public float getWidth()
Description copied from interface: MaLayout
Returns image width in pixels

Specified by:
getWidth in interface MaLayout

getHeight

public float getHeight()
Description copied from interface: MaLayout
Returns image height in pixels

Specified by:
getHeight in interface MaLayout

getZoneLocation

public java.awt.geom.Point2D getZoneLocation(int zoneIndex)
Description copied from interface: MaLayout
Get the location of a zone, given the index.

Specified by:
getZoneLocation in interface MaLayout
Parameters:
zoneIndex - the zero-based index of the zone of interest.
Returns:
Point2D object with the pixel coordinates of the upper-left corner of the zone.