本文整理汇总了Java中net.sf.memoranda.date.CurrentDate类的典型用法代码示例。如果您正苦于以下问题:Java CurrentDate类的具体用法?Java CurrentDate怎么用?Java CurrentDate使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CurrentDate类属于net.sf.memoranda.date包,在下文中一共展示了CurrentDate类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: selectPanel
import net.sf.memoranda.date.CurrentDate; //导入依赖的package包/类
public void selectPanel(String pan) {
if (calendar.jnCalendar.renderer.getTask() != null) {
calendar.jnCalendar.renderer.setTask(null);
// calendar.jnCalendar.updateUI();
}
if (pan.equals("TASKS") && (tasksPanel.taskTable.getSelectedRow() > -1)) {
Task t =
CurrentProject.getTaskList().getTask(
tasksPanel
.taskTable
.getModel()
.getValueAt(tasksPanel.taskTable.getSelectedRow(), TaskTable.TASK_ID)
.toString());
calendar.jnCalendar.renderer.setTask(t);
// calendar.jnCalendar.updateUI();
}
boolean isAg = pan.equals("AGENDA");
agendaPanel.setActive(isAg);
if (isAg)
agendaPanel.refresh(CurrentDate.get());
cardLayout1.show(editorsPanel, pan);
cardLayout2.show(mainTabsPanel, pan + "TAB");
calendar.jnCalendar.updateUI();
CurrentPanel=pan;
}
示例2: TaskTable
import net.sf.memoranda.date.CurrentDate; //导入依赖的package包/类
public TaskTable() {
super();
initTable();
// Force the JTable and JTree to share their row selection models.
ListToTreeSelectionModelWrapper selectionWrapper = new ListToTreeSelectionModelWrapper();
tree.setSelectionModel(selectionWrapper);
setSelectionModel(selectionWrapper.getListSelectionModel());
CurrentDate.addDateListener(new DateListener() {
public void dateChange(CalendarDate d) {
//updateUI();
tableChanged();
}
});
CurrentProject.addProjectListener(new ProjectListener() {
public void projectChange(Project p, NoteList nl, TaskList tl,
ResourcesList rl, PSP psp) {
}
public void projectWasChanged() {
//initTable();
tableChanged();
}
});
}
示例3: selectPanel
import net.sf.memoranda.date.CurrentDate; //导入依赖的package包/类
public void selectPanel(String pan) {
if (calendar.jnCalendar.renderer.getTask() != null) {
calendar.jnCalendar.renderer.setTask(null);
// calendar.jnCalendar.updateUI();
}
if (pan.equals("TASKS") && (tasksPanel.taskTable.getSelectedRow() > -1)) {
Task t =
CurrentProject.getTaskList().getTask(
tasksPanel
.taskTable
.getModel()
.getValueAt(tasksPanel.taskTable.getSelectedRow(), TaskTable.TASK_ID)
.toString());
calendar.jnCalendar.renderer.setTask(t);
// calendar.jnCalendar.updateUI();
}
boolean isAg = pan.equals("AGENDA");
agendaPanel.setActive(isAg);
if (isAg)
agendaPanel.refresh(CurrentDate.get());
cardLayout1.show(editorsPanel, pan);
cardLayout2.show(mainTabsPanel, pan + "TAB");
calendar.jnCalendar.updateUI();
CurrentPanel=pan;
}
示例4: TaskTable
import net.sf.memoranda.date.CurrentDate; //导入依赖的package包/类
public TaskTable() {
super();
initTable();
// Force the JTable and JTree to share their row selection models.
ListToTreeSelectionModelWrapper selectionWrapper = new ListToTreeSelectionModelWrapper();
tree.setSelectionModel(selectionWrapper);
setSelectionModel(selectionWrapper.getListSelectionModel());
CurrentDate.addDateListener(new DateListener() {
public void dateChange(CalendarDate d) {
//updateUI();
tableChanged();
}
});
CurrentProject.addProjectListener(new ProjectListener() {
public void projectChange(Project p, NoteList nl, TaskList tl,
ResourcesList rl) {
}
public void projectWasChanged() {
//initTable();
tableChanged();
}
});
}
示例5: currentProjectChanged
import net.sf.memoranda.date.CurrentDate; //导入依赖的package包/类
void currentProjectChanged(Project newprj, NoteList nl, TaskList tl, ResourcesList rl) {
// Util.debug("currentProjectChanged");
Cursor cur = App.getFrame().getCursor();
App.getFrame().setCursor(waitCursor);
if (!changedByHistory)
History.add(new HistoryItem(CurrentDate.get(), newprj));
if (editorPanel.isDocumentChanged())
saveNote();
/*if ((currentNote != null) && !changedByHistory && !addedToHistory)
History.add(new HistoryItem(currentNote));*/
CurrentProject.save();
/*addedToHistory = false;
if (!changedByHistory) {
if (currentNote != null) {
History.add(new HistoryItem(currentNote));
addedToHistory = true;
}
}*/
updateIndicators(CurrentDate.get(), tl);
App.getFrame().setCursor(cur);
}
示例6: currentProjectChanged
import net.sf.memoranda.date.CurrentDate; //导入依赖的package包/类
/**
* If the current project is changed the display and its resources are updated.
* @param newprj
* @param nl
* @param tl
* @param rl
*/
void currentProjectChanged(Project newprj, NoteList nl, TaskList tl, ResourcesList rl) {
Cursor cur = App.getFrame().getCursor();
App.getFrame().setCursor(waitCursor);
if (!changedByHistory)
History.add(new HistoryItem(CurrentDate.get(), newprj));
if (editorPanel.isDocumentChanged())
saveNote();
/*if ((currentNote != null) && !changedByHistory && !addedToHistory)
History.add(new HistoryItem(currentNote));*/
CurrentProject.save();
/*addedToHistory = false;
if (!changedByHistory) {
if (currentNote != null) {
History.add(new HistoryItem(currentNote));
addedToHistory = true;
}
}*/
updateIndicators(CurrentDate.get(), tl);
App.getFrame().setCursor(cur);
}
示例7: currentProjectChanged
import net.sf.memoranda.date.CurrentDate; //导入依赖的package包/类
void currentProjectChanged(Project newprj, NoteList nl, TaskList tl, ResourcesList rl) {
// Util.debug("currentProjectChanged");
Cursor cur = App.getFrame().getCursor();
App.getFrame().setCursor(waitCursor);
if (!changedByHistory)
History.add(new HistoryItem(CurrentDate.get(), newprj));
if (editorPanel.isDocumentChanged())
saveNote();
/*if ((currentNote != null) && !changedByHistory && !addedToHistory)
History.add(new HistoryItem(currentNote));*/
notesControlPane.refresh();
eventsControlPane.refresh();
CurrentProject.save();
/*addedToHistory = false;
if (!changedByHistory) {
if (currentNote != null) {
History.add(new HistoryItem(currentNote));
addedToHistory = true;
}
}*/
updateIndicators(CurrentDate.get(), tl);
App.getFrame().setCursor(cur);
}
示例8: getStatusIcon
import net.sf.memoranda.date.CurrentDate; //导入依赖的package包/类
public static ImageIcon getStatusIcon(Task t) {
switch (t.getStatus(CurrentDate.get())) {
case Task.ACTIVE:
return TASK_ACTIVE_ICON;
case Task.SCHEDULED:
return TASK_SCHEDULED_ICON;
case Task.DEADLINE:
return TASK_DEADLINE_ICON;
case Task.OVERDUE:
return TASK_FAILED_ICON;
case Task.COMPLETED:
return TASK_COMPLETED_ICON;
}
System.err.println("Problem finding status icon");
return null;
}
示例9: NotesList
import net.sf.memoranda.date.CurrentDate; //导入依赖的package包/类
public NotesList(int type) {
super();
if(Configuration.get("NOTES_SORT_ORDER").toString().equalsIgnoreCase("true")) {
sortOrderDesc = true;
}
_type = type;
this.setFont(new java.awt.Font("Dialog", 0, 11));
this.setModel(new NotesListModel());
CurrentDate.addDateListener(new DateListener() {
public void dateChange(CalendarDate d) {
updateUI();
}
});
CurrentNote.addNoteListener(new NoteListener() {
public void noteChange(Note n, boolean toSaveCurrentNote) {
updateUI();
}
});
CurrentProject.addProjectListener(new ProjectListener() {
public void projectChange(Project p, NoteList nl, TaskList tl, ResourcesList rl) {
}
public void projectWasChanged() {
update();
}
});
this.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
}
示例10: getValueAt
import net.sf.memoranda.date.CurrentDate; //导入依赖的package包/类
/**
* @see net.sf.memoranda.ui.treetable.TreeTableModel#getValueAt(java.lang.Object,
* int)
*/
public Object getValueAt(Object node, int column) {
if (node instanceof Project)
return null;
Task t = (Task) node;
switch (column) {
case 0:
return "";
case 1:
return t;
case 2:
return t.getStartDate().getDate();
case 3:
if (t.getEndDate() == null)
return null;
else
return t.getEndDate().getDate();
case 4:
return getPriorityString(t.getPriority());
case 5:
return getStatusString(t.getStatus(CurrentDate.get()));
case 6:
//return new Integer(t.getProgress());
return t;
case 7:
return t.getTimeSpent();
case TaskTable.TASK_ID:
return t.getID();
case TaskTable.TASK:
return t;
}
return "";
}
示例11: getChild
import net.sf.memoranda.date.CurrentDate; //导入依赖的package包/类
/**
* @see javax.swing.tree.TreeModel#getChild(java.lang.Object, int)
*/
public Object getChild(Object parent, int index) {
if (parent instanceof Project)
if( activeOnly() ) return CurrentProject.getTaskList().getActiveSubTasks(null, CurrentDate.get()).toArray()[index];
else return CurrentProject.getTaskList().getTopLevelTasks().toArray()[index];
Task t = (Task) parent;
if(activeOnly()) return CurrentProject.getTaskList().getActiveSubTasks(t.getID(), CurrentDate.get()).toArray()[index];
else return t.getSubTasks().toArray()[index];
}
示例12: currentDateChanged
import net.sf.memoranda.date.CurrentDate; //导入依赖的package包/类
void currentDateChanged(CalendarDate newdate) {
Cursor cur = App.getFrame().getCursor();
App.getFrame().setCursor(waitCursor);
if (!changedByHistory) {
History.add(new HistoryItem(newdate, CurrentProject.get()));
}
if (!dateChangedByCalendar) {
calendarIgnoreChange = true;
calendar.set(newdate);
calendarIgnoreChange = false;
}
/*if ((currentNote != null) && !changedByHistory && !addedToHistory)
History.add(new HistoryItem(currentNote));*/
currentNoteChanged(currentNote,true);
currentNote = CurrentProject.getNoteList().getNoteForDate(newdate);
CurrentNote.set(currentNote,true);
currentDate = CurrentDate.get();
/*addedToHistory = false;
if (!changedByHistory) {
if (currentNote != null) {
History.add(new HistoryItem(currentNote));
addedToHistory = true;
}
}*/
currentDateLabel.setText(newdate.getFullDateString());
if ((currentNote != null) && (currentNote.isMarked())) {
currentDateLabel.setIcon(bookmarkIcon);
currentDateLabel.setHorizontalTextPosition(SwingConstants.LEFT);
}
else {
currentDateLabel.setIcon(null);
}
updateIndicators(newdate, CurrentProject.getTaskList());
App.getFrame().setCursor(cur);
}
示例13: currentNoteChanged
import net.sf.memoranda.date.CurrentDate; //导入依赖的package包/类
void currentNoteChanged(Note note, boolean toSaveCurrentNote) {
// Util.debug("currentNoteChanged");
if (editorPanel.isDocumentChanged()) {
if (toSaveCurrentNote) {
saveNote();
}
notesControlPane.refresh();
}
currentNote = note;
editorPanel.setDocument(currentNote);
calendar.set(CurrentDate.get());
editorPanel.editor.requestFocus();
}
示例14: getChildCount
import net.sf.memoranda.date.CurrentDate; //导入依赖的package包/类
/**
* @see javax.swing.tree.TreeModel#getChildCount(java.lang.Object)
*/
public int getChildCount(Object parent) {
if (parent instanceof Project) {
if( activeOnly() ){
return CurrentProject.getTaskList().getActiveSubTasks(null, CurrentDate.get()).size();
}
else return CurrentProject.getTaskList().getTopLevelTasks().size();
}
Task t = (Task) parent;
if(activeOnly()) return CurrentProject.getTaskList().getActiveSubTasks(t.getID(), CurrentDate.get()).size();
else return t.getSubTasks().size();
}
示例15: currentDateChanged
import net.sf.memoranda.date.CurrentDate; //导入依赖的package包/类
void currentDateChanged(CalendarDate newdate) {
Cursor cur = App.getFrame().getCursor();
App.getFrame().setCursor(waitCursor);
if (!changedByHistory) {
History.add(new HistoryItem(newdate, CurrentProject.get()));
}
if (!dateChangedByCalendar) {
calendarIgnoreChange = true;
calendar.set(newdate);
calendarIgnoreChange = false;
}
/*if ((currentNote != null) && !changedByHistory && !addedToHistory)
History.add(new HistoryItem(currentNote));*/
currentNoteChanged(currentNote,true);
currentNote = CurrentProject.getNoteList().getNoteForDate(newdate);
CurrentNote.set(currentNote,true);
currentDate = CurrentDate.get();
/*addedToHistory = false;
if (!changedByHistory) {
if (currentNote != null) {
History.add(new HistoryItem(currentNote));
addedToHistory = true;
}
}*/
currentDateLabel.setText(newdate.getFullDateString());
updateFullDateFormat();//Test
if ((currentNote != null) && (currentNote.isMarked())) {
currentDateLabel.setIcon(bookmarkIcon);
currentDateLabel.setHorizontalTextPosition(SwingConstants.LEFT);
}
else {
currentDateLabel.setIcon(null);
}
updateIndicators(newdate, CurrentProject.getTaskList());
App.getFrame().setCursor(cur);
}