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


Java Configuration类代码示例

本文整理汇总了Java中net.sf.memoranda.util.Configuration的典型用法代码示例。如果您正苦于以下问题:Java Configuration类的具体用法?Java Configuration怎么用?Java Configuration使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: initTable

import net.sf.memoranda.util.Configuration; //导入依赖的package包/类
public void initTable(CalendarDate d) {
	setModel(new EventsTableModel());
	int fDow = Configuration.get("FIRST_DAY_OF_WEEK").equals("mon")?Calendar.MONDAY:Calendar.SUNDAY;
	Calendar cal = d.getCalendar();
	if(cal.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY && fDow == Calendar.MONDAY) cal.set(Calendar.DAY_OF_YEAR, cal.get(Calendar.DAY_OF_YEAR)-6);
	else 
		cal.set(Calendar.DAY_OF_WEEK, fDow);
	Calendar changeCal = (Calendar)cal.clone();
	for(int i = 0;i<7;i++){
		changeCal.set(Calendar.DAY_OF_YEAR, i+cal.get(Calendar.DAY_OF_YEAR));
		events[i] = new Vector(EventsManager.getEventsForDate(new CalendarDate(changeCal)));
		days[i] = (Calendar)changeCal.clone();
	}
		
    for(int i = 0;i<getColumnModel().getColumnCount();i++){
    	getColumnModel().getColumn(i).setPreferredWidth(100);
        getColumnModel().getColumn(i).setMaxWidth(100);
    }
    clearSelection();
    updateUI();
}
 
开发者ID:ser316asu,项目名称:SER316-Dresden,代码行数:22,代码来源:EventsTableWeekly.java

示例2: doExit

import net.sf.memoranda.util.Configuration; //导入依赖的package包/类
public void doExit() {
    if (Configuration.get("ASK_ON_EXIT").equals("yes")) {
                    Dimension frmSize = this.getSize();
                    Point loc = this.getLocation();
                    
                    ExitConfirmationDialog dlg = new ExitConfirmationDialog(this,Local.getString("Exit"));
                    dlg.setLocation((frmSize.width - dlg.getSize().width) / 2 + loc.x, (frmSize.height - dlg.getSize().height) / 2 + loc.y);
                    dlg.setVisible(true);
                    if(dlg.CANCELLED) return;
    }

    Context.put("FRAME_WIDTH", new Integer(this.getWidth()));
    Context.put("FRAME_HEIGHT", new Integer(this.getHeight()));
    Context.put("FRAME_XPOS", new Integer(this.getLocation().x));
    Context.put("FRAME_YPOS", new Integer(this.getLocation().y));
    exitNotify();
    System.exit(0);
}
 
开发者ID:ser316asu,项目名称:Neukoelln_SER316,代码行数:19,代码来源:AppFrame.java

示例3: setCalendarParameters

import net.sf.memoranda.util.Configuration; //导入依赖的package包/类
void setCalendarParameters() {
	int d = 1;

	Calendar cal = _date.getCalendar();

	if (Configuration.get("FIRST_DAY_OF_WEEK").equals("mon")) {
		cal.setFirstDayOfWeek(Calendar.MONDAY);
		d = 2;
	} else
		cal.setFirstDayOfWeek(Calendar.SUNDAY);

	cal.set(Calendar.DAY_OF_MONTH, 1);
	cal.getTime();
	firstDay = cal.get(Calendar.DAY_OF_WEEK) - d;
	if (firstDay == -1)
		firstDay = 6;
	daysInMonth = cal.getActualMaximum(Calendar.DAY_OF_MONTH);
}
 
开发者ID:ser316asu,项目名称:Neukoelln_SER316,代码行数:19,代码来源:JNCalendar.java

示例4: setCalendarParameters

import net.sf.memoranda.util.Configuration; //导入依赖的package包/类
/**
 * Builds calendar based on the first and last day of the week.
 */
void setCalendarParameters() {
	int d = 1;

	Calendar cal = _date.getCalendar();

	if (Configuration.get("FIRST_DAY_OF_WEEK").equals("mon")) {
		cal.setFirstDayOfWeek(Calendar.MONDAY);
		d = 2;
	} else
		cal.setFirstDayOfWeek(Calendar.SUNDAY);

	cal.set(Calendar.DAY_OF_MONTH, 1);
	cal.getTime();
	firstDay = cal.get(Calendar.DAY_OF_WEEK) - d;
	if (firstDay == -1)
		firstDay = 6;
	daysInMonth = cal.getActualMaximum(Calendar.DAY_OF_MONTH);
}
 
开发者ID:ser316asu,项目名称:SER316-Dresden,代码行数:22,代码来源:JNCalendar.java

