public class CalendarConfig extends WidgetConfigExt
Modifier and Type | Class and Description |
---|---|
static class |
CalendarConfig.DateFormatFieldsAdapter
Adapts DateFormat to ChronoField and resolves positions of date and time fields within
date and time patterns.
|
Modifier and Type | Field and Description |
---|---|
private static int |
ATTR_MASK_CHECK_BOX
Bitwise mask to mark CHECK BOX atribute usage.
|
private static int |
ATTR_MASK_UP_DOWN
Bitwise mask to mark UP DOWN atribute usage.
|
int |
bodyBackgroundColor
The background color for the dropdown calendar given by the BGR encoding
|
int |
bodyForegroundColor
The foreground color for the dropdown calendar given by the BGR encoding
|
boolean |
checkBox
True if a checkbox to the left of the date must be displayed, otherwise false
|
java.lang.String |
customFormat
Holds the current date time format.
|
java.lang.String |
dateTimeValue
Holds the current date or time value as a string value in the ISO-8601 calendar system.
|
int |
day
Holds the day number from 1 to 31.
|
int |
dayOfWeek
Holds the day of week number from 0 to 6
|
static int |
DTS_CUSTOMFORMAT
Displays date and time using the format string specified in the 'CustomFormat' property.
|
static int |
DTS_LONGDATEFORMAT
Displays the date in long format.
|
static int |
DTS_SHORTDATEFORMAT
Displays the date in short format.
|
static int |
DTS_TIMEFORMAT
Displays the time.
|
date |
earliestDate
Holds the earliest possible date
|
int |
formatStyle
The format style constant, it can be one of DTS_LONGDATEFORMAT, DTS_SHORTDATEFORMAT,
DTS_TIMEFORMAT, DTS_CUSTOMFORMAT.
|
int |
hour
Holds the hour number from 0 to 23.
|
date |
latestDate
Holds the latest possible date
|
int |
minute
Holds the minute number from 0 to 59.
|
int |
month
Holds the month number from 1 to 12.
|
int |
second
Holds the second number from 0 to 59.
|
int |
selectedFieldIndex
Represents an index of the selected field of the date/time content
|
int |
titleBackgroundColor
The background color for the title portion of the dropdown calendar
given by the BGR encoding.
|
int |
titleForegroundColor
The foreground color for the title portion of the dropdown calendar
given by the BGR encoding.
|
int |
trailingForegroundColor
The foreground color for the previous and following months of
the dropdown calendar given by the BGR encoding
|
boolean |
upDown
Its value indicates if the up and down buttons are used to modify dates or not
|
int |
year
Holds the year number.
|
CC_ARROW, CC_ARROW_HOURGLASS, CC_ARROW_QUESTION, CC_CROSS, CC_CUSTOM, CC_DEFAULT, CC_HOURGLASS, CC_IBEAM, CC_ICON, CC_NO_DROP, CC_SIZE, CC_SIZE_ALL, CC_SIZE_EW, CC_SIZE_NESW, CC_SIZE_NS, CC_SIZE_NWSE, CC_UP_ARROW, mouseIcon, mousePointer
oleAllowedEffects, oleDataFormat, oleDefaultCursors, oleDragMode, oleDropMode, oleEffect, oleState, oleX, oleY
mouseButton, mouseShift, mouseX, mouseY
attrSpace, autoResize, clabel, dataType, dropTarget, forceLabel, help, index, INVALID_SELECTION, label, labels, possibleSideLabel, selectionActive, selectionEnd, selectionStart, sideLabelId, untranslatedLabel
align, bgcolor, bgcolorRgb, captionFontSize, clientColumn, clientHeightChars, clientHeightPixels, clientRow, clientWidthChars, clientWidthPixels, clientX, clientY, column, dcolor, dynamic, fgcolor, fgcolorRgb, fixedHeight, fixedWidth, font, fontChanged, fontName, fontSize, fontStyle, frameColumnOffset, frameRowOffset, frameXOffset, frameYOffset, heightChars, heightPixels, initColumn, initHeightChars, initRow, initWidthChars, initX, initY, INV_COORD, locationChanged, movable, name, parentId, pfcolor, resizable, row, selected, sysbgcolor, sysfgcolor, systemParentId, tabStop, title, titleDColor, titleFont, tooltip, widgetPlaced, widthChars, widthPixels, x, y
cfgClass, contextHelpId, disableRedraw, enabled, frameDefValue, frameId, header, hidden, id, manualHightlight, menuKey, menuMouse, modified, popupMenuId, realized, selectable, state, visible, wasRealized, zorder
Constructor and Description |
---|
CalendarConfig()
The default constructor.
|
CalendarConfig(int id)
Creates this instance using the given identifier.
|
CalendarConfig(WidgetId id)
Creates this instance using the given identifier.
|
Modifier and Type | Method and Description |
---|---|
void |
applyConfig(WidgetConfig config)
Set new values from the provided configuration instance.
|
static boolean |
isLocalizedFormat(int formatStyle)
Tests if the given format style is one of the predefined localized system date and time
formats to display dates as full or short form styles or to display times in a short form.
|
static boolean |
isTimeFormat(int formatStyle)
Tests if the given format style is the predefined format to display times in a short form.
|
void |
readExternal(java.io.ObjectInput in)
Replacement for the default object reading method.
|
static java.time.format.FormatStyle[] |
toDateTimeStyles(int formatStyle)
Converts the control format style to the pair of date and time legacy format style used
by java time api.
|
void |
writeExternal(java.io.ObjectOutput out)
Replacement for the default object writing method.
|
setDynamicFormat
getConfigManager, getDynamicColumnLabel, getDynamicFormat, getDynamicHelp, getDynamicLabel, getDynamicUntranslatedLabel, markFieldsDirty, setDynamicHeader, setDynamicHelp, setDynamicLabel, setDynamicLabels, setDynamicUntranslatedLabel, toString
public static final int DTS_LONGDATEFORMAT
public static final int DTS_SHORTDATEFORMAT
public static final int DTS_TIMEFORMAT
public static final int DTS_CUSTOMFORMAT
public int formatStyle
public java.lang.String customFormat
public java.lang.String dateTimeValue
public int day
public int month
public int year
public int dayOfWeek
public int hour
public int minute
public int second
public date latestDate
public date earliestDate
public int bodyBackgroundColor
public int bodyForegroundColor
public int titleBackgroundColor
public int titleForegroundColor
public int trailingForegroundColor
public boolean checkBox
public boolean upDown
public int selectedFieldIndex
private static final int ATTR_MASK_CHECK_BOX
private static final int ATTR_MASK_UP_DOWN
public CalendarConfig()
public CalendarConfig(int id)
id
- The widget identifierpublic CalendarConfig(WidgetId id)
id
- The widget identifierpublic static final java.time.format.FormatStyle[] toDateTimeStyles(int formatStyle)
formatStyle
- The format style constant provided for the calendar widgetpublic static final boolean isLocalizedFormat(int formatStyle)
formatStyle
- The given format stylepublic static final boolean isTimeFormat(int formatStyle)
formatStyle
- The given format stylepublic void applyConfig(WidgetConfig config)
applyConfig
in class WidgetConfigExt
config
- The instance from which to take values.public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
readExternal
in class WidgetConfigExt
in
- The input source from which fields will be restored.java.io.IOException
- In case of I/O errors.java.lang.ClassNotFoundException
- If payload can't be instantiated.public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
writeExternal
in class WidgetConfigExt
out
- The output destination to which fields will be saved.java.io.IOException
- In case of I/O errors.