Class TimeSlice

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.day.internal.TimeSlice
All Implemented Interfaces:
org.eclipse.swt.graphics.Drawable

public class TimeSlice
extends org.eclipse.swt.widgets.Composite
Represents a time slice that is the same time but may span several days. For example: 11:00 - 11:15 PM from Sunday through Saturday.
Since:
3.2
  • Field Summary

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

    handle
  • Constructor Summary

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

    Modifier and Type Method Description
    void addCellFocusListener​(org.eclipse.swt.events.FocusListener listener)  
    void addKeyListener​(org.eclipse.swt.events.KeyListener listener)  
    void addMouseListener​(org.eclipse.swt.events.MouseListener listener)  
    org.eclipse.swt.widgets.Control getColumnControl​(int column)
    Returns the control that implements the specified column.
    java.util.LinkedList getColumns()  
    int getControlColumn​(org.eclipse.swt.widgets.Widget widget)
    Return the column number of the specified widget.
    java.util.Date getCurrentTime()  
    int getNumberOfColumns()
    Gets the number of columns that will be displayed in this row.
    boolean isHeaderControl()  
    void removeCellFocusListener​(org.eclipse.swt.events.FocusListener listener)  
    void removeKeyListener​(org.eclipse.swt.events.KeyListener listener)  
    void removeMouseListener​(org.eclipse.swt.events.MouseListener listener)  
    void setCurrentTime​(java.util.Date currentTime)  
    void setHeaderControl​(boolean headerControl)  
    void setMenu​(org.eclipse.swt.widgets.Menu menu)  
    void setNumberOfColumns​(int numberOfColumns)
    Sets the number of columns that will be displayed in this row.

    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, 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, removeMenuDetectListener, 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
  • Constructor Details

    • TimeSlice

      public TimeSlice​(org.eclipse.swt.widgets.Composite parent, int style)
      Constructor TimeSlice. Construct a TimeSlice control, passing the parent and style bits.
      Parameters:
      parent - The SWT parent object.
      style - The set of style bits this control accepts. Currently SWT.NONE.
  • Method Details

    • getColumns

      public java.util.LinkedList getColumns()
      Returns:
      Returns the columns.
    • getColumnControl

      public org.eclipse.swt.widgets.Control getColumnControl​(int column)
      Returns the control that implements the specified column.
      Parameters:
      column - The column number.
      Returns:
      Control the SWT control that implements this column.
    • getControlColumn

      public int getControlColumn​(org.eclipse.swt.widgets.Widget widget)
      Return the column number of the specified widget.
      Parameters:
      widget - the TimeSlot widget
      Returns:
      the column number of the specified TimeSlot within this TimeSlice.
    • setMenu

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

      public boolean isHeaderControl()
      Returns:
      Returns the headerControl.
    • setHeaderControl

      public void setHeaderControl​(boolean headerControl)
      Parameters:
      headerControl - The headerControl to set.
    • getNumberOfColumns

      public int getNumberOfColumns()
      Gets the number of columns that will be displayed in this row. The default number of columns is 1.
      Returns:
      numberOfColumns The number of days to display.
    • setNumberOfColumns

      public void setNumberOfColumns​(int numberOfColumns)
      Sets the number of columns that will be displayed in this row. The default number of columns is 1. This method may only be called *once* at the beginning of the control's life cycle, and the value passed must be >1.

      Calling this method more than once results in undefined behavior.

      Parameters:
      numberOfColumns - The number of days to display.
    • getCurrentTime

      public java.util.Date getCurrentTime()
      Returns:
      The current time set in this "days" row.
    • setCurrentTime

      public void setCurrentTime​(java.util.Date currentTime)
      Parameters:
      currentTime -
    • addCellFocusListener

      public void addCellFocusListener​(org.eclipse.swt.events.FocusListener listener)
      Parameters:
      listener -
      See Also:
      Control.addFocusListener(org.eclipse.swt.events.FocusListener)
    • removeCellFocusListener

      public void removeCellFocusListener​(org.eclipse.swt.events.FocusListener listener)
      Parameters:
      listener -
      See Also:
      Control.removeFocusListener(org.eclipse.swt.events.FocusListener)
    • 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
    • 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