Class Day
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.month.internal.Day
- All Implemented Interfaces:
java.util.EventListener
,org.eclipse.swt.events.DisposeListener
,org.eclipse.swt.events.PaintListener
,org.eclipse.swt.graphics.Drawable
,org.eclipse.swt.internal.SWTEventListener
public class Day
extends org.eclipse.swt.widgets.Canvas
implements org.eclipse.swt.events.PaintListener, org.eclipse.swt.events.DisposeListener
An SWT custom control representing a single day in a month-mode calendar.
-
Field Summary
Fields Modifier and Type Field Description static int
FOCUS
static int
NO_FOCUS
static int
NONACTIVE_FOCUS
-
Constructor Summary
Constructors Constructor Description Day(org.eclipse.swt.widgets.Composite parent, int style)
-
Method Summary
Modifier and Type Method Description void
addMouseListener(org.eclipse.swt.events.MouseListener listener)
org.eclipse.swt.graphics.Point
computeSize(int wHint, int hHint, boolean changed)
java.util.Date
getDate()
Returns the Date represented by this Day.int
getDayNumber()
int
getFocusState()
org.eclipse.swt.graphics.Point
getMonthPosition()
void
paintControl(org.eclipse.swt.events.PaintEvent e)
void
removeMouseListener(org.eclipse.swt.events.MouseListener listener)
void
setDate(java.util.Date date)
Sets the Date represented by this Day.void
setDayNumber(int dayNum)
void
setFocusState(int focusState)
void
setInCurrentMonth(boolean inCurrentMonth)
void
setItems(CalendarableItem[] controls)
void
setMonthPosition(org.eclipse.swt.graphics.Point monthPosition)
void
widgetDisposed(org.eclipse.swt.events.DisposeEvent e)
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, 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, 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
-
NONACTIVE_FOCUS
public static final int NONACTIVE_FOCUS- See Also:
- Constant Field Values
-
FOCUS
public static final int FOCUS- See Also:
- Constant Field Values
-
NO_FOCUS
public static final int NO_FOCUS- See Also:
- Constant Field Values
-
-
Constructor Details
-
Day
public Day(org.eclipse.swt.widgets.Composite parent, int style)- Parameters:
parent
-style
-
-
-
Method Details
-
widgetDisposed
public void widgetDisposed(org.eclipse.swt.events.DisposeEvent e)- Specified by:
widgetDisposed
in interfaceorg.eclipse.swt.events.DisposeListener
-
computeSize
public org.eclipse.swt.graphics.Point computeSize(int wHint, int hHint, boolean changed)- Overrides:
computeSize
in classorg.eclipse.swt.widgets.Control
-
getMonthPosition
public org.eclipse.swt.graphics.Point getMonthPosition()- Returns:
- The (day, week) of this day in the month.
-
setMonthPosition
public void setMonthPosition(org.eclipse.swt.graphics.Point monthPosition)- Parameters:
monthPosition
- The (day, week) of this day in the month.
-
getDayNumber
public int getDayNumber()- Returns:
- The day's number
-
setDayNumber
public void setDayNumber(int dayNum)- Parameters:
dayNum
- the day number to set
-
paintControl
public void paintControl(org.eclipse.swt.events.PaintEvent e)- Specified by:
paintControl
in interfaceorg.eclipse.swt.events.PaintListener
-
addMouseListener
public void addMouseListener(org.eclipse.swt.events.MouseListener listener)- Overrides:
addMouseListener
in classorg.eclipse.swt.widgets.Control
-
removeMouseListener
public void removeMouseListener(org.eclipse.swt.events.MouseListener listener)- Overrides:
removeMouseListener
in classorg.eclipse.swt.widgets.Control
-
setInCurrentMonth
public void setInCurrentMonth(boolean inCurrentMonth)- Parameters:
inCurrentMonth
-
-
setItems
- Parameters:
controls
-
-
setDate
public void setDate(java.util.Date date)Sets the Date represented by this Day.- Parameters:
date
- The date to set
-
getDate
public java.util.Date getDate()Returns the Date represented by this Day.- Returns:
- This Day's date
-
getFocusState
public int getFocusState() -
setFocusState
public void setFocusState(int focusState)
-