Class GridCellRenderer

    • Field Detail

      • row

        private int row
      • column

        private int column
      • alignment

        private int alignment
      • verticalAlignment

        private int verticalAlignment
      • tree

        private boolean tree
      • check

        private boolean check
      • rowHover

        private boolean rowHover
      • columnHover

        private boolean columnHover
      • rowFocus

        private boolean rowFocus
      • cellFocus

        private boolean cellFocus
      • cellSelected

        private boolean cellSelected
      • wordWrap

        private boolean wordWrap
      • dragging

        private boolean dragging
      • truncationStyle

        protected int truncationStyle
        Truncation style
    • Constructor Detail

      • GridCellRenderer

        public GridCellRenderer()
    • Method Detail

      • getRow

        public int getRow()
        Returns:
        Returns the row.
      • setRow

        public void setRow​(int row)
        Parameters:
        row - The row to set.
      • getAlignment

        public int getAlignment()
        Returns:
        Returns the alignment.
      • setAlignment

        public void setAlignment​(int alignment)
        Parameters:
        alignment - The alignment to set.
      • getVerticalAlignment

        public int getVerticalAlignment()
        Returns:
        Returns the vertical alignment.
      • setVerticalAlignment

        public void setVerticalAlignment​(int verticalAlignment)
        Parameters:
        verticalAlignment - The vertical alignment to set.
      • isCheck

        public boolean isCheck()
        Returns:
        Returns the check.
      • setCheck

        public void setCheck​(boolean check)
        Parameters:
        check - The check to set.
      • isTree

        public boolean isTree()
        Returns:
        Returns the tree.
      • setTree

        public void setTree​(boolean tree)
        Parameters:
        tree - The tree to set.
      • getColumn

        public int getColumn()
        Returns:
        Returns the column.
      • setColumn

        public void setColumn​(int column)
        Parameters:
        column - The column to set.
      • isColumnHover

        public boolean isColumnHover()
        Returns:
        Returns the columnHover.
      • setColumnHover

        public void setColumnHover​(boolean columnHover)
        Parameters:
        columnHover - The columnHover to set.
      • isRowHover

        public boolean isRowHover()
        Returns:
        Returns the rowHover.
      • setRowHover

        public void setRowHover​(boolean rowHover)
        Parameters:
        rowHover - The rowHover to set.
      • isCellFocus

        public boolean isCellFocus()
        Returns:
        Returns the columnFocus.
      • setCellFocus

        public void setCellFocus​(boolean columnFocus)
        Parameters:
        columnFocus - The columnFocus to set.
      • isRowFocus

        public boolean isRowFocus()
        Returns:
        Returns the rowFocus.
      • setRowFocus

        public void setRowFocus​(boolean rowFocus)
        Parameters:
        rowFocus - The rowFocus to set.
      • isCellSelected

        public boolean isCellSelected()
        Returns:
        the cellSelected
      • setCellSelected

        public void setCellSelected​(boolean cellSelected)
        Parameters:
        cellSelected - the cellSelected to set
      • getTextBounds

        public org.eclipse.swt.graphics.Rectangle getTextBounds​(GridItem item,
                                                                boolean preferred)
        Returns the bounds of the text in the cell. This is used when displaying in-place tooltips. If null is returned here, in-place tooltips will not be displayed. If the preferred argument is true then the returned bounds should be large enough to show the entire text. If preferred is false then the returned bounds should be be relative to the current bounds.
        Parameters:
        item - item to calculate text bounds.
        preferred - true if the preferred width of the text should be returned.
        Returns:
        bounds of the text.
      • isWordWrap

        public boolean isWordWrap()
        Returns:
        the wordWrap
      • setWordWrap

        public void setWordWrap​(boolean wordWrap)
        Parameters:
        wordWrap - the wordWrap to set
      • isDragging

        public boolean isDragging()
        Gets the dragging state.
        Returns:
        Returns the dragging state.
      • setDragging

        public void setDragging​(boolean dragging)
        Sets the dragging state.
        Parameters:
        dragging - The state to set.
      • getTruncationStyle

        public int getTruncationStyle()
        Get the truncation style
        Returns:
        the truncation style.
      • setTruncationStyle

        public void setTruncationStyle​(int truncationStyle)
        Set the truncation style to use when cell content is too large.
        Parameters:
        truncationStyle -
        See Also:
        SWT.LEFT, SWT.CENTER, SWT.RIGHT