本文整理汇总了Java中net.sf.memoranda.EventsManager.isNREventsForDate方法的典型用法代码示例。如果您正苦于以下问题:Java EventsManager.isNREventsForDate方法的具体用法?Java EventsManager.isNREventsForDate怎么用?Java EventsManager.isNREventsForDate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sf.memoranda.EventsManager
的用法示例。
在下文中一共展示了EventsManager.isNREventsForDate方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getTableCellRendererComponent
import net.sf.memoranda.EventsManager; //导入方法依赖的package包/类
public Component getTableCellRendererComponent(
JTable table,
Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column) {
JLabel label = (JLabel) super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
String currentPanel = ((AppFrame)App.getFrame()).workPanel.dailyItemsPanel.getCurrentPanel();
if (d == null) {
label.setEnabled(false);
label.setIcon(null);
label.setBackground(new Color(212, 246, 246));
return label;
}
if (!isSelected) {
CalendarDate cpsd = CurrentProject.get().getStartDate();
CalendarDate cped = CurrentProject.get().getEndDate();
if (!(((d.after(cpsd)) && (d.before(cped))) || (d.equals(cpsd)) || (d.equals(cped)))) {
label.setBackground(new Color(212, 246, 246));
return label;
}
}
label.setHorizontalTextPosition(2);
label.setEnabled(true);
if (d.equals(CalendarDate.today())) {
label.setBorder(BorderFactory.createLineBorder(new Color(100, 100, 128)));
}
// set foreground color
if (d.getCalendar().get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY) {
label.setForeground(new Color(255, 0, 0));
}
else {
label.setForeground(Color.BLACK);
}
// set background color
if (currentPanel == null)
label.setBackground(Color.WHITE);
else if (currentPanel.equals("TASKS") && (t != null) &&
(d.inPeriod(t.getStartDate(), t.getEndDate())))
label.setBackground(new Color(212, 246, 246));
else if(currentPanel.equals("NOTES") &&
CurrentProject.getNoteList().getNoteForDate(d) != null)
label.setBackground(new Color(212, 246, 246));
else if(currentPanel.equals("EVENTS") &&
(!(EventsManager.getEventsForDate(d).isEmpty())))
label.setBackground(new Color(212, 246, 246));
else if(!isSelected)
label.setBackground(Color.WHITE);
// always display NREvents
if (EventsManager.isNREventsForDate(d))
label.setIcon(evIcon);
else
label.setIcon(null);
return label;
}
示例2: getTableCellRendererComponent
import net.sf.memoranda.EventsManager; //导入方法依赖的package包/类
public Component getTableCellRendererComponent(
JTable table,
Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column) {
JLabel label = (JLabel) super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
String currentPanel = ((AppFrame)App.getFrame()).workPanel.dailyItemsPanel.getCurrentPanel();
if (d == null) {
label.setEnabled(false);
label.setIcon(null);
label.setBackground(new Color(0xE0,0xE0,0xE0));
return label;
}
if (!isSelected) {
CalendarDate cpsd = CurrentProject.get().getStartDate();
CalendarDate cped = CurrentProject.get().getEndDate();
if (!(((d.after(cpsd)) && (d.before(cped))) || (d.equals(cpsd)) || (d.equals(cped)))) {
label.setBackground(new Color(0xF0,0xF0,0xF0));
return label;
}
}
label.setHorizontalTextPosition(2);
label.setEnabled(true);
if (d.equals(CalendarDate.today())) {
label.setBorder(BorderFactory.createLineBorder(new Color(100, 100, 128)));
}
// set foreground color
if (d.getCalendar().get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY) {
label.setForeground(new Color(255, 0, 0));
}
else {
label.setForeground(Color.BLACK);
}
// set background color
if (currentPanel == null)
label.setBackground(Color.WHITE);
else if (currentPanel.equals("TASKS") && (t != null) &&
(d.inPeriod(t.getStartDate(), t.getEndDate())))
label.setBackground( new Color(230, 255, 230));
else if(currentPanel.equals("NOTES") &&
CurrentProject.getNoteList().getNoteForDate(d) != null)
label.setBackground(new Color(255,245,200));
else if(currentPanel.equals("EVENTS") &&
(!(EventsManager.getEventsForDate(d).isEmpty())))
label.setBackground(new Color(255,230,230));
else if(!isSelected)
label.setBackground(Color.WHITE);
// always display NREvents
if (EventsManager.isNREventsForDate(d))
label.setIcon(evIcon);
else
label.setIcon(null);
return label;
}
示例3: getTableCellRendererComponent
import net.sf.memoranda.EventsManager; //导入方法依赖的package包/类
public Component getTableCellRendererComponent(
JTable table,
Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column) {
JLabel label = (JLabel) super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
String currentPanel = ((AppFrame)App.getFrame()).workPanel.dailyItemsPanel.getCurrentPanel();
if (d == null) {
label.setEnabled(false);
label.setIcon(null);
PreferencesDialog.setJComponentBGandFG(label);
return label;
}
if (!isSelected) {
CalendarDate cpsd = CurrentProject.get().getStartDate();
CalendarDate cped = CurrentProject.get().getEndDate();
if (!(((d.after(cpsd)) && (d.before(cped))) || (d.equals(cpsd)) || (d.equals(cped)))) {
PreferencesDialog.setJComponentBGandFG(label);
return label;
}
}
label.setHorizontalTextPosition(2);
label.setEnabled(true);
if (d.equals(CalendarDate.today())) {
label.setBorder(BorderFactory.createLineBorder(new Color(100, 100, 128)));
}
// set foreground color
if (d.getCalendar().get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY) {
label.setForeground(new Color(255, 0, 0));
}
else {
label.setForeground(Color.BLACK);
}
// set background color
if (currentPanel == null)
PreferencesDialog.setJComponentBGandFG(label);
else if (currentPanel.equals("TASKS") && (t != null) &&
(d.inPeriod(t.getStartDate(), t.getEndDate())))
label.setBackground( new Color(230, 255, 230));
else if(currentPanel.equals("NOTES") &&
CurrentProject.getNoteList().getNoteForDate(d) != null)
label.setBackground(new Color(255,245,200));
else if(currentPanel.equals("EVENTS") &&
(!(EventsManager.getEventsForDate(d).isEmpty())))
label.setBackground(new Color(255,230,230));
else if(!isSelected)
PreferencesDialog.setJComponentBGandFG(label);
// always display NREvents
if (EventsManager.isNREventsForDate(d))
label.setIcon(evIcon);
else
label.setIcon(null);
return label;
}
示例4: getTableCellRendererComponent
import net.sf.memoranda.EventsManager; //导入方法依赖的package包/类
public Component getTableCellRendererComponent(
JTable table,
Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column) {
JLabel label = (JLabel) super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
String currentPanel = ((AppFrame)App.getFrame()).workPanel.dailyItemsPanel.getCurrentPanel();
if (d == null) {
label.setEnabled(false);
label.setIcon(null);
label.setBackground(ColorPanels.highlightColor1);
return label;
}
if (!isSelected) {
CalendarDate cpsd = CurrentProject.get().getStartDate();
CalendarDate cped = CurrentProject.get().getEndDate();
if (!(((d.after(cpsd)) && (d.before(cped))) || (d.equals(cpsd)) || (d.equals(cped)))) {
label.setBackground(ColorPanels.highlightColor1);
return label;
}
}
label.setHorizontalTextPosition(2);
label.setEnabled(true);
if (d.equals(CalendarDate.today())) {
label.setBorder(BorderFactory.createLineBorder(new Color(100, 100, 128)));
}
// set foreground color
if (d.getCalendar().get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY) {
label.setForeground(new Color(255, 0, 0));
}
else {
label.setForeground(Color.BLACK);
}
// set background color
if (currentPanel == null)
label.setBackground(ColorPanels.highlightColor1);
else if (currentPanel.equals("TASKS") && (t != null) &&
(d.inPeriod(t.getStartDate(), t.getEndDate())))
label.setBackground( new Color(230, 255, 230));
else if(currentPanel.equals("NOTES") &&
CurrentProject.getNoteList().getNoteForDate(d) != null)
label.setBackground(new Color(255,245,200));
else if(currentPanel.equals("EVENTS") &&
(!(EventsManager.getEventsForDate(d).isEmpty())))
label.setBackground(new Color(255,230,230));
else if(!isSelected)
label.setBackground(ColorPanels.highlightColor1);
// always display NREvents
if (EventsManager.isNREventsForDate(d))
label.setIcon(evIcon);
else
label.setIcon(null);
return label;
}
示例5: getTableCellRendererComponent
import net.sf.memoranda.EventsManager; //导入方法依赖的package包/类
public Component getTableCellRendererComponent(
JTable table,
Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column) {
JLabel label = (JLabel) super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
String currentPanel = App.getFrame().workPanel.dailyItemsPanel.getCurrentPanel();
if (d == null) {
label.setEnabled(false);
label.setIcon(null);
label.setBackground(new Color(0xE0, 0xE0, 0xE0));
return label;
}
if (!isSelected) {
CalendarDate cpsd = CurrentProject.get().getStartDate();
CalendarDate cped = CurrentProject.get().getEndDate();
if (!(((d.after(cpsd)) && (d.before(cped))) || (d.equals(cpsd)) || (d.equals(cped)))) {
label.setBackground(new Color(0xF0, 0xF0, 0xF0));
return label;
}
}
label.setHorizontalTextPosition(2);
label.setEnabled(true);
if (d.equals(CalendarDate.today())) {
label.setBorder(BorderFactory.createLineBorder(new Color(100, 100, 128)));
}
// set foreground color
label.setForeground(Color.BLACK);
// set background color
if (currentPanel == null)
label.setBackground(Color.WHITE);
else if (currentPanel.equals("TASKS") && (t != null) &&
(d.inPeriod(t.getStartDate(), t.getEndDate())))
label.setBackground(new Color(230, 255, 230));
else if (currentPanel.equals("NOTES") &&
CurrentProject.getNoteList().getNoteForDate(d) != null)
label.setBackground(new Color(255, 245, 200));
else if (currentPanel.equals("EVENTS") &&
(!(EventsManager.getEventsForDate(d).isEmpty())))
label.setBackground(new Color(255, 230, 230));
else if (!isSelected)
label.setBackground(Color.WHITE);
// always display NREvents
if (EventsManager.isNREventsForDate(d))
label.setIcon(evIcon);
else
label.setIcon(null);
return label;
}
示例6: getTableCellRendererComponent
import net.sf.memoranda.EventsManager; //导入方法依赖的package包/类
@Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus,
int row, int column) {
JLabel label = (JLabel) super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
String currentPanel = App.getFrame().workPanel.dailyItemsPanel.getCurrentPanel();
if (d == null) {
label.setEnabled(false);
label.setIcon(null);
label.setBackground(new Color(0xE0, 0xE0, 0xE0));
return label;
}
if (!isSelected) {
CalendarDate cpsd = CurrentProject.get().getStartDate();
CalendarDate cped = CurrentProject.get().getEndDate();
if (!(((d.after(cpsd)) && (d.before(cped))) || (d.equals(cpsd)) || (d.equals(cped)))) {
label.setBackground(new Color(0xF0, 0xF0, 0xF0));
return label;
}
}
label.setHorizontalTextPosition(2);
label.setEnabled(true);
if (d.equals(CalendarDate.today())) {
label.setBorder(BorderFactory.createLineBorder(new Color(100, 100, 128)));
}
getTableCellRendererComponent_setGroundColor(label, currentPanel, isSelected);
// always display NREvents
if (EventsManager.isNREventsForDate(d))
{
label.setIcon(evIcon);
} else {
label.setIcon(null);
}
return label;
}