Class DatePicker
java.lang.Object
org.eclipse.nebula.cwt.v.VControl
org.eclipse.nebula.cwt.v.VPanel
org.eclipse.nebula.widgets.cdatetime.DatePicker
class DatePicker extends VPanel
-
Nested Class Summary
-
Field Summary
Fields Modifier and Type Field Description (package private) VButton
clear
(package private) VButton
dateNow
(package private) VButton[]
dayButtons
(package private) VLabel[]
dayLabels
(package private) boolean
editYear
(package private) VButton
monthButton
(package private) VButton[]
monthButtons
(package private) org.eclipse.swt.widgets.MenuItem[]
monthItems
(package private) VButton
monthNext
(package private) VPanel
monthPanel
(package private) VButton
monthPrev
(package private) org.eclipse.swt.widgets.MenuItem
showSelMenuItem
(package private) VButton
timeButton
(package private) VPanel
timePanel
(package private) VButton
today
(package private) org.eclipse.swt.widgets.MenuItem
todayMenuItem
(package private) VButton
yearButton
(package private) VButton[]
yearButtons
(package private) org.eclipse.swt.widgets.MenuItem[]
yearItems
(package private) VButton
yearNext
(package private) VPanel
yearPanel
(package private) VButton
yearPrev
Fields inherited from class org.eclipse.nebula.cwt.v.VControl
carbon, gtk, STATE_ACTIVE, STATE_ENABLED, STATE_MOUSE_DOWN, STATE_SELECTED, win32
-
Constructor Summary
Constructors Constructor Description DatePicker(CDateTime parent)
Constructs a new instance of this class given its parent, a style value describing its behavior and appearance, a date to which the initial selection will be set, and the locale to use. -
Method Summary
Modifier and Type Method Description protected void
createContents()
int[]
getFields()
(package private) static boolean
isValidDate(java.util.Calendar selectedDay, java.util.Calendar min, java.util.Calendar max)
void
setEditable(boolean editable)
void
setFields(int[] calendarFields)
boolean
setFocus()
protected boolean
setFocus(boolean focus)
(package private) void
setMonthLabelText()
void
setScrollable(boolean scrollable)
(package private) void
traverseSelection(int keyCode)
Traverse the selection programmatically just as a user would with the keyboard.void
updateColorsAndFont()
protected void
updateLabels()
(package private) void
updateView()
Methods inherited from class org.eclipse.nebula.cwt.v.VPanel
computeSize, dispose, getBorderWidth, getChildren, getControl, getControl, getLayout, getLayout, getType, getWidget, layout, layout, redrawOnActivate, redrawOnDeactivate, setActivatable, setBounds, setEnabled, setLayout, setLayoutData, setSize, setVisibility, setVisible, setWidget, sort
Methods inherited from class org.eclipse.nebula.cwt.v.VControl
addListener, computeSize, containsControl, createMenu, filterEvent, getBackground, getBounds, getClientArea, getClientSize, getComposite, getControl, getData, getData, getData, getData, getDisplay, getEnabled, getFont, getForeground, getImage, getLayoutData, getListeners, getLocation, getMargins, getMenu, getParent, getShell, getSize, getState, getStyle, getText, getToolTipText, getVisibility, getVisible, hasState, hasStyle, isActivatable, isDisposed, isEnabled, isSameWidgetAs, isSameWidgetAs, isSquare, isVisible, moveAbove, moveBelow, notifyListeners, notifyListeners, paintControl, redraw, removeListener, setActiveCursor, setAlignment, setAlpha, setAlpha, setBackground, setBounds, setCursor, setData, setData, setFill, setFont, setForeground, setImage, setImage, setInactiveCursor, setLocation, setLocation, setMargins, setMargins, setMargins, setOval, setOval, setPainter, setParent, setPolygon, setPolygon, setScaleImage, setSquare, setState, setStyle, setStyle, setText, setToolTipText, setVisible, setVisible, toControl, toControl, toDisplay, toDisplay, toString, update
-
Field Details
-
monthButton
VButton monthButton -
monthPrev
VButton monthPrev -
dateNow
VButton dateNow -
monthNext
VButton monthNext -
yearButton
VButton yearButton -
yearPrev
VButton yearPrev -
yearNext
VButton yearNext -
timeButton
VButton timeButton -
dayLabels
VLabel[] dayLabels -
dayButtons
VButton[] dayButtons -
today
VButton today -
clear
VButton clear -
todayMenuItem
org.eclipse.swt.widgets.MenuItem todayMenuItem -
showSelMenuItem
org.eclipse.swt.widgets.MenuItem showSelMenuItem -
monthItems
org.eclipse.swt.widgets.MenuItem[] monthItems -
yearItems
org.eclipse.swt.widgets.MenuItem[] yearItems -
editYear
boolean editYear -
monthPanel
VPanel monthPanel -
monthButtons
VButton[] monthButtons -
yearPanel
VPanel yearPanel -
yearButtons
VButton[] yearButtons -
timePanel
VPanel timePanel
-
-
Constructor Details
-
DatePicker
Constructs a new instance of this class given its parent, a style value describing its behavior and appearance, a date to which the initial selection will be set, and the locale to use.- Parameters:
parent
- a widget which will be the parent of the new instance (cannot be null)
-
-
Method Details
-
createContents
protected void createContents() -
getFields
public int[] getFields() -
setEditable
public void setEditable(boolean editable) -
setFields
public void setFields(int[] calendarFields) -
setFocus
public boolean setFocus() -
setFocus
protected boolean setFocus(boolean focus) -
setMonthLabelText
void setMonthLabelText() -
setScrollable
public void setScrollable(boolean scrollable) -
traverseSelection
void traverseSelection(int keyCode)Traverse the selection programmatically just as a user would with the keyboard.- Valid Keys:
- SWT.ARROW_UP, SWT.ARROW_DOWN, SWT.ARROW_LEFT, SWT.ARROW_RIGHT
- Parameters:
keyCode
- a SWT traversal keycode- See Also:
scrollCalendar(int)
-
updateLabels
protected void updateLabels() -
updateView
void updateView() -
isValidDate
static boolean isValidDate(java.util.Calendar selectedDay, java.util.Calendar min, java.util.Calendar max) -
updateColorsAndFont
public void updateColorsAndFont()- Overrides:
updateColorsAndFont
in classVPanel
-