Class CompositeTable

java.lang.Object
org.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Control
org.eclipse.swt.widgets.Scrollable
org.eclipse.swt.widgets.Composite
org.eclipse.swt.widgets.Canvas
org.eclipse.nebula.widgets.compositetable.CompositeTable
All Implemented Interfaces:
org.eclipse.swt.graphics.Drawable

public class CompositeTable
extends org.eclipse.swt.widgets.Canvas
Class CompositeTable. n. (1) An SWT virtual table control that extends Composite. (2) An SWT virtual table control that is composed of many Composites, each representing a header or a row, one below the other.

CompositeTable is designed specifically to work nicely in the Eclipse Visual Editor, but it is equally easy to use in hand-coded layouts.

Synopsis:

In order to edit anything, one must:

  • Extend Composite or Canvas and create an object that can be duplicated to represent the rows in your table.
  • Optionally, extend Composite or Canvas and create a header object in the same way.
  • If the canvas and row objects do not have a layout manager, the CompositeTable will automatically supply one that lays out child controls in a visual table. If they have a layout manager, CompositeTable will let them use that.
  • Create a CompositeTable object, either using VE or using hand-coded SWT.
  • Drop the header (if applicable), then the row object on the CompositeTable or simply write code that creates instances of these objects in that order as child controls of your CompositeTable.
  • Set the RunTime property to "true". Your control is now "live."
  • Add a RowConstructionListener if you need to add event handlers to individual row controls when a row is created.
  • Add a RowContentProvider that knows how to put data into your row object's controls on demand.
  • Add a RowFocusListener to validate and save changed data.
  • Set the NumRowsInCollection property to the number of rows in the underlying data structure.
Detailed description:

This control is designed to work inside of the Eclipse Visual Editor. To use it, drop one on the design surface. (Even though it extends Canvas, it does not make sense to put a layout manager on it.)

Next create one or two new custom controls by using the Visual Editor to extend Composite. If you create one custom control, it will be used as the prototype for all rows that will be displayed in the table. If you create two, the first one will be used as a prototype for the header and the second one will be used as a prototype for the rows.

If these custom controls are not given layout managers (null layout), then CompositeTable will automatically detect this situation and will supply its own layout manager that will automatically lay out the children of these controls in columns to form a table. However, if you supply layout managers for your header prototype and row prototype objects, CompositeTable will respect your choice. If you use CompositeTable's built-in layout manager, then the weights property will be used to determine what percentage of the total width will be allocated to each column. If this property is not set or if the sum of their elements does not equal 100, the columns are created as equal sizes.

Once you have created your (optional) Header and Row custom controls, simply drop them onto your CompositeTable control in VE. The first of these two custom controls to be instantiated in your code will be interpreted by the CompositeTable as the header control and the second will be interpreted as the row control.

Now that you have defined the (optional) header and row, you can switch your CompositeTable into run mode and use it. This is done by switching the RunTime property to true.

Once in run mode, all of the CompositeTable's properties will be active. In order to use it, set the NumRowsInCollection property to the number of rows in the collection you want to display. And add a RefreshContentProvider, which will be called whenever CompositeTable needs to refresh a particular row.

Please refer to the remainder of the JavaDoc for information on the remaining properties and events.

Although this control extends Composite, it is not intended to be subclassed except within its own implementation and it makes no sense to set a layout manager on it (although as discussed above, the child controls may have layout managers).

