Interface Scrollable

    • Method Detail

      • getBlockSize

        int getBlockSize()
        Returns the size of current block.
        Returns:
        int
      • setBlockSize

        void setBlockSize​(int value)
                   throws MSTRCheckedException
        Sets the block size. Each time when this method is called, the current block will reset to the first block.
        Parameters:
        value - int the new block size
        Throws:
        MSTRCheckedException - Thrown when error happens during setting this value.
      • gotoBlock

        void gotoBlock​(int blockIndex)
                throws MSTRCheckedException,
                       java.lang.IllegalArgumentException
        Goto a certain block.
        Parameters:
        blockIndex - int When the value is negative number, it represents the named block FIRST_BLOCK, NEXT_BLOCK, PREVIOUS_BLOCK. When it is non-negative number, it indicates the 0-based absolute block index.
        Throws:
        MSTRCheckedException - Thrown if an error happended during the action.
        java.lang.IllegalArgumentException - Thrown if the input argument is not a valid value.
      • hasNextBlock

        boolean hasNextBlock()
                      throws MSTRCheckedException
        Returns whether there is another block following this block.
        Returns:
        boolean Returns true when there is another block following. Returns false when this is the last block.
        Throws:
        MSTRCheckedException - Thrown if an error happened during this action.
      • hasPreviousBlock

        boolean hasPreviousBlock()
                          throws MSTRCheckedException
        Returns whether there is another block before this block.
        Returns:
        boolean Returns true when there is another block before this one. Returns false when this is the first block.
        Throws:
        MSTRCheckedException - Thrown if an error happened during this action.
      • getBlockPosition

        int getBlockPosition()
                      throws MSTRCheckedException
        Returns current block's position
        Returns:
        int The 1-based block position.
        Throws:
        MSTRCheckedException - Thrown when an error happened during the action.