本文整理汇总了Java中net.sf.memoranda.Task.ACTIVE属性的典型用法代码示例。如果您正苦于以下问题:Java Task.ACTIVE属性的具体用法?Java Task.ACTIVE怎么用?Java Task.ACTIVE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类net.sf.memoranda.Task
的用法示例。
在下文中一共展示了Task.ACTIVE属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getStatusIcon
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.FAILED:
return TASK_FAILED_ICON;
case Task.COMPLETED:
return TASK_COMPLETED_ICON;
}
System.err.println("Problem finding status icon");
return null;
}
示例2: getStatusIcon
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;
}
示例3: applyFont
private void applyFont(Task t, JComponent c) {
if ((t.getStatus(CurrentDate.get()) == Task.ACTIVE)
|| (t.getStatus(CurrentDate.get()) == Task.DEADLINE))
c.setFont(c.getFont().deriveFont(Font.BOLD));
else
c.setFont(c.getFont().deriveFont(Font.PLAIN));
}
示例4: getColorForTaskStatus
/**
* Color representing task status, "light" color is useful for backgrounds
* and other for text
*/
public static Color getColorForTaskStatus(Task t, boolean light) {
if (light) {
switch (t.getStatus(CurrentDate.get())) {
case Task.ACTIVE:
return new Color(192, 255, 192);
case Task.SCHEDULED:
return new Color(192, 230, 255);
case Task.DEADLINE:
return new Color(255, 240, 160);
case Task.FAILED:
return new Color(255, 192, 192);
case Task.COMPLETED:
return new Color(230, 255, 230);
}
} else {
switch (t.getStatus(CurrentDate.get())) {
case Task.ACTIVE:
return new Color(0, 180, 0);
case Task.SCHEDULED:
return new Color(0, 120, 255);
case Task.DEADLINE:
return new Color(160, 90, 0);
case Task.FAILED:
return new Color(255, 0, 0);
case Task.COMPLETED:
return new Color(0, 120, 0);
}
}
System.err.println("Problem finding color for task status");
return null;
}
示例5: getColorForTaskStatus
/**
* Color representing task status, "light" color is useful for backgrounds
* and other for text
*/
public static Color getColorForTaskStatus(Task t, boolean light) {
if (light) {
switch (t.getStatus(CurrentDate.get())) {
case Task.ACTIVE:
return new Color(192, 255, 192);
case Task.SCHEDULED:
return new Color(192, 230, 255);
case Task.DEADLINE:
return new Color(255, 240, 160);
case Task.OVERDUE:
return new Color(255, 192, 192);
case Task.COMPLETED:
return new Color(230, 255, 230);
}
} else {
switch (t.getStatus(CurrentDate.get())) {
case Task.ACTIVE:
return new Color(0, 180, 0);
case Task.SCHEDULED:
return new Color(0, 120, 255);
case Task.DEADLINE:
return new Color(160, 90, 0);
case Task.OVERDUE:
return new Color(255, 0, 0);
case Task.COMPLETED:
return new Color(0, 120, 0);
}
}
System.err.println("Problem finding color for task status");
return null;
}