Class GridColumn

java.lang.Object
org.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Item
org.eclipse.nebula.widgets.grid.GridColumn

public class GridColumn
extends org.eclipse.swt.widgets.Item

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.

Instances of this class represent a column in a grid widget.

Styles:
SWT.LEFT, SWT.RIGHT, SWT.CENTER, SWT.CHECK
Events:
Move, Resize, Selection, Show, Hide
  • Field Summary

    Fields 
    Modifier and Type Field Description
    (package private) int index  
    (package private) int width
    Width of column.
  • Constructor Summary

    Constructors 
    Constructor Description
    GridColumn​(GridColumnGroup parent, int style)
    Constructs a new instance of this class given its parent column group (which must be a GridColumnGroup), a style value describing its behavior and appearance, and the index at which to place it in the items maintained by its parent.
    GridColumn​(Grid parent, int style)
    Constructs a new instance of this class given its parent (which must be a Grid) and a style value describing its behavior and appearance.
    GridColumn​(Grid parent, int style, int index)
    Constructs a new instance of this class given its parent (which must be a Grid), a style value describing its behavior and appearance, and the index at which to place it in the items maintained by its parent.
  • Method Summary

    Modifier and Type Method Description
    void addControlListener​(org.eclipse.swt.events.ControlListener listener)
    Adds a listener to the list of listeners notified when the column is moved or resized.
    void addSelectionListener​(org.eclipse.swt.events.SelectionListener listener)
    Adds the listener to the collection of listeners who will be notified when the receiver's is pushed, by sending it one of the messages defined in the SelectionListener interface.
    void dispose()
    (package private) void fireListeners()
    Fires selection listeners.
    (package private) void fireMoved()
    Fires moved event.
    (package private) void fireResized()
    Fires resized event.
    int getAlignment()
    Returns the column alignment.
    (package private) org.eclipse.swt.graphics.Rectangle getBounds()
    Returns the bounds of this column's header.
    GridCellRenderer getCellRenderer()
    Returns the cell renderer.
    boolean getCellSelectionEnabled()
    Returns true if cells in the receiver can be selected.
    boolean getCheckable()
    Returns the checkable state.
    GridColumnGroup getColumnGroup()
    Returns the column group if this column was created inside a group, or null otherwise.
    org.eclipse.swt.graphics.Font getFooterFont()
    Returns the font that the receiver will use to paint textual information for the footer.
    (package private) int getFooterHeight​(org.eclipse.swt.graphics.GC gc)  
    org.eclipse.swt.graphics.Image getFooterImage()
    Returns the receiver's footer image if it has one, or null if it does not.
    (package private) GridFooterRenderer getFooterRenderer()  
    java.lang.String getFooterText()
    Returns the receiver's footer text, which will be an empty string if it has never been set.
    org.eclipse.swt.widgets.Control getHeaderControl()  
    org.eclipse.swt.graphics.Font getHeaderFont()
    Returns the font that the receiver will use to paint textual information for the header.
    (package private) int getHeaderHeight​(org.eclipse.swt.graphics.GC gc)  
    GridHeaderRenderer getHeaderRenderer()
    Returns the header renderer.
    java.lang.String getHeaderTooltip()
    Returns the tooltip of the column header.
    boolean getHeaderWordWrap()
    Returns whether or not text is word-wrapped in the header for this column.
    int getMinimumWidth()  
    boolean getMoveable()
    Returns true if this column is moveable.
    Grid getParent()
    Returns the parent grid.
    boolean getResizeable()
    Returns true if the column is resizeable.
    int getSort()
    Returns the sort indicator value.
    int getVerticalAlignment()
    Returns the vertical alignment.
    boolean getVisible()
    Returns the visibility state as set with setVisible.
    int getWidth()
    Returns the width of the column.
    boolean getWordWrap()
    Returns the true if the cells in receiver wrap their text.
    boolean isCheck()
    Returns true if the column includes a check box.
    boolean isDetail()
    Returns true if this column is set as a detail column in a column group.
    boolean isSummary()
    Returns true if this column is set as a summary column in a column group.
    protected boolean isTableCheck()  
    boolean isTree()
    Returns true if this column includes a tree toggle.
    boolean isVisible()
    Returns true if the column is visible, false otherwise.
    void pack()
    Causes the receiver to be resized to its preferred size.
    void removeControlListener​(org.eclipse.swt.events.ControlListener listener)
    Removes the given control listener.
    void removeSelectionListener​(org.eclipse.swt.events.SelectionListener listener)
    Removes the listener from the collection of listeners who will be notified when the receiver's selection changes.
    void setAlignment​(int alignment)
    Sets the column alignment.
    void setCellRenderer​(GridCellRenderer cellRenderer)
    Sets the cell renderer.
    void setCellSelectionEnabled​(boolean cellSelectionEnabled)
    Sets whether cells in the receiver can be selected.
    void setCheckable​(boolean checkable)
    Sets the checkable state.
    (package private) void setColumnIndex​(int newIndex)  
    void setDetail​(boolean detail)
    Sets the column as a detail column in a column group.
    void setFooterFont​(org.eclipse.swt.graphics.Font font)
    Sets the Font to be used when displaying the Footer text.
    void setFooterImage​(org.eclipse.swt.graphics.Image image)
    Sets the receiver's footer image to the argument, which may be null indicating that no image should be displayed.
    void setFooterRenderer​(GridFooterRenderer footerRenderer)
    Sets the header renderer.
    void setFooterText​(java.lang.String string)
    Sets the receiver's footer text.
    void setHeaderControl​(org.eclipse.swt.widgets.Control control)
    Set a new editor at the top of the control.
    void setHeaderFont​(org.eclipse.swt.graphics.Font font)
    Sets the Font to be used when displaying the Header text.
    void setHeaderRenderer​(GridHeaderRenderer headerRenderer)
    Sets the header renderer.
    void setHeaderTooltip​(java.lang.String tooltip)
    Sets the tooltip text of the column header.
    void setHeaderWordWrap​(boolean wordWrap)
    Sets whether or not text is word-wrapped in the header for this column.
    void setMinimumWidth​(int minimumWidth)
    Set the minimum width of the column
    void setMoveable​(boolean moveable)
    Sets the column moveable or fixed.
    void setResizeable​(boolean resizeable)
    Sets the column resizeable.
    void setSort​(int style)
    Sets the sort indicator style for the column.
    void setSummary​(boolean summary)
    Sets the column as a summary column in a column group.
    protected void setTableCheck​(boolean tableCheck)  
    void setTree​(boolean tree)
    Adds or removes the columns tree toggle.
    void setVerticalAlignment​(int alignment)
    Sets the column's vertical text alignment.
    void setVisible​(boolean visible)
    Sets the column's visibility.
    void setWidth​(int width)
    Sets the width of the column.
    (package private) void setWidth​(int width, boolean redraw)  
    void setWordWrap​(boolean wordWrap)
    If the argument is true, wraps the text in the receiver's cells.

    Methods inherited from class org.eclipse.swt.widgets.Item

    checkSubclass, getImage, getText, setImage, setText

    Methods inherited from class org.eclipse.swt.widgets.Widget

    addDisposeListener, addListener, checkWidget, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • width

      int width
      Width of column.
    • index

      int index
  • Constructor Details

    • GridColumn

      public GridColumn​(Grid parent, int style)
      Constructs a new instance of this class given its parent (which must be a Grid) and a style value describing its behavior and appearance. The item is added to the end of the items maintained by its parent.
      Parameters:
      parent - an Grid control which will be the parent of the new instance (cannot be null)
      style - the style of control to construct
      Throws:
      java.lang.IllegalArgumentException -
      • ERROR_NULL_ARGUMENT - if the parent is null
      org.eclipse.swt.SWTException -
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent
      • ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass
    • GridColumn

      public GridColumn​(Grid parent, int style, int index)
      Constructs a new instance of this class given its parent (which must be a Grid), a style value describing its behavior and appearance, and the index at which to place it in the items maintained by its parent.
      Parameters:
      parent - an Grid control which will be the parent of the new instance (cannot be null)
      style - the style of control to construct
      index - the index to store the receiver in its parent
      Throws:
      java.lang.IllegalArgumentException -
      • ERROR_NULL_ARGUMENT - if the parent is null
      org.eclipse.swt.SWTException -
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent
      • ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass
    • GridColumn

      public GridColumn​(GridColumnGroup parent, int style)
      Constructs a new instance of this class given its parent column group (which must be a GridColumnGroup), a style value describing its behavior and appearance, and the index at which to place it in the items maintained by its parent.
      Parameters:
      parent - an Grid control which will be the parent of the new instance (cannot be null)
      style - the style of control to construct
      Throws:
      java.lang.IllegalArgumentException -
      • ERROR_NULL_ARGUMENT - if the parent is null
      org.eclipse.swt.SWTException -
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent
      • ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass
  • Method Details

    • getFooterHeight

      int getFooterHeight​(org.eclipse.swt.graphics.GC gc)
    • getHeaderHeight

      int getHeaderHeight​(org.eclipse.swt.graphics.GC gc)
    • dispose

      public void dispose()
      Overrides:
      dispose in class org.eclipse.swt.widgets.Widget
    • getHeaderRenderer

      public GridHeaderRenderer getHeaderRenderer()
      Returns the header renderer.
      Returns:
      header renderer
    • getFooterRenderer

      GridFooterRenderer getFooterRenderer()
    • getCellRenderer

      public GridCellRenderer getCellRenderer()
      Returns the cell renderer.
      Returns:
      cell renderer.
    • getWidth

      public int getWidth()
      Returns the width of the column.
      Returns:
      width of column
      Throws:
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • setWidth

      public void setWidth​(int width)
      Sets the width of the column.
      Parameters:
      width - new width
      Throws:
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • setWidth

      void setWidth​(int width, boolean redraw)
    • setSort

      public void setSort​(int style)
      Sets the sort indicator style for the column. This method does not actual sort the data in the table. Valid values include: SWT.UP, SWT.DOWN, SWT.NONE.
      Parameters:
      style - SWT.UP, SWT.DOWN, SWT.NONE
      Throws:
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • getSort

      public int getSort()
      Returns the sort indicator value.
      Returns:
      SWT.UP, SWT.DOWN, SWT.NONE
      Throws:
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • addSelectionListener

      public void addSelectionListener​(org.eclipse.swt.events.SelectionListener listener)
      Adds the listener to the collection of listeners who will be notified when the receiver's is pushed, by sending it one of the messages defined in the SelectionListener interface.
      Parameters:
      listener - the listener which should be notified
      Throws:
      java.lang.IllegalArgumentException -
      • ERROR_NULL_ARGUMENT - if the listener is null
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • removeSelectionListener

      public void removeSelectionListener​(org.eclipse.swt.events.SelectionListener listener)
      Removes the listener from the collection of listeners who will be notified when the receiver's selection changes.
      Parameters:
      listener - the listener which should no longer be notified
      Throws:
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
      See Also:
      SelectionListener, addSelectionListener(SelectionListener)
    • fireListeners

      void fireListeners()
      Fires selection listeners.
    • isVisible

      public boolean isVisible()
      Returns true if the column is visible, false otherwise. If the column is in a group and the group is not expanded and this is a detail column, returns false (and vice versa).
      Returns:
      true if visible, false otherwise
      Throws:
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • getVisible

      public boolean getVisible()
      Returns the visibility state as set with setVisible.
      Returns:
      the visible
      Throws:
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • setVisible

      public void setVisible​(boolean visible)
      Sets the column's visibility.
      Parameters:
      visible - the visible to set
      Throws:
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • pack

      public void pack()
      Causes the receiver to be resized to its preferred size.
      Throws:
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • isTree

      public boolean isTree()
      Returns true if this column includes a tree toggle.
      Returns:
      true if the column includes the tree toggle.
      Throws:
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • isCheck

      public boolean isCheck()
      Returns true if the column includes a check box.
      Returns:
      true if the column includes a check box.
      Throws:
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • setCellRenderer

      public void setCellRenderer​(GridCellRenderer cellRenderer)
      Sets the cell renderer.
      Parameters:
      cellRenderer - The cellRenderer to set.
      Throws:
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • setHeaderRenderer

      public void setHeaderRenderer​(GridHeaderRenderer headerRenderer)
      Sets the header renderer.
      Parameters:
      headerRenderer - The headerRenderer to set.
      Throws:
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • setFooterRenderer

      public void setFooterRenderer​(GridFooterRenderer footerRenderer)
      Sets the header renderer.
      Parameters:
      footerRenderer - The footerRenderer to set.
      Throws:
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • addControlListener

      public void addControlListener​(org.eclipse.swt.events.ControlListener listener)
      Adds a listener to the list of listeners notified when the column is moved or resized.
      Parameters:
      listener - listener
      Throws:
      java.lang.IllegalArgumentException -
      • ERROR_NULL_ARGUMENT - if the listener is null
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • removeControlListener

      public void removeControlListener​(org.eclipse.swt.events.ControlListener listener)
      Removes the given control listener.
      Parameters:
      listener - listener.
      Throws:
      java.lang.IllegalArgumentException -
      • ERROR_NULL_ARGUMENT - if the listener is null
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • fireMoved

      void fireMoved()
      Fires moved event.
    • fireResized

      void fireResized()
      Fires resized event.
    • setTree

      public void setTree​(boolean tree)
      Adds or removes the columns tree toggle.
      Parameters:
      tree - true to add toggle.
      Throws:
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • getAlignment

      public int getAlignment()
      Returns the column alignment.
      Returns:
      SWT.LEFT, SWT.RIGHT, SWT.CENTER
      Throws:
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • setAlignment

      public void setAlignment​(int alignment)
      Sets the column alignment.
      Parameters:
      alignment - SWT.LEFT, SWT.RIGHT, SWT.CENTER
      Throws:
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • getVerticalAlignment

      public int getVerticalAlignment()
      Returns the vertical alignment.
      Returns:
      SWT.TOP (default), SWT.CENTER, SWT.BOTTOM
      Throws:
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • setVerticalAlignment

      public void setVerticalAlignment​(int alignment)
      Sets the column's vertical text alignment.
      Parameters:
      alignment - SWT.TOP (default), SWT.CENTER, SWT.BOTTOM
      Throws:
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • getMoveable

      public boolean getMoveable()
      Returns true if this column is moveable.
      Returns:
      true if moveable.
      Throws:
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • setMoveable

      public void setMoveable​(boolean moveable)
      Sets the column moveable or fixed.
      Parameters:
      moveable - true to enable column moving
      Throws:
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • getResizeable

      public boolean getResizeable()
      Returns true if the column is resizeable.
      Returns:
      true if the column is resizeable.
      Throws:
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • setResizeable

      public void setResizeable​(boolean resizeable)
      Sets the column resizeable.
      Parameters:
      resizeable - true to make the column resizeable
      Throws:
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • getColumnGroup

      public GridColumnGroup getColumnGroup()
      Returns the column group if this column was created inside a group, or null otherwise.
      Returns:
      the column group.
      Throws:
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • isDetail

      public boolean isDetail()
      Returns true if this column is set as a detail column in a column group. Detail columns are shown when the group is expanded.
      Returns:
      true if the column is a detail column.
      Throws:
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • setDetail

      public void setDetail​(boolean detail)
      Sets the column as a detail column in a column group. Detail columns are shown when a column group is expanded. If this column was not created in a column group, this method has no effect.
      Parameters:
      detail - true to show this column when the group is expanded.
      Throws:
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • isSummary

      public boolean isSummary()
      Returns true if this column is set as a summary column in a column group. Summary columns are shown when the group is collapsed.
      Returns:
      true if the column is a summary column.
      Throws:
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • setSummary

      public void setSummary​(boolean summary)
      Sets the column as a summary column in a column group. Summary columns are shown when a column group is collapsed. If this column was not created in a column group, this method has no effect.
      Parameters:
      summary - true to show this column when the group is collapsed.
      Throws:
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • getBounds

      org.eclipse.swt.graphics.Rectangle getBounds()
      Returns the bounds of this column's header.
      Returns:
      bounds of the column header
    • isTableCheck

      protected boolean isTableCheck()
      Returns:
      the tableCheck
    • setTableCheck

      protected void setTableCheck​(boolean tableCheck)
      Parameters:
      tableCheck - the tableCheck to set
    • getCellSelectionEnabled

      public boolean getCellSelectionEnabled()
      Returns true if cells in the receiver can be selected.
      Returns:
      the cellSelectionEnabled
      Throws:
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • setCellSelectionEnabled

      public void setCellSelectionEnabled​(boolean cellSelectionEnabled)
      Sets whether cells in the receiver can be selected.
      Parameters:
      cellSelectionEnabled - the cellSelectionEnabled to set
      Throws:
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • getParent

      public Grid getParent()
      Returns the parent grid.
      Returns:
      the parent grid.
      Throws:
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • getCheckable

      public boolean getCheckable()
      Returns the checkable state. If false the checkboxes in the column cannot be checked.
      Returns:
      true if the column is checkable (only applicable when style is SWT.CHECK).
      Throws:
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • setCheckable

      public void setCheckable​(boolean checkable)
      Sets the checkable state. If false the checkboxes in the column cannot be checked.
      Parameters:
      checkable - the new checkable state.
      Throws:
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • setColumnIndex

      void setColumnIndex​(int newIndex)
    • getWordWrap

      public boolean getWordWrap()
      Returns the true if the cells in receiver wrap their text.
      Returns:
      true if the cells wrap their text.
      Throws:
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • setWordWrap

      public void setWordWrap​(boolean wordWrap)
      If the argument is true, wraps the text in the receiver's cells. This feature will not cause the row height to expand to accommodate the wrapped text. Please use Grid#setItemHeight to change the height of each row.
      Parameters:
      wordWrap - true to make cells wrap their text.
      Throws:
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • setHeaderWordWrap

      public void setHeaderWordWrap​(boolean wordWrap)
      Sets whether or not text is word-wrapped in the header for this column. If Grid.setAutoHeight(true) is set, the row height is adjusted to accommodate word-wrapped text.
      Parameters:
      wordWrap - Set to true to wrap the text, false otherwise
      See Also:
      getHeaderWordWrap()
    • getHeaderWordWrap

      public boolean getHeaderWordWrap()
      Returns whether or not text is word-wrapped in the header for this column.
      Returns:
      true if the header wraps its text.
      See Also:
      setHeaderWordWrap(boolean)
    • setHeaderControl

      public void setHeaderControl​(org.eclipse.swt.widgets.Control control)
      Set a new editor at the top of the control. If there's an editor already set it is disposed.
      Parameters:
      control - the control to be displayed in the header
    • getHeaderControl

      public org.eclipse.swt.widgets.Control getHeaderControl()
      Returns:
      the current header control
    • getHeaderTooltip

      public java.lang.String getHeaderTooltip()
      Returns the tooltip of the column header.
      Returns:
      the tooltip text
    • setHeaderTooltip

      public void setHeaderTooltip​(java.lang.String tooltip)
      Sets the tooltip text of the column header.
      Parameters:
      tooltip - the tooltip text
    • setFooterImage

      public void setFooterImage​(org.eclipse.swt.graphics.Image image)
      Sets the receiver's footer image to the argument, which may be null indicating that no image should be displayed.
      Parameters:
      image - the image to display on the receiver (may be null)
      Throws:
      java.lang.IllegalArgumentException -
      • ERROR_INVALID_ARGUMENT - if the image has been disposed
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • setFooterText

      public void setFooterText​(java.lang.String string)
      Sets the receiver's footer text.
      Parameters:
      string - the new text
      Throws:
      java.lang.IllegalArgumentException -
      • ERROR_NULL_ARGUMENT - if the text is null
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • getFooterImage

      public org.eclipse.swt.graphics.Image getFooterImage()
      Returns the receiver's footer image if it has one, or null if it does not.
      Returns:
      the receiver's image
      Throws:
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • getFooterText

      public java.lang.String getFooterText()
      Returns the receiver's footer text, which will be an empty string if it has never been set.
      Returns:
      the receiver's text
      Throws:
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • getHeaderFont

      public org.eclipse.swt.graphics.Font getHeaderFont()
      Returns the font that the receiver will use to paint textual information for the header.
      Returns:
      the receiver's font
      Throws:
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • setHeaderFont

      public void setHeaderFont​(org.eclipse.swt.graphics.Font font)
      Sets the Font to be used when displaying the Header text.
      Parameters:
      font -
    • getFooterFont

      public org.eclipse.swt.graphics.Font getFooterFont()
      Returns the font that the receiver will use to paint textual information for the footer.
      Returns:
      the receiver's font
      Throws:
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • setFooterFont

      public void setFooterFont​(org.eclipse.swt.graphics.Font font)
      Sets the Font to be used when displaying the Footer text.
      Parameters:
      font -
    • getMinimumWidth

      public int getMinimumWidth()
      Returns:
      the minimum width
    • setMinimumWidth

      public void setMinimumWidth​(int minimumWidth)
      Set the minimum width of the column
      Parameters:
      minimumWidth - the minimum width