本文整理了Java中org.eclipse.swt.widgets.DateTime.setMonth()
方法的一些代码示例,展示了DateTime.setMonth()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DateTime.setMonth()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.DateTime
类名称:DateTime
方法名:setMonth
[英]Sets the receiver's month.
The first month of the year is 0, and the last month is 11. If the specified month is not valid for the receiver's day and year, then it is ignored.
[中]设置接收者的月份。
一年的第一个月是0,最后一个月是11。如果指定的月份对于接收方的日期和年份无效,则忽略该月份。
代码示例来源:origin: org.eclipse.mylyn.commons/workbench
/**
* @since 3.3
*/
public void setDate(Calendar date, boolean notifyListeners) {
this.date = date;
calendar.setYear(date.get(Calendar.YEAR));
calendar.setMonth(date.get(Calendar.MONTH));
calendar.setDay(date.get(Calendar.DAY_OF_MONTH));
if (notifyListeners) {
setSelection(new DateSelection(date, false));
notifyListeners(new SelectionChangedEvent(DatePickerPanel.this, getSelection()));
}
}
代码示例来源:origin: org.xworker/xworker_swt
c.setTime(dv);
d.setYear(c.get(Calendar.YEAR));
d.setMonth(c.get(Calendar.MONTH));
d.setDay(c.get(Calendar.DAY_OF_MONTH));
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
setMonth( 0 );
setDay( 1 );
setMonth( month );
setDay( day );
ignoreLimits = false;
代码示例来源:origin: org.xworker/xworker_swt
c.setTime(dateValue);
dt.setYear(c.get(Calendar.YEAR));
dt.setMonth(c.get(Calendar.MONTH));
dt.setDay(c.get(Calendar.DAY_OF_MONTH));
}else if(control instanceof Thing){
代码示例来源:origin: atdl4j/atdl4j
public void setValue(Comparable<DateTime> value)
{
// Convert to UTC time for UTCTimestampT and UTCTimeOnlyT.
// Performing UTCDateT and MonthYearT coversion could produce an unexpected result.
// No conversion is needed for LocalMktTimeT, TZTimestampT, and TZTimeOnlyT.
if ( parameter == null || parameter instanceof UTCTimestampT || parameter instanceof UTCTimeOnlyT )
{
logger.debug( "setValue() parameter: " + parameter + " value: " + value );
// -- no need to adjust DateTime --
}
// -- Force control to display time portion in local
DateTime tempLocalTzDateTime = ((DateTime)value).withZone( DateTimeZone.getDefault() );
if ( showMonthYear )
{
dateClock.setMonth( tempLocalTzDateTime.getMonthOfYear() - 1 );
dateClock.setYear( tempLocalTzDateTime.getYear() );
}
if ( showDay )
{
dateClock.setDay( tempLocalTzDateTime.getDayOfMonth() );
}
if ( showTime )
{
timeClock.setHours( tempLocalTzDateTime.getHourOfDay() );
timeClock.setMinutes( tempLocalTzDateTime.getMinuteOfHour() );
timeClock.setSeconds( tempLocalTzDateTime.getSecondOfMinute() );
}
}
代码示例来源:origin: org.xworker/xworker_swt
c.setTime(dateValue);
dt.setYear(c.get(Calendar.YEAR));
dt.setMonth(c.get(Calendar.MONTH));
dt.setDay(c.get(Calendar.DAY_OF_MONTH));
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.ide
argumentsDate.setMonth(calendar.get(Calendar.MONTH));
argumentsDate.setYear(calendar.get(Calendar.YEAR));
内容来源于网络,如有侵权,请联系作者删除!