示例5: setLOCcountsForProject

import net.sf.memoranda.util.Configuration; //导入依赖的package包/类
/**
 * Sets line of code count as JSON in format (ProjID, (Path, LOC)), given project ID and path hashmap
 * @param projectID
 * @param pathWithLOCCount contains the src path as key, project loc count as value
 * @param filePath file path
 * @param filePathLOCcount file loc count
 * 
 */
private static synchronized void setLOCcountsForProject(String projectID, ConcurrentHashMap<String, String> pathWithLOCCount, String filePath, String filePathLOCcount){
	java.util.Iterator<String> iter = pathWithLOCCount.keySet().iterator();
	String jsonObj = "{";

	while(iter.hasNext()){//iterate and construct string in JSON from paths, and LOC count
		String key = iter.next();
		String value = pathWithLOCCount.get(key).toString();
		jsonObj = jsonObj+"\""+key+"\""+":"+"\""+value+"\""+",";
	}
	if(jsonObj.endsWith(",")){
		jsonObj = jsonObj.substring(0,jsonObj.length()-1);
		jsonObj = jsonObj+"}";
	}
	Util.debug("Set Path With LOC: "+jsonObj);
	Util.debug("Set File path LOC count: "+filePathLOCcount);
	Configuration.put(projectID+filePath, filePathLOCcount); //sets file LOC count to match with projectID+filePath
	Configuration.put(projectID, jsonObj);
	Configuration.saveConfig();

}
 
开发者ID:ser316asu,项目名称:Reinickendorf_SER316,代码行数:29,代码来源:AgendaPanel.java

示例6: processWindowEvent

import net.sf.memoranda.util.Configuration; //导入依赖的package包/类
protected void processWindowEvent(WindowEvent e) {
    if (e.getID() == WindowEvent.WINDOW_CLOSING) {
        if (Configuration.get("ON_CLOSE").equals("exit"))
            doExit();
        else
            doMinimize();
    }
    // Minimize window fix
    /*
    else if ((e.getID() == WindowEvent.WINDOW_ICONIFIED)) {
        super.processWindowEvent(new WindowEvent(this,
                WindowEvent.WINDOW_CLOSING));
        doMinimize();
    }
    else
        super.processWindowEvent(e);*/
}
 
开发者ID:ser316asu,项目名称:SER316-Aachen,代码行数:18,代码来源:AppFrame.java

示例7: NotesList

import net.sf.memoranda.util.Configuration; //导入依赖的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(d -> updateUI());

    CurrentNote.addNoteListener((n, toSaveCurrentNote) -> updateUI());

    CurrentProject.addProjectListener(new ProjectListener() {
        public void projectChange() {
        }

        public void projectWasChanged() {
            update();
        }
    });
    this.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
}
 
开发者ID:cst316,项目名称:spring16project-Team-Laredo,代码行数:23,代码来源:NotesList.java

示例8: setCalendarParameters

import net.sf.memoranda.util.Configuration; //导入依赖的package包/类
private void setCalendarParameters() {
    int d = 1;

    Calendar cal = _date.getCalendar();

    if (Configuration.get("FIRST_DAY_OF_WEEK").equals("mon")) {
        cal.setFirstDayOfWeek(Calendar.MONDAY);
        d = 2;
    } else
        cal.setFirstDayOfWeek(Calendar.SUNDAY);

    cal.set(Calendar.DAY_OF_MONTH, 1);
    cal.getTime();
    firstDay = cal.get(Calendar.DAY_OF_WEEK) - d;
    if (firstDay == -1)
        firstDay = 6;
    daysInMonth = cal.getActualMaximum(Calendar.DAY_OF_MONTH);
}
 
开发者ID:cst316,项目名称:spring16project-Team-Laredo,代码行数:19,代码来源:JNCalendar.java

示例9: doExit

import net.sf.memoranda.util.Configuration; //导入依赖的package包/类
public void doExit() {
	if (Configuration.get("ASK_ON_EXIT").equals("yes")) {
		Dimension frmSize = this.getSize();
		Point loc = this.getLocation();

		ExitConfirmationDialog dlg = new ExitConfirmationDialog(this, Local.getString("Exit"));
		dlg.setLocation((frmSize.width - dlg.getSize().width) / 2 + loc.x,
				(frmSize.height - dlg.getSize().height) / 2 + loc.y);
		dlg.setVisible(true);
		// System.out.println("ask");
		if (dlg.CANCELLED) {
			// System.out.println("dlg.cancle is true");
			return;
		}
	}
	// System.out.println("not ask");

	Context.put("FRAME_WIDTH", new Integer(this.getWidth()));
	Context.put("FRAME_HEIGHT", new Integer(this.getHeight()));
	Context.put("FRAME_XPOS", new Integer(this.getLocation().x));
	Context.put("FRAME_YPOS", new Integer(this.getLocation().y));
	exitNotify();
	System.exit(0);
}
 
