Class AbstractSelectableRow

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.nebula.widgets.compositetable.AbstractSelectableRow
All Implemented Interfaces:
java.util.EventListener, IRowContentProvider, IRowFocusListener, org.eclipse.swt.events.FocusListener, org.eclipse.swt.events.KeyListener, org.eclipse.swt.events.MouseListener, org.eclipse.swt.events.TraverseListener, org.eclipse.swt.graphics.Drawable, org.eclipse.swt.internal.SWTEventListener

public abstract class AbstractSelectableRow
extends org.eclipse.swt.widgets.Composite
implements org.eclipse.swt.events.TraverseListener, org.eclipse.swt.events.FocusListener, org.eclipse.swt.events.MouseListener, IRowFocusListener, IRowContentProvider, org.eclipse.swt.events.KeyListener
An abstract row class making it easy to implement a table where the whole row is selected at once.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected java.util.List labels  

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

    handle
  • Constructor Summary

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

    Modifier and Type Method Description
    void arrive​(CompositeTable sender, int currentObjectOffset, org.eclipse.swt.widgets.Control newRow)
    Method arrive.
    void depart​(CompositeTable sender, int currentObjectOffset, org.eclipse.swt.widgets.Control row)
    Method depart.
    void focusGained​(org.eclipse.swt.events.FocusEvent e)  
    void focusLost​(org.eclipse.swt.events.FocusEvent e)  
    java.util.List getLabelsList()  
    java.lang.Object getModel()  
    void keyPressed​(org.eclipse.swt.events.KeyEvent e)  
    void keyReleased​(org.eclipse.swt.events.KeyEvent e)  
    void keyTraversed​(org.eclipse.swt.events.TraverseEvent e)  
    void mouseDoubleClick​(org.eclipse.swt.events.MouseEvent e)
    Clients should override to implement their double-click behavior.
    void mouseDown​(org.eclipse.swt.events.MouseEvent e)  
    void mouseUp​(org.eclipse.swt.events.MouseEvent e)  
    void refresh​(CompositeTable sender, int currentObjectOffset, org.eclipse.swt.widgets.Control row)
    Method refresh.
    boolean requestRowChange​(CompositeTable sender, int currentObjectOffset, org.eclipse.swt.widgets.Control row)
    Method requestRowChange.
    void setColumnCount​(int columnCount)
    Method setColumnCount.
    void setMenu​(org.eclipse.swt.widgets.Menu menu)  
    void setModel​(java.lang.Object object)  
    protected void setSelection​(java.lang.Object model)  

    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, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, 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, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, 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

    • labels

      protected java.util.List labels
  • Constructor Details

    • AbstractSelectableRow

      public AbstractSelectableRow​(org.eclipse.swt.widgets.Composite parent, int style)
  • Method Details

    • getLabelsList

      public java.util.List getLabelsList()
    • keyTraversed

      public void keyTraversed​(org.eclipse.swt.events.TraverseEvent e)
      Specified by:
      keyTraversed in interface org.eclipse.swt.events.TraverseListener
    • focusGained

      public void focusGained​(org.eclipse.swt.events.FocusEvent e)
      Specified by:
      focusGained in interface org.eclipse.swt.events.FocusListener
    • setSelection

      protected void setSelection​(java.lang.Object model)
    • focusLost

      public void focusLost​(org.eclipse.swt.events.FocusEvent e)
      Specified by:
      focusLost in interface org.eclipse.swt.events.FocusListener
    • depart

      public void depart​(CompositeTable sender, int currentObjectOffset, org.eclipse.swt.widgets.Control row)
      Description copied from interface: IRowFocusListener
      Method depart. Called after requstRowChange has been called to indicate that the focus is departing the specified row.
      Specified by:
      depart in interface IRowFocusListener
    • arrive

      public void arrive​(CompositeTable sender, int currentObjectOffset, org.eclipse.swt.widgets.Control newRow)
      Description copied from interface: IRowFocusListener
      Method arrive. Notifies receiver that the current row has just been changed.
      Specified by:
      arrive in interface IRowFocusListener
      Parameters:
      sender - The CompositeTable sending the event.
      currentObjectOffset - The 0-based offset to the row that should be populated
      newRow - The actual SWT row object that needs to be populated with data
    • refresh

      public void refresh​(CompositeTable sender, int currentObjectOffset, org.eclipse.swt.widgets.Control row)
      Description copied from interface: IRowContentProvider
      Method refresh. Requests receiver to refresh the currentRowInTable with data to edit.
      Specified by:
      refresh in interface IRowContentProvider
      Parameters:
      sender - The CompositeTable sending the message.
      currentObjectOffset - The 0-based row number that is offset in the data structure of the table's top row.
      row - The row control to fill with data. This will be a copy of your prototype row object.
    • requestRowChange

      public boolean requestRowChange​(CompositeTable sender, int currentObjectOffset, org.eclipse.swt.widgets.Control row)
      Description copied from interface: IRowFocusListener
      Method requestRowChange. Requests permission to change rows. This method is called immediately before a row change occurs. Listeners must return true to grant permission for the row change to occur or return false to veto it. If any listener returns false, the entire row change operation is aborted.

      Specified by:
      requestRowChange in interface IRowFocusListener
      Parameters:
      sender - The CompositeTable sending the event.
      currentObjectOffset - The offset of the current object in the data structure.
      row - The row control that is losing focus.
      Returns:
      true to permit the row change to occur; false otherwise.
    • mouseDown

      public void mouseDown​(org.eclipse.swt.events.MouseEvent e)
      Specified by:
      mouseDown in interface org.eclipse.swt.events.MouseListener
    • mouseDoubleClick

      public void mouseDoubleClick​(org.eclipse.swt.events.MouseEvent e)
      Clients should override to implement their double-click behavior.
      Specified by:
      mouseDoubleClick in interface org.eclipse.swt.events.MouseListener
    • mouseUp

      public void mouseUp​(org.eclipse.swt.events.MouseEvent e)
      Specified by:
      mouseUp in interface org.eclipse.swt.events.MouseListener
    • setModel

      public void setModel​(java.lang.Object object)
    • getModel

      public java.lang.Object getModel()
    • setMenu

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

      public void keyPressed​(org.eclipse.swt.events.KeyEvent e)
      Specified by:
      keyPressed in interface org.eclipse.swt.events.KeyListener
    • keyReleased

      public void keyReleased​(org.eclipse.swt.events.KeyEvent e)
      Specified by:
      keyReleased in interface org.eclipse.swt.events.KeyListener
    • setColumnCount

      public void setColumnCount​(int columnCount)
      Method setColumnCount. Sets the number of columns in the row. This method must be called exactly once in the overridden constructor.
      Parameters:
      columnCount - The number of columns in the row.