本文整理汇总了Java中ch.rgw.tools.TimeTool.chop方法的典型用法代码示例。如果您正苦于以下问题:Java TimeTool.chop方法的具体用法?Java TimeTool.chop怎么用?Java TimeTool.chop使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ch.rgw.tools.TimeTool
的用法示例。
在下文中一共展示了TimeTool.chop方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: DayDateCombo
import ch.rgw.tools.TimeTool; //导入方法依赖的package包/类
/**
* @param parent
* @param text1
* the text to display in front of the spinner
* @param text2
* the text to display between spinner and DatePicker
* @param text1Neg
* the text to display in front of the spinner if date is before today
* @param text2Neg
* the text to display between spinner and DatePicker if date is before today
* @since 3.1
*/
public DayDateCombo(Composite parent, String text1, String text2, String text1Neg,
String text2Neg){
super(parent, SWT.NONE);
this.text1 = text1;
this.text2 = text2;
this.text1Neg = text1Neg;
this.text2Neg = text2Neg;
ttNow = new TimeTool();
ttNow.chop(3);
setLayout(new RowLayout(SWT.HORIZONTAL));
frontLabel = UiDesk.getToolkit().createLabel(this, text1);
spl = new SpinnerListener();
dl = new DateListener();
spinner = new Spinner(this, SWT.NONE);
middleLabel = UiDesk.getToolkit().createLabel(this, text2);
dp = new DatePickerCombo(this, SWT.NONE);
setListeners();
}
示例2: getDisplayedDays
import ch.rgw.tools.TimeTool; //导入方法依赖的package包/类
public String[] getDisplayedDays(){
TimeTool ttMonday = Activator.getDefault().getActDate();
ttMonday.set(TimeTool.DAY_OF_WEEK, TimeTool.MONDAY);
ttMonday.chop(3);
String resources =
CoreHub.localCfg.get(PreferenceConstants.AG_DAYSTOSHOW,
StringTool.join(TimeTool.Wochentage, ",")); //$NON-NLS-1$
if (resources == null) {
return new String[0];
} else {
ArrayList<String> ret = new ArrayList<String>(resources.length());
for (TimeTool.DAYS wd : TimeTool.DAYS.values()) {
if (resources.indexOf(wd.fullName) != -1) {
ret.add(ttMonday.toString(TimeTool.DATE_COMPACT));
}
ttMonday.addDays(1);
}
return ret.toArray(new String[0]);
}
}
示例3: doSelectByDate
import ch.rgw.tools.TimeTool; //导入方法依赖的package包/类
/**
* Auwahl der Konsultationen, die verrechnet werden sollen, nach Datum. Es erscheint ein Dialog,
* wo man den gewünschten Bereich wählen kann.
*/
@SuppressWarnings("unchecked")
private void doSelectByDate(final IProgressMonitor monitor, final TimeTool fromDate,
final TimeTool toDate){
TimeTool actDate = new TimeTool();
// set dates to midnight
TimeTool date1 = new TimeTool(fromDate);
TimeTool date2 = new TimeTool(toDate);
date1.chop(3);
date2.add(TimeTool.DAY_OF_MONTH, 1);
date2.chop(3);
List<Tree> lAll = (List<Tree>) tAll.getChildren();
monitor.beginTask(Messages.KonsZumVerrechnenView_selectByDateTask, lAll.size() + 1); //$NON-NLS-1$
for (Tree tP : lAll) {
monitor.worked(1);
for (Tree tF : (List<Tree>) tP.getChildren()) {
List<Tree> tK = (List<Tree>) tF.getChildren();
for (Tree tk : tK) {
Konsultation k = (Konsultation) tk.contents;
actDate.set(k.getDatum());
if (actDate.isAfterOrEqual(date1) && actDate.isBefore(date2)) {
selectBehandlung((Konsultation) tk.contents, tAll, tSelection);
}
}
if (monitor.isCanceled()) {
monitor.done();
return;
}
}
}
monitor.done();
}
示例4: getDateDue
import ch.rgw.tools.TimeTool; //导入方法依赖的package包/类
/**
* Returns the date this reminder is due
*
* @return <code>null</code> or the respective date
*/
public @Nullable TimeTool getDateDue(){
String string = get(FLD_DUE);
if (string == null || StringConstants.EMPTY == string) {
return null;
}
TimeTool ret = new TimeTool(get(FLD_DUE));
ret.chop(3);
return ret;
}