当前位置: 首页>>代码示例>>Java>>正文


Java CalendarDate.today方法代码示例

本文整理汇总了Java中net.sf.memoranda.date.CalendarDate.today方法的典型用法代码示例。如果您正苦于以下问题:Java CalendarDate.today方法的具体用法?Java CalendarDate.today怎么用?Java CalendarDate.today使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.sf.memoranda.date.CalendarDate的用法示例。


在下文中一共展示了CalendarDate.today方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createEvent

import net.sf.memoranda.date.CalendarDate; //导入方法依赖的package包/类
public DTDEvent createEvent(CalendarDate date, int hour, int minute, String message, boolean reminder, String emailAddress)  {
	DTDEvent event = new DTDEvent(date, hour, minute, message, reminder, emailAddress);
	Element year = getYear(date);
	if (year == null) {
		year = createYear(date);
		_root.appendChild(year);
	}
	Element month = getMonth(date, year);
	if (month == null) {
		month = createMonth(date);
		year.appendChild(month);
	}
	Element day = getDay(date, month);
	if (day == null) {
		day = createDay(date);
		month.appendChild(day);
	}
	Element evnt = createEvent(event);
	day.appendChild(evnt);
	System.out.println(event.toString());
	if (date == CalendarDate.today()) {
		updateScheduledEvents();
	}
	return event;
}
 
开发者ID:ser316asu,项目名称:SER316-Aachen,代码行数:26,代码来源:DTDEventManager.java

示例2: todayB_actionPerformed

import net.sf.memoranda.date.CalendarDate; //导入方法依赖的package包/类
void todayB_actionPerformed(ActionEvent e) {
  _date = CalendarDate.today();
  refreshView();
  notifyListeners();
}
 
开发者ID:ser316asu,项目名称:Neukoelln_SER316,代码行数:6,代码来源:JNCalendarPanel.java

示例3: removeEvent

import net.sf.memoranda.date.CalendarDate; //导入方法依赖的package包/类
public boolean removeEvent(CalendarDate date, int hour, int minute, String message) {
	boolean success = false;
	System.out.println("attempting to remove event: " + "hour: " + hour + " minute: " + minute);
	Element year;
	Element month;
	Element day;
	year = getYear(date);
	if (year == null) {
		return false;
	}
	month = getMonth(date, year);
	if(month == null) {
		return false;
	}
	day = getDay(date, month);
	if (day == null) {
		return false;
	}
	Elements tmps = day.getChildElements();
	System.out.println("events: " + tmps.size());
	boolean delete[] = new boolean[tmps.size()];
	try {
		for (int i = 0; i < tmps.size(); i ++) {
			System.out.println(tmps.get(i).getAttributeValue("hour") + " : " + tmps.get(i).getAttributeValue("minute"));
			System.out.println(tmps.get(i).getAttributeValue("message"));
			if (hour == Integer.parseInt(tmps.get(i).getAttributeValue("hour")) && minute == Integer.parseInt(tmps.get(i).getAttributeValue("minute"))) {
				delete[i] = true;
				success = true;
			}
			else {
				delete[i] = false;
			}
		}
	} catch (Exception e) {
		e.printStackTrace();
	}
	/*
	 * Remove in reverse order
	 */
	for (int i = delete.length-1; i >= 0 ; i--) {
		System.out.println(delete[i]);
		if (delete[i]) {
			day.removeChild(i);
		}
	}
	if (success) {
		updateDateEvents(date);
		if (CalendarDate.today() == date) {
			updateScheduledEvents();
		}
	}
	return success;
}
 
开发者ID:ser316asu,项目名称:SER316-Aachen,代码行数:54,代码来源:DTDEventManager.java


注:本文中的net.sf.memoranda.date.CalendarDate.today方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。