开发者ID:cst316,项目名称:spring16project-Fortran,代码行数:25,代码来源:AppFrame.java

示例10: processWindowEvent

import net.sf.memoranda.util.Configuration; //导入依赖的package包/类
@Override
protected void processWindowEvent(WindowEvent e) {
	if (e.getID() == WindowEvent.WINDOW_CLOSING) {
		if (Configuration.get("ON_CLOSE").equals("exit")) {
			// System.out.println("1exit");
			doExit();
		} else {
			// System.out.println("2elseExitWindow");
			doExit();
		}
	} else if ((e.getID() == WindowEvent.WINDOW_ICONIFIED)) {
		// super.processWindowEvent(new WindowEvent(this,
		// WindowEvent.WINDOW_ICONIFIED));
		// System.out.println("3elseIfMin"); // minimize goes here
	} else {
		// System.out.println("4elseOther--usuallyPopUp&PopDown");
		super.processWindowEvent(e);
	}
}
 
开发者ID:cst316,项目名称:spring16project-Fortran,代码行数:20,代码来源:AppFrame.java

示例11: setCalendarParameters

import net.sf.memoranda.util.Configuration; //导入依赖的package包/类
void setCalendarParameters() {
	int d = 1;

	Calendar cal = _date.getCalendar();

	if (Configuration.get("FIRST_DAY_OF_WEEK").equals("mon")) {
		cal.setFirstDayOfWeek(Calendar.MONDAY);
		d = 2;
	} else {
		cal.setFirstDayOfWeek(Calendar.SUNDAY);
	}

	cal.set(Calendar.DAY_OF_MONTH, 1);
	cal.getTime();
	firstDay = cal.get(Calendar.DAY_OF_WEEK) - d;
	if (firstDay == -1) {
		firstDay = 6;
	}
	daysInMonth = cal.getActualMaximum(Calendar.DAY_OF_MONTH);
}
 
开发者ID:cst316,项目名称:spring16project-Fortran,代码行数:21,代码来源:JNCalendar.java

示例12: processWindowEvent

import net.sf.memoranda.util.Configuration; //导入依赖的package包/类
protected void processWindowEvent(WindowEvent e) {
    if (e.getID() == WindowEvent.WINDOW_CLOSING) {
        if (Configuration.get("ON_CLOSE").equals("exit"))
            doExit();
        else
            doMinimize();
    }
    else if ((e.getID() == WindowEvent.WINDOW_ICONIFIED)
            && Configuration.get("ON_MINIMIZE").equals("systray")
            && !App.sysTrayDisabled) {
        super.processWindowEvent(new WindowEvent(this,
                WindowEvent.WINDOW_CLOSING));
        doMinimize();
    }
    else
        super.processWindowEvent(e);
}
 
开发者ID:lgsilvestre,项目名称:Memoranda,代码行数:18,代码来源:AppFrame.java

示例13: processWindowEvent

import net.sf.memoranda.util.Configuration; //导入依赖的package包/类
protected void processWindowEvent(WindowEvent e) {
    if (e.getID() == WindowEvent.WINDOW_CLOSING) {
        if (Configuration.get("ON_CLOSE").equals("exit"))
            doExit();
        else
            doMinimize();
    }
    else if ((e.getID() == WindowEvent.WINDOW_ICONIFIED)) {
        super.processWindowEvent(new WindowEvent(this,
                WindowEvent.WINDOW_CLOSING));
        doMinimize();
    }
    else
        super.processWindowEvent(e);
}
 
开发者ID:ser316asu,项目名称:Neukoelln_SER316,代码行数:16,代码来源:AppFrame.java

示例14: ppInvertSort_actionPerformed

import net.sf.memoranda.util.Configuration; //导入依赖的package包/类
void ppInvertSort_actionPerformed(ActionEvent e) {
Configuration.put(
	"NOTES_SORT_ORDER",
	new Boolean(ppInvertSort.isSelected()));
Configuration.saveConfig();
      notesList.invertSortOrder();
      notesList.update();
  }
 
开发者ID:ser316asu,项目名称:Neukoelln_SER316,代码行数:9,代码来源:NotesControlPanel.java

示例15: NotesList

import net.sf.memoranda.util.Configuration; //导入依赖的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);
  }
 
开发者ID:ser316asu,项目名称:Neukoelln_SER316,代码行数:30,代码来源:NotesList.java


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