Class ArrayDesignBlock

  • All Implemented Interfaces:
    AccessControlled, Identifiable

    public class ArrayDesignBlock
    extends ChildItem
    Version:
    2.0
    Author:
    Enell
    Last modified
    $Date: 2015-04-17 14:02:22 +0200 (fr, 17 apr 2015) $
    • Method Detail

      • getQuery

        public static ItemQuery<ArrayDesignBlock> getQuery​(ArrayDesign arrayDesign)
        Get a query configured to retrieve array design blocks for the specified array design.
        Parameters:
        arrayDesign - The array design to retreive blocks for, null is not allowed
        Returns:
        An ItemQuery object
      • getType

        public Item getType()
        Description copied from interface: Identifiable
        Get the type of item represented by the object. The returned value is one of the values defined in the Item enumeration.
        Returns:
        A value indicating the type of item
      • initPermissions

        void initPermissions​(int granted,
                             int denied)
                      throws BaseException
        WRITE and DELETE permissions are always denied.
        Overrides:
        initPermissions in class ChildItem
        Parameters:
        granted - Permissions that have been granted by the subclass
        denied - Permissions that have been denied by the subclass
        Throws:
        BaseException - If the permissions couldn't be initialised
      • getMetaGridX

        public int getMetaGridX()
        Get the column coordinate of this block.
        Returns:
        the column coordinate
      • getMetaGridY

        public int getMetaGridY()
        Get the row coordinate of this block.
        Returns:
        the row coordinate
      • setMetaGrid

        private void setMetaGrid​(int metaGridX,
                                 int metaGridY)
                          throws InvalidDataException
        Set the metagrid coordinates. If the coordinates are unknown the both should be set to 0 otherwise the coordinates must be greater then 0.
        Parameters:
        metaGridX - the column coordinate
        Throws:
        InvalidDataException
      • getBlockNumber

        public int getBlockNumber()
        Get the block number of this block.
        Returns:
        The number of this block.
      • setBlockNumber

        private void setBlockNumber​(int blockNumber)
                             throws InvalidDataException
        Set the block number of this block.
        Parameters:
        blockNumber - the block number of this block
        Throws:
        InvalidDataException - if the blocknumber is less then 1
      • getBlockSizeX

        public int getBlockSizeX()
        Get the number of columns in this block.
        Returns:
        the number of columns in this block.
      • setBlockSizeX

        public void setBlockSizeX​(int blockSizeX)
                           throws InvalidDataException
        Set the number of columns in this block. Must be greater then 0.
        Parameters:
        blockSizeX - the number of rows in this block.
        Throws:
        InvalidDataException - if blockSizeX is less then 1
      • getBlockSizeY

        public int getBlockSizeY()
        Get the number of rows in this block.
        Returns:
        the number of rows in this block
      • setBlockSizeY

        public void setBlockSizeY​(int blockSizeY)
                           throws InvalidDataException
        Set the number of rows in this block. Must be greater then 0.
        Parameters:
        blockSizeY - the number of columns in this block.
        Throws:
        InvalidDataException - if blockSizeY is less then 1
      • getOriginX

        public int getOriginX()
        Get the distance from the left edge of the slide to the top left spot in the block.
        Returns:
        the distance from the edge
      • setOriginX

        public void setOriginX​(int originX)
                        throws InvalidDataException
        Set the distance from the left edge of the slide to the top left spot in this block.
        Parameters:
        originX - the distance from the edge
        Throws:
        InvalidDataException - if originX is less then 0
      • getOriginY

        public int getOriginY()
        Get the distance from the top edge of the slide to the top left spot in the block.
        Returns:
        the distance from the edge
      • setOriginY

        public void setOriginY​(int originY)
                        throws InvalidDataException
        Set the distance from the top edge of the slide to the top left spot in this block.
        Parameters:
        originY - the distance from the edge
        Throws:
        InvalidDataException - if originY is less then 0
      • getSpacingX

        public int getSpacingX()
        Get the x spacing between the spots in the slide.
        Returns:
        the spacing between the spots
      • setSpacingX

        public void setSpacingX​(int spacingX)
                         throws InvalidDataException
        Set the x spacing between the spots in the slide.
        Parameters:
        spacingX - the spacing between the spots
        Throws:
        InvalidDataException - if spacingX is less then 0
      • getSpacingY

        public int getSpacingY()
        Get the y spacing between the spots in the slide.
        Returns:
        the spacing between the spots
      • setSpacingY

        public void setSpacingY​(int spacingY)
                         throws InvalidDataException
        Set the y spacing between the spots in the slide.
        Parameters:
        spacingY - the spacing between the spots
        Throws:
        InvalidDataException - if spacingY is less then 0
      • getFeatureDiameter

        public int getFeatureDiameter()
        Get the expected diameter of spots on the slide.
        Returns:
        The expected diameter.
        Since:
        2.7
      • setFeatureDiameter

        public void setFeatureDiameter​(int diameter)
                                throws InvalidDataException
        Set the expected diameter of spots on the slide.
        Parameters:
        diameter - The expected diameter
        Throws:
        InvalidDataException - If the diameter is less then 0
      • hasFeatures

        public boolean hasFeatures()
        Checks if this ArrayDesignBlock has any features.
        Returns:
        TRUE if the AraryDesignBlock has any fetures