public class FlexDateChooser extends FlexObject
用户可选择一个日期、一系列日期或多个日期。控件包含可用于更改月份和年份的向前和向后箭头。
您可让用户选择多个日期,禁止选择某些日期或限制显示一系列日期。
Modifier | Constructor and Description |
---|---|
protected |
FlexDateChooser(JtfObjectHandle handle,
Desktop desktop)
使用 JtfObjectHandle 创建新 FlexDateChooser。
|
Modifier and Type | Method and Description |
---|---|
void |
change(Date newDate)
选择或更改日期时发送。
|
Color |
getColor()
获取 组件中的文本颜色,包括组件标签。
|
Color |
getDisabledColor()
获取 已禁用组件时组件中的文本颜色。
|
List<String> |
getDisabledDays()
获取 一周中可禁用的天。
|
List<String> |
getDisabledRanges()
获取 可禁用的一天或多天。
|
int |
getDisplayedMonth()
获取 DateChooser 控件中显示的月份。
|
int |
getDisplayedYear()
获取 DateChooser 控件中显示的年份。
|
List<Color> |
getFillColors()
获取 用于控件背景色填充的颜色。
|
int |
getFirstDayOfWeek()
获取 DateChooser 控件第一列中显示的表示星期的数字。
|
String |
getFontFamily()
获取 可使用的字体名称。
|
double |
getFontSize()
获取 文本高度(像素)。
|
String |
getFontStyle()
获取 文本是否为斜体。
|
String |
getFontWeight()
获取 文本是否为粗体。
|
List<Color> |
getHeaderColors()
获取 DateChooser 控件顶部区段的颜色。
|
int |
getMaxYear()
获取 控件中可选的最近年份。
|
int |
getMinYear()
获取 控件中可选的第一个年份。
|
Color |
getRollOverColor()
获取 用户将鼠标指针放在 DateChooser 控件中的日期上方时日期的突出显示区域的颜色。
|
Date |
getSelectedDate()
获取 日期与在 DateChooser 控件中选择的日期相同。
|
List<String> |
getSelectedRanges()
获取 所选日期范围。
|
Color |
getSelectionColor()
获取 DateChooser 控件中当前所选日期突出显示区域的颜色。
|
String |
getTextAlign()
获取 文本是否为粗体。
|
String |
getTextDecoration()
获取 文本是否加下划线。
|
int |
getTextIndent()
获取 容器左侧文本的第一行的偏移(像素)。
|
Color |
getTodayColor()
获取 DateChooser 控件中今日日期的突出显示颜色。
|
boolean |
isAllowDisjointSelection()
获取 DateChooser 控件中是否允许非连续选择。
|
boolean |
isAllowMultipleSelection()
获取 DateChooser 控件中是否允许多项选择。
|
boolean |
isShowToday()
获取 DateChooser 控件中是否突出显示今日的日期。
|
boolean |
isYearNavigationEnabled()
获取 年份导航是否已启用。
|
void |
scrollDate(FlexDateScrollDetail detail)
DateChooserEvent.SCROLL 常数定义了滚动事件的事件对象的类型属性值。
|
void |
type(String keyCode)
用户按键时发送。
|
void |
type(String keyCode,
ModifierKey keyModifier)
用户按键时发送。
|
changeFocus, changeFocus, changeFocus, getAutomationClassName, getAutomationIndex, getAutomationName, getClassName, getCurrentState, getErrorColor, getErrorString, getId, getNumAutomationChildren, getPercentHeight, getPercentWidth, getScaleX, getScaleY, getThemeColor, getToolTip, isEnabled, isFocusEnabled, isUseHandCursor, move, move, move, setFocus
click, click, click, click, doubleClick, doubleClick, doubleClick, doubleClick, getAlpha, getHeight, getStyle, getTabIndex, getWidth, getX, getY, isMouseEnabled, isTabChildren, isTabEnabled, isVisible, mouseMove, mouseMove, nativeToString, pressKeys, pressKeys, pressMouse, pressMouse, pressMouse, pressMouse, releaseKeys, releaseKeys, releaseMouse, releaseMouse, releaseMouse, releaseMouse, typeKeys, typeKeys, typeKeys, typePasswordKeys, typePasswordKeys, typePasswordKeys
captureBitmap, captureBitmap, exists, exists, generateLocator, getChildren, getDynamicMethodList, getParent, getPropertyList, getRect, getRect, getText, getValue, highlightObject, highlightObject, highlightObject, invokeMethods, textCapture, textCapture, textClick, textClick, textClick, textClick, textClick, textClick, textExists, textExists, textExists, textExists, textExists, textRectangle, textRectangle, textRectangle, textRectangle, textRectangle, waitForChildDisappearance, waitForChildDisappearance, waitForDisappearance, waitForDisappearance, waitForObject, waitForObject, waitForProperty, waitForProperty
equals, exists, find, find, findAll, findAll, getCustomTypeName, getDesktop, getHandle, getLocator, getProperty, getTypeName, hashCode, imageClick, imageClick, imageClick, imageClick, imageClick, imageClick, imageClickFile, imageClickFile, imageClickFile, imageClickFile, imageClickFile, imageClickFile, imageExists, imageExists, imageExists, imageExistsFile, imageExistsFile, imageExistsFile, imageRectangle, imageRectangle, imageRectangle, imageRectangleFile, imageRectangleFile, imageRectangleFile, invoke, preventFinalLocator, setProperty, toString
protected FlexDateChooser(JtfObjectHandle handle, Desktop desktop)
handle
- 可确定 FlexDateChooser 的句柄desktop
- 此对象所在的桌面public void change(Date newDate)
newDate
- 控件中选择的日期public void scrollDate(FlexDateScrollDetail detail)
detail
- 滚动方向public void type(String keyCode)
keyCode
- 按下或松开的键的键码值public void type(String keyCode, ModifierKey keyModifier)
keyCode
- 按下或松开的键的键码值keyModifier
- 可使用的键修饰符(例如 Ctrl 键)public boolean isAllowDisjointSelection()
如果为 true,则 DateChooser 控件中允许非连续选择。此属性仅在 allowMultipleSelection 属性为 true 时有效。此属性的设置操作会更改 DateChooser 控件的外观。
默认值为 true。
public boolean isAllowMultipleSelection()
如果为 true,则指定 DateChooser 控件中允许多项选择。
默认值为 false。
public Color getColor()
public Color getDisabledColor()
public List<String> getDisabledDays()
针对指定日期禁用月份中的所有日期。此属性可更改 DateChooser 控件的外观。此数组的元素值可为 0(星期日)至 6(星期六)。
public int getDisplayedMonth()
月份编号以零为基础,因此一月为 0,十二月为 11。此属性的设置操作会更改 DateChooser 控件的外观。
默认值为当前月份。
public int getDisplayedYear()
public List<Color> getFillColors()
自 3.0 版本开始不再使用:使用 nextMonthStyleFilters、prevMonthStyleFilters
为两个平看控件值分配相同颜色。默认值为 [ 0xFFFFFF, 0xCCCCCC ]。
public int getFirstDayOfWeek()
此值必须在 0 至 6 之间,其中 0 对应星期日,它是 dayNames 数组的第一个元素。
此属性的设置操作会更改日期列的顺序。将其设为 1 会使星期一成为控件中的第一列。
默认值为 0(星期日)。
public String getFontFamily()
不同于完整的 CSS 实施,逗号分隔的列表不受支持。您可以使用任何字体系列名称。如果您指定字体名,则系统会将其转换为相应的设备字体。默认值为 Verdana
。
public double getFontSize()
除 ColorPicker 控件外,对于所有其他控件,默认值为 10;对于 ColorPicker 控件,默认值为 11。
public String getFontStyle()
认可的值为常规
和斜体
。默认值为常规
。
public String getFontWeight()
认可的值为常规和粗体。Button 控件的默认值为粗体。所有其他控件的默认值为常规。
public List<Color> getHeaderColors()
自 3.0 版本开始不再使用:使用 dateChooserStyleName
public int getMaxYear()
public int getMinYear()
public Color getRollOverColor()
public Date getSelectedDate()
public Color getSelectionColor()
public boolean isShowToday()
如果为 true,则指定 DateChooser 控件中突出显示此今日。默认值为 true。
public String getTextAlign()
认可的值为常规和粗体。Button 控件的默认值为粗体。所有其他控件的默认值为常规。
public String getTextDecoration()
可能值为无
和下划线
。默认值为无
。
public int getTextIndent()
public Color getTodayColor()
public boolean isYearNavigationEnabled()
如果为 true,则向上和向下按钮显示在所显示年份的右侧。您可使用这些按钮更改当前年份。这些按钮显示在区域设置中年份(日期格式为年在月前)的左侧。
默认值为 false。
Copyright 2009-2012 Micro Focus. All Rights Reserved.