Since:
3.2
  • Field Summary

    Fields 
    Modifier and Type Field Description
    (package private) java.util.LinkedList contentProviders  
    (package private) boolean deleteEnabled  
    (package private) java.util.LinkedList deleteHandlers  
    (package private) java.util.LinkedList insertHandlers  
    (package private) java.lang.String insertHint  
    (package private) boolean linesVisible  
    (package private) java.util.LinkedList rowConstructionListeners  
    (package private) java.util.LinkedList rowFocusListeners  
    (package private) java.util.LinkedList scrollListeners  

    Fields inherited from class org.eclipse.swt.widgets.Control

    handle
  • Constructor Summary

    Constructors 
    Constructor Description
    CompositeTable​(org.eclipse.swt.widgets.Composite parent, int style)
    Constructor CompositeTable.
  • Method Summary

    Modifier and Type Method Description
    void addDeleteHandler​(IDeleteHandler deleteHandler)
    Method addDeleteHandler.
    void addInsertHandler​(IInsertHandler insertHandler)
    Method addInsertHandler.
    void addKeyListener​(org.eclipse.swt.events.KeyListener listener)
    void addMouseListener​(org.eclipse.swt.events.MouseListener listener)
    void addMouseMoveListener​(org.eclipse.swt.events.MouseMoveListener listener)  
    void addRowConstructionListener​(RowConstructionListener rowConstructionListener)
    Method addRowConstructionListener.
    void addRowContentProvider​(IRowContentProvider contentProvider)
    Method addRowContentProvider.
    void addRowFocusListener​(IRowFocusListener rowListener)
    Method addRowListener.
    void addScrollListener​(ScrollListener scrollListener)
    Method addScrollListener.
    void clearSelection()
    Method clearSelection.
    boolean doDeleteRow()  
    void doFocusInitialRow()
    Method doFocusInitialRow.
    void doFocusLastRow()
    Method doFocusLastRow.
    boolean doInsertRow()  
    boolean doMakeFocusedRowVisible()
    Makes sure that the focused row is visible
    void doPageDown()
    Method doPageDown.
    void doPageUp()
    Method doPageUp.
    void doRowDown()
    Method doRowDown.
    void doRowUp()
    Method doRowUp.
    (package private) void fireKeyPressed​(org.eclipse.swt.events.KeyEvent e)  
    (package private) void fireKeyReleased​(org.eclipse.swt.events.KeyEvent e)  
    (package private) void fireMouseDouble​(org.eclipse.swt.events.MouseEvent e)  
    (package private) void fireMouseDown​(org.eclipse.swt.events.MouseEvent e)  
    (package private) void fireMouseMove​(org.eclipse.swt.events.MouseEvent e)  
    (package private) void fireMouseUp​(org.eclipse.swt.events.MouseEvent e)  
    int getControlRow​(org.eclipse.swt.widgets.Control rowControl)
    Method getControlRow.
    int getCurrentColumn()
    Method getCurrentColumn.
    int getCurrentRow()
    Method getCurrentRow.
    org.eclipse.swt.widgets.Control getCurrentRowControl()
    Method getCurrentRowControl.
    org.eclipse.swt.widgets.Control getHeader()
    Returns the actual header control (not the prototype).
    java.lang.reflect.Constructor getHeaderConstructor()
    (non-API) Method getHeaderConstructor.
    org.eclipse.swt.widgets.Control getHeaderControl()
    (non-API) Method getHeaderControl.
    java.lang.String getInsertHint()
    Returns the hint string that will be displayed when there are no rows in the table.
    boolean getLinesVisible()
    Method getLinesVisible.
    int getMaxRowsVisible()
    Method getMaxRowsVisible.
    int getNumRowsInCollection()
    Method getNumRowsInCollection.
    int getNumRowsVisible()
    Method getNumRowsVisible.
    java.lang.reflect.Constructor getRowConstructor()
    (non-API) Method getRowConstructor.
    org.eclipse.swt.widgets.Control getRowControl()
    (non-API) Method getRowControl.
    org.eclipse.swt.widgets.Control[] getRowControls()
    Method getRowControls.
    org.eclipse.swt.graphics.Point getSelection()
    Method getSelection.
    int getTopRow()
    Method getTopRow.
    boolean isDeleteEnabled()
    Method isDeleteEnabled.
    boolean isRunTime()
    Method isRunTime.
    boolean isTraverseOnTabsEnabled()
    Method isTraverseOnTabsEnabled.
    void refreshAllRows()
    Method refreshAllRows.
    void refreshRow​(int row)
    Method refreshRow.
    void removeDeleteHandler​(IDeleteHandler deleteHandler)
    Method removeDeleteHandler.
    void removeInsertHandler​(IInsertHandler insertHandler)
    Method removeInsertHandler.
    void removeKeyListener​(org.eclipse.swt.events.KeyListener listener)
    void removeMouseListener​(org.eclipse.swt.events.MouseListener listener)
    void removeMouseMoveListener​(org.eclipse.swt.events.MouseMoveListener listener)  
    void removeRowConstructionListener​(RowConstructionListener rowConstructionListener)
    Method removeRowConstructionListener.
    void removeRowContentProvider​(IRowContentProvider contentProvider)
    Method removeRowContentProvider.
    void removeRowFocusListener​(IRowFocusListener listener)
    Method removeRowListener.
    void removeScrollListener​(ScrollListener scrollListener)
    Method removeScrollListener.
    protected void resize()
    (non-API) Method resize.
    protected void resizeAndRecordPrototypeRows()
    (non-API) Method resizeAndRecordPrototypeRows.
    void setBackground​(org.eclipse.swt.graphics.Color color)  
    void setCurrentColumn​(int column)
    Method setCurrentColumn.
    void setCurrentRow​(int row)
    Method setCurrentRow.
    void setDeleteEnabled​(boolean deleteEnabled)
    Method setDeleteEnabled.
    void setInsertHint​(java.lang.String newHint)
    Sets the hint string that will be displayed when there are no rows in the table.
    void setLinesVisible​(boolean linesVisible)
    Method setLinesVisible.
    void setMaxRowsVisible​(int maxRowsVisible)
    Method setMaxRowsVisible.
    void setMenu​(org.eclipse.swt.widgets.Menu menu)  
    void setNumRowsInCollection​(int numRowsInCollection)
    Method setNumRowsInCollection.
    void setRunTime​(boolean runTime)
    Method setRunTime.
    void setSelection​(int column, int row)
    Method setSelection.
    void setSelection​(org.eclipse.swt.graphics.Point selection)
    Method setSelection.
    void setTopRow​(int topRow)
    Method setTopRow.
    void setTraverseOnTabsEnabled​(boolean enabled)
    Method setTraverseOnTabsEnabled.
    protected void updateVisibleRows()
    (non-API) Method updateVisibleRows.

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

    drawBackground, getCaret, getIME, scroll, setCaret, setFont, setIME

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

    changed, checkSubclass, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList, toString

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

    computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar

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

    addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addMenuDetectListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeMenuDetectListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setForeground, setLayoutData, setLocation, setLocation, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update

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

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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.eclipse.swt.graphics.Drawable

    isAutoScalable
  • Field Details

  • Constructor Details

    • CompositeTable

      public CompositeTable​(org.eclipse.swt.widgets.Composite parent, int style)
      Constructor CompositeTable. Construct a CompositeTable control. CompositeTable accepts the same style bits as the SWT Canvas.
      Parameters:
      parent - The SWT parent control.
      style - Style bits. These are the same as Canvas
  • Method Details

    • setBackground

      public void setBackground​(org.eclipse.swt.graphics.Color color)
      Overrides:
      setBackground in class org.eclipse.swt.widgets.Control
    • resize

      protected final void resize()
      (non-API) Method resize. Resize this table's contents. Called from within the custom layout manager.
    • updateVisibleRows

      protected void updateVisibleRows()
      (non-API) Method updateVisibleRows. Makes sure that the content pane is displaying the correct number of visible rows given the control's size. Called from within #resize.
    • resizeAndRecordPrototypeRows

      protected void resizeAndRecordPrototypeRows()
      (non-API) Method resizeAndRecordPrototypeRows. Figure out what child controls are the header and row prototype rows respectively and resize them so they occupy the entire width and their preferred height.
    • isRunTime

      public boolean isRunTime()
      Method isRunTime. Returns if the CompositeTable is in run time mode as opposed to design time mode. In design time mode, the only permitted operations are to add or remove child Composites to be used as the header and/or row prototype objects.
      Returns:
      true if this CompositeTable is in run mode. false otherwise.
    • setRunTime

      public void setRunTime​(boolean runTime)
      Method setRunTime. Turns run-time mode on or off. When run-time mode is off, CompositeTable ignores most property operations and will accept prototype child controls to be added. When run-time mode is on, the prototype controls are interpreted and all properties become active.
      Parameters:
      runTime - true if run-time mode should be enabled; false otherwise.
    • getLinesVisible

      public boolean getLinesVisible()
      Method getLinesVisible. Returns if the CompositeTable will draw grid lines on the header and row Composite objects. This property is ignored if the programmer has set a layout manager on the header and/or the row prototype objects.
      Returns:
      true if the CompositeTable will draw grid lines; false otherwise.
    • setLinesVisible

      public void setLinesVisible​(boolean linesVisible)
      Method setLinesVisible. Sets if the CompositeTable will draw grid lines on the header and row Composite objects. This property is ignored if the programmer has set a layout manager on the header and/or the row prototype objects.
      Parameters:
      linesVisible - true if the CompositeTable will draw grid lines; false otherwise.
    • getInsertHint

      public java.lang.String getInsertHint()
      Returns the hint string that will be displayed when there are no rows in the table.
      Returns:
      The hint string that will be displayed when there are no rows in the table.
    • setInsertHint

      public void setInsertHint​(java.lang.String newHint)
      Sets the hint string that will be displayed when there are no rows in the table. The default value is "Press <INS> to insert a new row."
      Parameters:
      newHint -
    • getMaxRowsVisible

      public int getMaxRowsVisible()
      Method getMaxRowsVisible. Returns the maximum number of rows that will be permitted in the table at once. For example, setting this property to 1 will have the effect of creating a single editing area with a scroll bar on the right allowing the user to scroll through all rows using either the mouse or the PgUp/PgDn keys. The default value is Integer.MAX_VALUE.
      Returns:
      the maximum number of rows that are permitted to be visible at one time, regardless of the control's size.
    • setMaxRowsVisible

      public void setMaxRowsVisible​(int maxRowsVisible)
      Method setMaxRowsVisible. Sets the maximum number of rows that will be permitted in the table at once. For example, setting this property to 1 will have the effect of creating a single editing area with a scroll bar on the right allowing the user to scroll through all rows using either the mouse or the PgUp/PgDn keys. The default value is Integer.MAX_VALUE.
      Parameters:
      maxRowsVisible - the maximum number of rows that are permitted to be visible at one time, regardless of the control's size.
    • getNumRowsVisible

      public int getNumRowsVisible()
      Method getNumRowsVisible. Returns the actual number of rows that are currently visible. Normally CompositeTable displays as many rows as will fit vertically given the control's size. This value can be clamped to a maximum using the MaxRowsVisible property.
      Returns:
      the actual number of rows that are currently visible.
    • getNumRowsInCollection

      public int getNumRowsInCollection()
      Method getNumRowsInCollection. Returns the number of rows in the data structure that is being edited.
      Returns:
      the number of rows in the underlying data structure.
    • setNumRowsInCollection

      public void setNumRowsInCollection​(int numRowsInCollection)
      Method setNumRowsInCollection. Sets the number of rows in the data structure that is being edited.
      Parameters:
      numRowsInCollection - the number of rows represented by the underlying data structure.
    • getTopRow

      public int getTopRow()
      Method getTopRow. Return the number of the line that is being displayed in the top row of the CompositeTable editor (0-based).
      Returns:
      the number of the top line.
    • setTopRow

      public void setTopRow​(int topRow)
      Method setTopRow. Set the number of the line that is being displayed in the top row of the CompositeTable editor (0-based). If the new top row is not equal to the current top row, the table will automatically be scrolled to the new position. This number must be greater than 0 and less than NumRowsInCollection.
      Parameters:
      topRow - the line number of the new top row.
    • doMakeFocusedRowVisible

      public boolean doMakeFocusedRowVisible()
      Makes sure that the focused row is visible
      Returns:
      true if the display needed to be scrolled; false otherwise
    • doFocusInitialRow

      public void doFocusInitialRow()
      Method doFocusInitialRow. Set the focus on row 0 in the collection.
    • doFocusLastRow

      public void doFocusLastRow()
      Method doFocusLastRow. Set the focus on row collection.size()-1.
    • doPageUp

      public void doPageUp()
      Method doPageUp. Move the focus one page earlier in the collection. The page size is normally the same as getNumeRowsVisible().
    • doPageDown

      public void doPageDown()
      Method doPageDown. Move the focus one page later in the collection. The page size is normally the same as getNumeRowsVisible().
    • doRowUp

      public void doRowUp()
      Method doRowUp. Move the focus one row earlier in the collection if it is not already on row 0.
    • doRowDown

      public void doRowDown()
      Method doRowDown.
    • doInsertRow

      public boolean doInsertRow()
    • doDeleteRow

      public boolean doDeleteRow()
    • refreshAllRows

      public void refreshAllRows()
      Method refreshAllRows. Refresh all visible rows in the CompositeTable from the original data.
    • refreshRow

      public void refreshRow​(int row)
      Method refreshRow. Refreshes a row in the CompositeTable from the original data. Row is an offset from the top of the table window. In order to get the current row in the underlying data structure, compute getTopRow() + getCurrentRow().
    • getCurrentColumn

      public int getCurrentColumn()
      Method getCurrentColumn. Returns the column number of the currently-focused column (0-based).
      Returns:
      the column number of the currently-focused column.
    • setCurrentColumn

      public void setCurrentColumn​(int column)
      Method setCurrentColumn. Sets the column number of the currently-focused column (0-based).
      Parameters:
      column - The new column to focus.
    • getCurrentRow

      public int getCurrentRow()
      Method getCurrentRow. Returns the current row number as an offset from the top of the table window. In order to get the current row in the underlying data structure, compute getTopRow() + getCurrentRow().
      Returns:
      the current row number as an offset from the top of the table window.
    • setCurrentRow

      public void setCurrentRow​(int row)
      Method setCurrentRow. Sets the current row number as an offset from the top of the table window. In order to get the current row in the underlying data structure, compute getTopRow() + getCurrentRow().
      Parameters:
      row - the current row number as an offset from the top of the table window.
    • getCurrentRowControl

      public org.eclipse.swt.widgets.Control getCurrentRowControl()
      Method getCurrentRowControl. Returns the SWT control that displays the current row.
      Returns:
      Control the current row control.
    • getRowControls

      public org.eclipse.swt.widgets.Control[] getRowControls()
      Method getRowControls. Returns an array of SWT controls where each control represents a row control in the CompositeTable's current scrolled position. If CompositeTable is resized, scrolled, such that the rows that the CompositeTable control is displaying change in any way, the array that is returned by this method will become out of date and need to be retrieved again.
      Returns:
      Control[] An array of SWT Control objects, each representing an SWT row object.
    • getHeader

      public org.eclipse.swt.widgets.Control getHeader()
      Returns the actual header control (not the prototype).
      Returns:
      a control instance or null if no header is available
    • setMenu

      public void setMenu​(org.eclipse.swt.widgets.Menu menu)
      Overrides:
      setMenu in class org.eclipse.swt.widgets.Control
    • getControlRow

      public int getControlRow​(org.eclipse.swt.widgets.Control rowControl)
      Method getControlRow. Given a row control, returns its row number relative to the topRow.
      Parameters:
      rowControl - The row object to find
      Returns:
      The row number of the rowControl relative to the topRow (0-based)
      Throws:
      java.lang.IllegalArgumentException - if rowControl is not currently visible
    • getSelection

      public org.eclipse.swt.graphics.Point getSelection()
      Method getSelection. Returns the currently-selected (column, row) pair where the row specifies the offset from the top of the table window. In order to get the current row in the underlying data structure, use getSelection().y + getTopRow().
      Returns:
      the currently-selected (column, row) pair where the row specifies the offset from the top of the table window, or null if no selection is available
    • setSelection

      public void setSelection​(org.eclipse.swt.graphics.Point selection)
      Method setSelection. Sets the currently-selected (column, row) pair where the row specifies the offset from the top of the table window. In order to get the current row in the underlying data structure, use getSelection().y + getCurrentRow().
      Parameters:
      selection - the (column, row) to select
    • setSelection

      public void setSelection​(int column, int row)
      Method setSelection. Sets the currently-selected (column, row) pair where the row specifies the offset from the top of the table window. In order to get the current row in the underlying data structure, use getSelection().y + getCurrentRow().
      Parameters:
      column - the column to select
      row - the row to select as an offset from the top of the window
    • clearSelection

      public void clearSelection()
      Method clearSelection. Deselects the currently-selected (column, row) pair.
    • getHeaderConstructor

      public java.lang.reflect.Constructor getHeaderConstructor()
      (non-API) Method getHeaderConstructor. Returns the Constructor object used internally to construct the table's header or null if there is none.
      Returns:
      the header's constructor.
    • getRowConstructor

      public java.lang.reflect.Constructor getRowConstructor()
      (non-API) Method getRowConstructor. Returns the Constructor object used internally to construct each row object.
      Returns:
      the rows' constructor
    • getHeaderControl

      public org.eclipse.swt.widgets.Control getHeaderControl()
      (non-API) Method getHeaderControl. Returns the prototype header control.
      Returns:
      the prototype header control.
    • getRowControl

      public org.eclipse.swt.widgets.Control getRowControl()
      (non-API) Method getRowControl. Returns the prototype row control.
      Returns:
      the prototype row control.
    • addRowContentProvider

      public void addRowContentProvider​(IRowContentProvider contentProvider)
      Method addRowContentProvider. Adds the specified content provider to the list of content providers that will be called when a row needs to be filled with data. Most of the time it only makes sense to add a single one.
      Parameters:
      contentProvider - The content provider to add.
    • removeRowContentProvider

      public void removeRowContentProvider​(IRowContentProvider contentProvider)
      Method removeRowContentProvider. Removes the specified content provider from the list of content providers that will be called when a row needs to be filled with data.
      Parameters:
      contentProvider - The content provider to remove.
    • addRowFocusListener

      public void addRowFocusListener​(IRowFocusListener rowListener)
      Method addRowListener. Adds the specified listener to the set of listeners that will be notified when the user wishes to leave a row and when the user has already left a row. If any listener vetos leaving a row, the focus remains in the row.
      Parameters:
      rowListener - The listener to add.
    • removeRowFocusListener

      public void removeRowFocusListener​(IRowFocusListener listener)
      Method removeRowListener. Removes the specified listener from the set of listeners that will be notified when the user wishes to leave a row and when the user has already left a row. If any listener vetos leaving a row, the focus remains in the row.
      Parameters:
      listener - The listener to remove.
    • addInsertHandler

      public void addInsertHandler​(IInsertHandler insertHandler)
      Method addInsertHandler. Adds the specified insertHandler to the set of objects that will be used to handle insert requests.
      Parameters:
      insertHandler - the insertHandler to add.
    • removeInsertHandler

      public void removeInsertHandler​(IInsertHandler insertHandler)
      Method removeInsertHandler. Removes the specified insertHandler from the set of objects that will be used to handle insert requests.
      Parameters:
      insertHandler - the insertHandler to remove.
    • addDeleteHandler

      public void addDeleteHandler​(IDeleteHandler deleteHandler)
      Method addDeleteHandler. Adds the specified deleteHandler to the set of objects that will be used to handle delete requests.
      Parameters:
      deleteHandler - the deleteHandler to add.
    • removeDeleteHandler

      public void removeDeleteHandler​(IDeleteHandler deleteHandler)
      Method removeDeleteHandler. Removes the specified deleteHandler from the set of objects that will be used to handle delete requests.
      Parameters:
      deleteHandler - the deleteHandler to remove.
    • addRowConstructionListener

      public void addRowConstructionListener​(RowConstructionListener rowConstructionListener)
      Method addRowConstructionListener. Adds the specified rowConstructionListener to the set of objects that will be used to listen to row construction events.
      Parameters:
      rowConstructionListener - the rowConstructionListener to add.
    • removeRowConstructionListener

      public void removeRowConstructionListener​(RowConstructionListener rowConstructionListener)
      Method removeRowConstructionListener. Removes the specified rowConstructionListener from the set of objects that will be used to listen to row construction events.
      Parameters:
      rowConstructionListener - the rowConstructionListener to remove.
    • isDeleteEnabled

      public boolean isDeleteEnabled()
      Method isDeleteEnabled. Returns if delete is enabled. Deletions are only processed if the DeleteEnabled property is true and at least one delete handler has been registered.

      The default value is true.

      Returns:
      true if delete is enabled. false otherwise.
    • setDeleteEnabled

      public void setDeleteEnabled​(boolean deleteEnabled)
      Method setDeleteEnabled. Sets if delete is enabled. Deletions are only processed if the DeleteEnabled property is true and at least one delete handler has been registered.

      The default value is true.

      Parameters:
      deleteEnabled - true if delete should be enabled. false otherwise.
    • addScrollListener

      public void addScrollListener​(ScrollListener scrollListener)
      Method addScrollListener. Adds the specified scroll listener to the list of listeners that will be notified when this CompositeTable control scrolls the top-visible row. This event is not fired when the CompositeTable is resized.
      Parameters:
      scrollListener - the ScrollListener to add.
    • removeScrollListener

      public void removeScrollListener​(ScrollListener scrollListener)
      Method removeScrollListener. Removes the specified scroll listener from the list of listeners that will be notified when this CompositeTable control scrolls the top-visible row.
      Parameters:
      scrollListener - the ScrollListener to remove.
    • isTraverseOnTabsEnabled

      public boolean isTraverseOnTabsEnabled()
      Method isTraverseOnTabsEnabled. Returns true if Tab and Shift-tab cause the focus to wrap from the end of the table back to the beginning and Enter causes the focus to advance. Returns false otherwise.

      This property defaults to true.

      Returns:
      true if CompositeTable is handling Tab, Shift-tab, and Enter key behavior; false otherwise.
    • setTraverseOnTabsEnabled

      public void setTraverseOnTabsEnabled​(boolean enabled)
      Method setTraverseOnTabsEnabled. Sets if Tab and Shift-tab cause the focus to wrap from the end of the table back to the beginning and Enter causes the focus to advance.

      This property defaults to true.

      Parameters:
      enabled - true if CompositeTable is handling Tab, Shift-tab, and Enter key behavior; false otherwise.
    • addKeyListener

      public void addKeyListener​(org.eclipse.swt.events.KeyListener listener)
      Overrides:
      addKeyListener in class org.eclipse.swt.widgets.Control
    • removeKeyListener

      public void removeKeyListener​(org.eclipse.swt.events.KeyListener listener)
      Overrides:
      removeKeyListener in class org.eclipse.swt.widgets.Control
    • fireKeyPressed

      void fireKeyPressed​(org.eclipse.swt.events.KeyEvent e)
    • fireKeyReleased

      void fireKeyReleased​(org.eclipse.swt.events.KeyEvent e)
    • addMouseListener

      public void addMouseListener​(org.eclipse.swt.events.MouseListener listener)
      Overrides:
      addMouseListener in class org.eclipse.swt.widgets.Control
    • removeMouseListener

      public void removeMouseListener​(org.eclipse.swt.events.MouseListener listener)
      Overrides:
      removeMouseListener in class org.eclipse.swt.widgets.Control
    • fireMouseDown

      void fireMouseDown​(org.eclipse.swt.events.MouseEvent e)
    • fireMouseUp

      void fireMouseUp​(org.eclipse.swt.events.MouseEvent e)
    • fireMouseDouble

      void fireMouseDouble​(org.eclipse.swt.events.MouseEvent e)
    • addMouseMoveListener

      public void addMouseMoveListener​(org.eclipse.swt.events.MouseMoveListener listener)
      Overrides:
      addMouseMoveListener in class org.eclipse.swt.widgets.Control
    • removeMouseMoveListener

      public void removeMouseMoveListener​(org.eclipse.swt.events.MouseMoveListener listener)
      Overrides:
      removeMouseMoveListener in class org.eclipse.swt.widgets.Control
    • fireMouseMove

      void fireMouseMove​(org.eclipse.swt.events.MouseEvent e)