本文整理汇总了Java中ch.rgw.tools.TimeTool.minutesStringToInt方法的典型用法代码示例。如果您正苦于以下问题:Java TimeTool.minutesStringToInt方法的具体用法?Java TimeTool.minutesStringToInt怎么用?Java TimeTool.minutesStringToInt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ch.rgw.tools.TimeTool
的用法示例。
在下文中一共展示了TimeTool.minutesStringToInt方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: okPressed
import ch.rgw.tools.TimeTool; //导入方法依赖的package包/类
@Override
protected void okPressed(){
for (Termin t : lRes) {
t.delete();
}
String[] sl = text.getText().split("\\s*[\\n*\\r*,]\\n?\\r?\\s*");
for (String s : sl) {
String[] lim = s.split("-");
int start = TimeTool.minutesStringToInt(lim[0]);
int end = TimeTool.minutesStringToInt(lim[1]);
new Termin(beiwem, day, start, end, Termin.typReserviert(), Termin.statusLeer());
}
super.okPressed();
}
示例2: getTimeAsMinutes
import ch.rgw.tools.TimeTool; //导入方法依赖的package包/类
public int getTimeAsMinutes(){
return TimeTool.minutesStringToInt(text.getText());
}
示例3: checkAppointmentCollision
import ch.rgw.tools.TimeTool; //导入方法依赖的package包/类
/**
* check whether any appointments collide with the lock time changes
*
* @param appointments
* @param monitor
* @return list of days to skip when deleting the old boundaries
*/
private List<String> checkAppointmentCollision(List<Termin> appointments,
IProgressMonitor monitor){
List<String> skipUpdate = new ArrayList<String>();
String[] closedTimes = _newValues.split(StringConstants.LF);
TimeTool day = new TimeTool();
for (Termin t : appointments) {
if (t.getId().equals(StringConstants.ONE))
continue;
if (t.getDay() == null || t.getDay().length() < 3)
continue;
day.set(t.getDay());
if (_startDate.isBeforeOrEqual(day)) {
if (day.get(Calendar.DAY_OF_WEEK) == _applyForDay.numericDayValue) {
// ignore locktimes
if (!t.getType().equals(Termin.typReserviert())) {
for (String s : closedTimes) {
int von = TimeTool.minutesStringToInt(s.split("-")[0]); //$NON-NLS-1$
int bis = TimeTool.minutesStringToInt(s.split("-")[1]); //$NON-NLS-1$
//check for collision
if (t.crossesTimeFrame(von, bis - von)) {
boolean keepOldLocktimes =
MessageDialog.openQuestion(PlatformUI.getWorkbench()
.getActiveWorkbenchWindow().getShell(),
Messages.TermineLockedTimesUpdater_4,
Messages.TermineLockedTimesUpdater_5 + t.getLabel()
+ Messages.TermineLockedTimesUpdater_6 + s + ". "
+ Messages.TermineLockedTimesUpdater_7);
//update anyway -> add appointment to delete list
if (keepOldLocktimes)
skipUpdate.add(t.getDay());
}
}
}
}
}
monitor.worked(1);
}
return skipUpdate;
}