Class TimeSlot
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.day.internal.TimeSlot
- All Implemented Interfaces:
org.eclipse.swt.graphics.Drawable
public class TimeSlot
extends org.eclipse.swt.widgets.Canvas
Represents a particular range in time in a single day.
- Since:
- 3.2
-
Field Summary
Fields Modifier and Type Field Description static int
TIME_BAR_WIDTH
Width of the bar between events -
Constructor Summary
Constructors Constructor Description TimeSlot(org.eclipse.swt.widgets.Composite parent, int style)
Constructor EmptyTablePlaceholder. -
Method Summary
Modifier and Type Method Description org.eclipse.swt.graphics.Point
computeSize(int wHint, int hHint, boolean changed)
boolean
isAllDay()
boolean
isMinutesAfterHour(int minute)
void
setAllDay(boolean isAllDayEvent)
void
setTime(java.util.Date currentTime)
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, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, 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, setForeground, setLayoutData, setLocation, setLocation, setMenu, 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
-
Field Details
-
TIME_BAR_WIDTH
public static final int TIME_BAR_WIDTHWidth of the bar between events- See Also:
- Constant Field Values
-
-
Constructor Details
-
TimeSlot
public TimeSlot(org.eclipse.swt.widgets.Composite parent, int style)Constructor EmptyTablePlaceholder. Construct an EmptyTablePlaceholder control.- Parameters:
parent
- The parent controlstyle
- Style bits. These are the same as what Canvas accepts.
-
-
Method Details
-
computeSize
public org.eclipse.swt.graphics.Point computeSize(int wHint, int hHint, boolean changed)- Overrides:
computeSize
in classorg.eclipse.swt.widgets.Control
-
isMinutesAfterHour
public boolean isMinutesAfterHour(int minute)- Parameters:
minute
- The minute to check- Returns:
- true if the time falls on the specified minute of the hour. false otherwise.
-
setAllDay
public void setAllDay(boolean isAllDayEvent)- Parameters:
isAllDayEvent
-
-
isAllDay
public boolean isAllDay()- Returns:
- Returns the allDay.
-
setTime
public void setTime(java.util.Date currentTime)- Parameters:
currentTime
-
-