org.eclipse.swt.widgets.DateTime.setDay()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(203)

本文整理了Java中org.eclipse.swt.widgets.DateTime.setDay()方法的一些代码示例,展示了DateTime.setDay()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DateTime.setDay()方法的具体详情如下:
包路径:org.eclipse.swt.widgets.DateTime
类名称:DateTime
方法名:setDay

DateTime.setDay介绍

[英]Sets the receiver's date, or day of the month, to the specified day.

The first day of the month is 1, and the last day depends on the month and year. If the specified day is not valid for the receiver's month and year, then it is ignored.
[中]

代码示例

代码示例来源: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

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

setYear( 9996 );
setMonth( 0 );
setDay( 1 );
setDay( day );
ignoreLimits = false;
applyLimits();

代码示例来源:origin: org.xworker/xworker_swt

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){
  Thing dataControl = (Thing) control;

代码示例来源: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

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

argument.pattern = Long.toString(calendar.getTimeInMillis());
argumentsDate.setDay(calendar.get(Calendar.DAY_OF_MONTH));
argumentsDate.setMonth(calendar.get(Calendar.MONTH));
argumentsDate.setYear(calendar.get(Calendar.YEAR));

相关文章

DateTime类方法