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


Java EventsManager.isNREventsForDate方法代码示例

本文整理汇总了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;
  }
 
开发者ID:ser316asu,项目名称:Neukoelln_SER316,代码行数:73,代码来源:JNCalendarCellRenderer.java

示例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;
  }
 
开发者ID:ser316asu,项目名称:SER316-Munich,代码行数:73,代码来源:JNCalendarCellRenderer.java

示例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;
  }
 
开发者ID:ser316asu,项目名称:Reinickendorf_SER316,代码行数:72,代码来源:JNCalendarCellRenderer.java

示例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;
  }
 
开发者ID:ser316asu,项目名称:Dahlem_SER316,代码行数:73,代码来源:JNCalendarCellRenderer.java

示例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;
}
 
开发者ID:cst316,项目名称:spring16project-Team-Laredo,代码行数:67,代码来源:JNCalendarCellRenderer.java

示例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;
}
 
开发者ID:cst316,项目名称:spring16project-Fortran,代码行数:44,代码来源:JNCalendarCellRenderer.java


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