Class CellHandle

  • All Implemented Interfaces:
    org.eclipse.birt.report.model.elements.interfaces.ICellModel, org.eclipse.birt.report.model.elements.interfaces.IDesignElementModel

    public class CellHandle
    extends ReportElementHandle
    implements org.eclipse.birt.report.model.elements.interfaces.ICellModel
    Represents a cell within a table or grid. A cell can span multiple rows and/or columns. A cell can contain zero, one or many contents. However, since BIRT will position multiple items automatically, the application should generally provide its own container if the cell is to hold multiple items.

    The application generally does not create cell handles directly. Instead, it uses one of the navigation methods available on other element handles such as RowHandle.

    See Also:
    Cell, RowHandle.getCells()
    • Constructor Detail

      • CellHandle

        public CellHandle​(org.eclipse.birt.report.model.core.Module module,
                          org.eclipse.birt.report.model.core.DesignElement element)
        Constructs a handle for the given design and design element. The application generally does not create handles directly. Instead, it uses one of the navigation methods available on other element handles.
        Parameters:
        module - the module
        element - the model representation of the element
    • Method Detail

      • getColumnSpan

        public int getColumnSpan()
        Returns the cell's column span. This is the number of table or grid columns occupied by this cell.
        Returns:
        the column span
      • setColumnSpan

        public void setColumnSpan​(int span)
                           throws SemanticException
        Sets the cell's column span. This is the number of table or grid columns occupied by this cell.
        Parameters:
        span - the column span
        Throws:
        SemanticException - if this property is locked.
      • getRowSpan

        public int getRowSpan()
        Returns the cell's row span. This is the number of table or grid rows occupied by this cell.
        Returns:
        the row span
      • setRowSpan

        public void setRowSpan​(int span)
                        throws SemanticException
        Sets the cell's row span. This is the number of table or grid rows occupied by this cell.
        Parameters:
        span - the row span
        Throws:
        SemanticException - if this property is locked.
      • getDrop

        public java.lang.String getDrop()
        Returns the cell's drop property. This is how the cell should expand to fill the entire table or group. This property is valid only for cells within a table; but not for cells within a grid.
        Returns:
        the string value of the drop property
        See Also:
        setDrop(String)
      • setDrop

        public void setDrop​(java.lang.String drop)
                     throws SemanticException
        Sets the cell's drop property. The input value is defined in DesignChoiceConstants and can be one of:
        • DROP_TYPE_NONE
        • DROP_TYPE_DETAIL
        • DROP_TYPE_ALL

        Note that This property is valid only for cells within a table; but not for cells within a grid.

        Parameters:
        drop - the string value of the drop property
        Throws:
        SemanticException - if the property is locked or the input value is not one of the above.
        See Also:
        getDrop()
      • getContent

        public SlotHandle getContent()
        Returns the contents of the cell. The cell can contain any number of items, but normally contains just one.
        Returns:
        a handle to the content slot
      • getColumn

        public int getColumn()
        Returns the cell's column property. The return value gives the column in which the cell starts. Columns are numbered from 1.
        Returns:
        the column index, starting from 1.
      • setColumn

        public void setColumn​(int column)
                       throws SemanticException
        Sets the cell's column property. The input value gives the column in which the cell starts. Columns are numbered from 1.
        Parameters:
        column - the column index, starting from 1.
        Throws:
        SemanticException - if this property is locked.
      • getHeight

        public DimensionHandle getHeight()
        Returns the cell's height.
        Returns:
        the cell's height
      • getWidth

        public DimensionHandle getWidth()
        Returns the cell's width.
        Returns:
        the cell's width
      • getOnPrepare

        public java.lang.String getOnPrepare()
        Gets the on-prepare script of the group. Startup phase. No data binding yet. The design of an element can be changed here.
        Returns:
        the on-prepare script of the group
      • getOnCreate

        public java.lang.String getOnCreate()
        Gets the on-finish script of the group. Presentation phase. The report item has been read from the report document, but not sent to emitter yet.
        Returns:
        the on-finish script of the group
      • getOnRender

        public java.lang.String getOnRender()
        Gets the on-finish script of the group. Presentation phase. The report item has been read from the report document, but not sent to emitter yet.
        Returns:
        the on-finish script of the group
      • setOnPrepare

        public void setOnPrepare​(java.lang.String script)
                          throws SemanticException
        Sets the on-prepare script of the group element.
        Parameters:
        script - the script to set
        Throws:
        SemanticException - if the method is locked.
        See Also:
        getOnPrepare()
      • setOnCreate

        public void setOnCreate​(java.lang.String script)
                         throws SemanticException
        Sets the on-create script of the group element.
        Parameters:
        script - the script to set
        Throws:
        SemanticException - if the method is locked.
        See Also:
        getOnCreate()
      • setOnRender

        public void setOnRender​(java.lang.String script)
                         throws SemanticException
        Sets the on-render script of the group element.
        Parameters:
        script - the script to set
        Throws:
        SemanticException - if the method is locked.
        See Also:
        getOnRender()
      • setDiagonalNumber

        public void setDiagonalNumber​(int diagonalNumber)
                               throws SemanticException
        Sets the number of the diagonal lines that are from top-left to bottom-right corners.
        Parameters:
        diagonalNumber - the diagonal number
        Throws:
        SemanticException
      • getDiagonalNumber

        public int getDiagonalNumber()
        Gets the number of the diagonal lines that are from top-left to bottom-right corners.
        Returns:
        the diagonal number.
      • getDiagonalThickness

        public DimensionHandle getDiagonalThickness()
        Gets a dimension handle to deal with the diagonal thickness. Besides the dimension value, the dimension handle may return one of constants defined in DesignChoiceConstatns:
        • LINE_WIDTH_THIN
        • LINE_WIDTH_MEDIUM
        • LINE_WIDTH_THICK
        Returns:
        a DimensionHandle for the diagonal thickness
      • setDiagonalStyle

        public void setDiagonalStyle​(java.lang.String lineStyle)
                              throws SemanticException
        Sets the style of the diagonal that is from top-left to bottom-right. The input value is one of constants defined in DesignChoiceConstants:
        • LINE_STYLE_NONE
        • LINE_STYLE_SOLID
        • LINE_STYLE_DOTTED
        • LINE_STYLE_DASHED
        • LINE_STYLE_DOUBLE
        • LINE_STYLE_GROOVE
        • LINE_STYLE_RIDGE
        • LINE_STYLE_INSET
        • LINE_STYLE_OUTSET
        Parameters:
        lineStyle - the line style.
        Throws:
        SemanticException - if the input value is not one of the above values.
      • getDiagonalStyle

        public java.lang.String getDiagonalStyle()
        Returns the style of the diagonal that is from top-left to bottom-right. The return value is one of constants defined in DesignChoiceConstants:
        • LINE_STYLE_NONE
        • LINE_STYLE_SOLID
        • LINE_STYLE_DOTTED
        • LINE_STYLE_DASHED
        • LINE_STYLE_DOUBLE
        • LINE_STYLE_GROOVE
        • LINE_STYLE_RIDGE
        • LINE_STYLE_INSET
        • LINE_STYLE_OUTSET
        Returns:
        the diagonal style.
      • getDiagonalColor

        public ColorHandle getDiagonalColor()
        Gets a color handle to deal with the color of the diagonal.
        Returns:
        a ColorHandle to for the color of the diagonal.
      • setAntidiagonalNumber

        public void setAntidiagonalNumber​(int antidiagonalNumber)
                                   throws SemanticException
        Sets the number of the anti-diagonal lines that are from the top-right to bottom-left.
        Parameters:
        antidiagonalNumber - the anti-diagonal number
        Throws:
        SemanticException
      • getAntidiagonalNumber

        public int getAntidiagonalNumber()
        Gets the number of the anti-diagonal lines that are from the top-right to bottom-left.
        Returns:
        the anti-diagonal number.
      • getAntidiagonalThickness

        public DimensionHandle getAntidiagonalThickness()
        Gets a dimension handle to deal with the anti-diagonal thickness. Besides the dimension value, the dimension handle may return one of constants defined in DesignChoiceConstatns:
        • LINE_WIDTH_THIN
        • LINE_WIDTH_MEDIUM
        • LINE_WIDTH_THICK
        Returns:
        a DimensionHandle for the anti-diagonal thickness
      • getAntidiagonalStyle

        public java.lang.String getAntidiagonalStyle()
        Returns the style of the anti-diagonal that is from top-right to bottom-left corner. The return value is one of constants defined in DesignChoiceConstants:
        • LINE_STYLE_NONE
        • LINE_STYLE_SOLID
        • LINE_STYLE_DOTTED
        • LINE_STYLE_DASHED
        • LINE_STYLE_DOUBLE
        • LINE_STYLE_GROOVE
        • LINE_STYLE_RIDGE
        • LINE_STYLE_INSET
        • LINE_STYLE_OUTSET
        Returns:
        the anti-diagonal style.
      • setAntidiagonalStyle

        public void setAntidiagonalStyle​(java.lang.String antidiagonalStyle)
                                  throws SemanticException
        Sets the style of the anti-diagonal that is from top-right to bottom-left corner. The input value is one of constants defined in DesignChoiceConstants:
        • LINE_STYLE_NONE
        • LINE_STYLE_SOLID
        • LINE_STYLE_DOTTED
        • LINE_STYLE_DASHED
        • LINE_STYLE_DOUBLE
        • LINE_STYLE_GROOVE
        • LINE_STYLE_RIDGE
        • LINE_STYLE_INSET
        • LINE_STYLE_OUTSET
        Parameters:
        antidiagonalStyle - the anti-diagonal style.
        Throws:
        SemanticException - if the input value is not one of the above values.
      • getAntidiagonalColor

        public ColorHandle getAntidiagonalColor()
        Gets a color handle to deal with the color of the anti-diagonal.
        Returns:
        a ColorHandle to for the color of the anti-diagonal.
      • setScope

        public void setScope​(java.lang.String scope)
                      throws SemanticException
        Sets the scope value of the cell.The input value is one of the constants defined in DesignChoiceConstants:
        • SCOPE_TYPE_ROW
        • SCOPE_TYPE_COL
        • SCOPE_TYPE_ROWGROUP
        • SCOPE_TYPE_COLGROUP
        Parameters:
        scope - the scope
        Throws:
        SemanticException - if the input value is not one of the above values.
      • getScope

        public java.lang.String getScope()
        Gets the scope value of the cell.The return value is one of the constants defined in DesignChoiceConstants:
        • SCOPE_TYPE_ROW
        • SCOPE_TYPE_COL
        • SCOPE_TYPE_ROWGROUP
        • SCOPE_TYPE_COLGROUP
        Returns:
        the scope.
      • setBookmark

        public void setBookmark​(java.lang.String bookmark)
                         throws SemanticException
        Sets the book mark value on the cell element.
        Parameters:
        bookmark - the book mark.
        Throws:
        SemanticException - if this property is locked.
      • getBookmark

        public java.lang.String getBookmark()
        Gets the book mark value on the cell element.
        Returns:
        the book mark value.
      • getHeaders

        public java.lang.String getHeaders()
        Gets the headers value on the cell element.
        Returns:
        the headers value.
      • setHeaders

        public void setHeaders​(java.lang.String headers)
                        throws SemanticException
        Sets the headers value on the cell element.
        Parameters:
        headers - the headers value.
        Throws:
        SemanticException - if this property is locked.
      • getBookmarkDisplayName

        public java.lang.String getBookmarkDisplayName()
        Gets the display name of the bookmark.
        Returns:
        the display name of the bookmark.
      • setBookmarkDisplayName

        public void setBookmarkDisplayName​(java.lang.String bookmarkDisplayName)
                                    throws SemanticException
        Sets the display name of the bookmark.
        Parameters:
        bookmarkDisplayName - the display name of the bookmark to set
        Throws:
        SemanticException
      • getTagType

        public java.lang.String getTagType()
        Returns the tag type of this label item.
        Returns:
        the tag type value
      • setTagType

        public void setTagType​(java.lang.String tagType)
                        throws SemanticException
        Sets the tag type of this label item.
        Parameters:
        tag - type the tag type
        Throws:
        SemanticException - if the property is locked.
      • getLanguage

        public java.lang.String getLanguage()
        Returns the language of this label item.
        Returns:
        the language
      • setLanguage

        public void setLanguage​(java.lang.String language)
                         throws SemanticException
        Sets the language of this label item.
        Parameters:
        language - the language
        Throws:
        SemanticException - if the property is locked.
      • getAltTextExpression

        public ExpressionHandle getAltTextExpression()
        Returns the alternate text of this label item.
        Returns:
        the alternate text
      • setAltTextExpression

        public void setAltTextExpression​(Expression altText)
                                  throws SemanticException
        Sets the alternate text of this label item.
        Parameters:
        altText - the alternate text expression.
        Throws:
        SemanticException - if the property is locked.
      • getAltTextKey

        public java.lang.String getAltTextKey()
        Returns the resource key of the alternate text of this image.
        Returns:
        the resource key of the alternate text
      • setAltTextKey

        public void setAltTextKey​(java.lang.String altTextKey)
                           throws SemanticException
        Sets the resource key of the alternate text of this image.
        Parameters:
        altTextKey - the alternate text key
        Throws:
        SemanticException