Class GridCellRenderer

java.lang.Object
All Implemented Interfaces:
IInternalWidget, IRenderer
Direct Known Subclasses:
DefaultCellRenderer, DefaultEmptyCellRenderer

public abstract class GridCellRenderer
extends AbstractInternalWidget

NOTE: THIS WIDGET AND ITS API ARE STILL UNDER DEVELOPMENT. THIS IS A PRE-RELEASE ALPHA VERSION. USERS SHOULD EXPECT API CHANGES IN FUTURE VERSIONS.

The super class for all grid cell renderers. Contains the properties specific to a grid cell.
  • Field Details

  • Constructor Details

  • Method Details

    • 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