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


Java Configuration.saveConfig方法代码示例

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


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

示例1: 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

示例2: ppInvertSort_actionPerformed

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

示例3: getLOCcountsForProject

import net.sf.memoranda.util.Configuration; //导入方法依赖的package包/类
/**
 * Returns a ConcurrentHashMap as (FileLOC count, ProjectLOC count)
 * @param projectID 
 * @param pth the path to the src folder
 * @param filePath the path to the file
 * @return must return a ConcurrentHashMap in format (FileLOC,ProjectLOC)
 */
private static synchronized ConcurrentHashMap<String, String> getLOCcountsForProject(String projectID, String pth, String filePath){
	String pathWithLOC ="{}";	//Project LOC count
	String fileWithLOC = "{}";	//Individual File LOC count
	String fileLOCWithLOC = "{}";	//Combined File LOC, Project LOC only for purposes where using setLOCcountsForProject immediately after calling this method
	//ConcurrentHashMap<String, ConcurrentHashMap<String, String>> toConfig = new ConcurrentHashMap();
	ConcurrentHashMap<String, String> chm = new ConcurrentHashMap();
	ConcurrentHashMap<String,String> toGetter = new ConcurrentHashMap();
	try{	
		
		pathWithLOC = Configuration.get(projectID).toString();	// retrieve conchashmap with JSON <Path, LOCCount>
		
		if(pathWithLOC.isEmpty() || pathWithLOC == null || !((pathWithLOC.length())>2)){
			pathWithLOC = "{\""+pth+"\":"+"\"0\"}";
			
			Configuration.put(projectID, pathWithLOC);
			Configuration.saveConfig();
		}
		Util.debug("getLOCcounts: Path With LOC: "+pathWithLOC);
		chm = sliceJSONStrIntoConcHashMap(pathWithLOC);
		
		pathWithLOC = chm.entrySet().iterator().next().getValue();
		
		
		
		fileWithLOC = Configuration.get(projectID+filePath).toString();
		chm = sliceJSONStrIntoConcHashMap(fileLOCWithLOC); 
		Util.debug("Get LOC for Project in JSON: "+pathWithLOC);
		Util.debug("Get File LOC in JSON: "+fileWithLOC);
		//if(pathWithLOC.isEmpty() || pathWithLOC == null || !(pathWithLOC.length()>0) || fileWithLOC.isEmpty() || fileWithLOC == null || !(fileWithLOC.length()>0)){
		//	fileLOCWithLOC = "{\"0\":\"0\"}";
		//}else{
			fileLOCWithLOC = "{\""+fileWithLOC+"\":\""+pathWithLOC+"\"}";
		//}
		Util.debug("FileWithProjCount: "+fileLOCWithLOC);
		
		toGetter.put(fileWithLOC, pathWithLOC);
		//toConfig.put(projectID, chm);
		
	}catch(Exception e){
		e.printStackTrace();
	}
	return toGetter;
}
 
开发者ID:ser316asu,项目名称:Reinickendorf_SER316,代码行数:51,代码来源:AgendaPanel.java

示例4: ppInvertSort_actionPerformed

import net.sf.memoranda.util.Configuration; //导入方法依赖的package包/类
private void ppInvertSort_actionPerformed() {
    Configuration.put(
            "NOTES_SORT_ORDER",
            Boolean.valueOf(ppInvertSort.isSelected()));
    Configuration.saveConfig();
    notesList.invertSortOrder();
    notesList.update();
}
 
开发者ID:cst316,项目名称:spring16project-Team-Laredo,代码行数:9,代码来源:NotesControlPanel.java

示例5: apply

import net.sf.memoranda.util.Configuration; //导入方法依赖的package包/类
void apply() {

		applyIfs();

		Configuration.put("ON_MINIMIZE", "normal");

		String brPath = this.browserPath.getText();
		if (new java.io.File(brPath).isFile()) {
			MimeTypesList.getAppList().setBrowserExec(brPath);
			CurrentStorage.get().storeMimeTypesList();
		}

		if (!this.enableSoundCB.isSelected()) {
			Configuration.put("NOTIFY_SOUND", "DISABLED");
		} else if (this.soundDefaultRB.isSelected()) {
			Configuration.put("NOTIFY_SOUND", "DEFAULT");
		} else if (this.soundBeepRB.isSelected()) {
			Configuration.put("NOTIFY_SOUND", "BEEP");
		} else if ((this.soundCustomRB.isSelected()) && (this.soundFile.getText().trim().length() > 0)) {
			Configuration.put("NOTIFY_SOUND", this.soundFile.getText().trim());
		}

		if (antialiasChB.isSelected()) {
			Configuration.put("ANTIALIAS_TEXT", "yes");
		} else {
			Configuration.put("ANTIALIAS_TEXT", "no");
		}

		Configuration.put("NORMAL_FONT", normalFontCB.getSelectedItem());
		Configuration.put("HEADER_FONT", headerFontCB.getSelectedItem());
		Configuration.put("MONO_FONT", monoFontCB.getSelectedItem());
		Configuration.put("BASE_FONT_SIZE", baseFontSize.getValue());
		App.getFrame().workPanel.dailyItemsPanel.editorPanel.editor.editor.setAntiAlias(antialiasChB.isSelected());
		App.getFrame().workPanel.dailyItemsPanel.editorPanel.initCSS();
		App.getFrame().workPanel.dailyItemsPanel.editorPanel.editor.repaint();

		Configuration.saveConfig();

	}
 
开发者ID:cst316,项目名称:spring16project-Fortran,代码行数:40,代码来源:PreferencesDialog.java

示例6: App

import net.sf.memoranda.util.Configuration; //导入方法依赖的package包/类
public App(boolean fullmode) {
	super();
	if (fullmode) {
		fullmode = !Configuration.get("START_MINIMIZED").equals("yes");
	}
	/* DEBUG */
	// else {
	// System.out.println("Minimized mode");
	// }
	if (!Configuration.get("SHOW_SPLASH").equals("no")) {
		showSplash();
	}
	// System.out.println(VERSION_INFO);
	// System.out.println(Configuration.get("LOOK_AND_FEEL"));

	App_trylf();

	if (Configuration.get("FIRST_DAY_OF_WEEK").equals("")) {
		String fdow;
		if (Calendar.getInstance().getFirstDayOfWeek() == 2) {
			fdow = "mon";
		} else {
			fdow = "sun";
		}
		Configuration.put("FIRST_DAY_OF_WEEK", fdow);
		Configuration.saveConfig();
		/* DEBUG */
		System.out.println("[DEBUG] first day of week is set to " + fdow);
	}

	EventsScheduler.init();
	frame = new AppFrame();
	if (fullmode) {
		init();
	}
	if (!Configuration.get("SHOW_SPLASH").equals("no")) {
		splash.dispose();
	}
}
 
开发者ID:cst316,项目名称:spring16project-Fortran,代码行数:40,代码来源:App.java

示例7: App

import net.sf.memoranda.util.Configuration; //导入方法依赖的package包/类
public App(boolean fullmode) {
	super();
	if (fullmode)
		fullmode = !Configuration.get("START_MINIMIZED").equals("yes");
	/* DEBUG */
	if (!fullmode)
		System.out.println("Minimized mode");
	// TODO: make language selection configurable
	showSelectLanguageDialog();
	if (!Configuration.get("SHOW_SPLASH").equals("no"))
		showSplash();
	System.out.println(VERSION_INFO);
	System.out.println(Configuration.get("LOOK_AND_FEEL"));
	try {
		if (Configuration.get("LOOK_AND_FEEL").equals("system"))
			UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
		else if (Configuration.get("LOOK_AND_FEEL").equals("default"))
			UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
		else if (Configuration.get("LOOK_AND_FEEL").toString().length() > 0)
			UIManager.setLookAndFeel(Configuration.get("LOOK_AND_FEEL").toString());

	} catch (Exception e) {
		new ExceptionDialog(e, "Error when initializing a pluggable look-and-feel. Default LF will be used.",
				"Make sure that specified look-and-feel library classes are on the CLASSPATH.");
	}
	if (Configuration.get("FIRST_DAY_OF_WEEK").equals("")) {
		String fdow;
		if (Calendar.getInstance().getFirstDayOfWeek() == 2)
			fdow = "mon";
		else
			fdow = "sun";
		Configuration.put("FIRST_DAY_OF_WEEK", fdow);
		Configuration.saveConfig();
		/* DEBUG */
		System.out.println("[DEBUG] first day of week is set to " + fdow);
	}

	EventsScheduler.init();
	frame = new AppFrame();

	if (fullmode) {
		init();
	}
	if (!Configuration.get("SHOW_SPLASH").equals("no"))
		splash.dispose();
}
 
开发者ID:ser316asu,项目名称:Neukoelln_SER316,代码行数:47,代码来源:App.java

示例8: checkDoNotAsk

import net.sf.memoranda.util.Configuration; //导入方法依赖的package包/类
public void  checkDoNotAsk() {
	if (this.donotaskCB.isSelected()) {
		Configuration.put("ASK_ON_EXIT", "no");
		Configuration.saveConfig();
	}
}
 
开发者ID:ser316asu,项目名称:SER316-Dresden,代码行数:7,代码来源:ExitConfirmationDialog.java

示例9: App

import net.sf.memoranda.util.Configuration; //导入方法依赖的package包/类
public App(boolean fullmode) {
       super();
       IconFontSwing.register(GoogleMaterialDesignIcons.getIconFont());
       if (fullmode)
           fullmode = !Configuration.get("START_MINIMIZED").equals("yes");
       /* DEBUG */
       if (!fullmode)
           Util.debug("Minimized mode");
       if (!Configuration.get("SHOW_SPLASH").equals("no")){
           showSplash();
       }
       Util.debug(VERSION_INFO);
       Util.debug(Configuration.get("LOOK_AND_FEEL").toString());
       try {
           if (Configuration.get("LOOK_AND_FEEL").equals("system"))
               UIManager.setLookAndFeel(
                   UIManager.getSystemLookAndFeelClassName());
           else if (Configuration.get("LOOK_AND_FEEL").equals("default"))
               UIManager.setLookAndFeel(
                   UIManager.getCrossPlatformLookAndFeelClassName());                    
           else if (
               Configuration.get("LOOK_AND_FEEL").toString().length() > 0)
               UIManager.setLookAndFeel(
                   Configuration.get("LOOK_AND_FEEL").toString());

	} catch (Exception e) {
		new ExceptionDialog(e, "Error when initializing a pluggable look-and-feel. Default LF will be used.", "Make sure that specified look-and-feel library classes are on the CLASSPATH.");
	}
	if (Configuration.get("FIRST_DAY_OF_WEEK").equals("")) {
		String fdow;
		if (Calendar.getInstance().getFirstDayOfWeek() == 2)
			fdow = "mon";
		else
			fdow = "sun";
		Configuration.put("FIRST_DAY_OF_WEEK", fdow);
		Configuration.saveConfig();
		Util.debug("first day of week is set to " + fdow);
	}
	Palette.setPalette(CurrentProject.get().getColor());
	showLogin();
	login.dispose();
	EventsScheduler.init();
	frame = AppFrame.getAppFrame();
	if (fullmode) {
		init();
	}
	if (!Configuration.get("SHOW_SPLASH").equals("no"))
		splash.dispose();
}
 
开发者ID:ser316asu,项目名称:SER316-Dresden,代码行数:50,代码来源:App.java

示例10: App

import net.sf.memoranda.util.Configuration; //导入方法依赖的package包/类
public App(boolean fullmode) {
	super();
	if (fullmode)
		fullmode = !Configuration.get("START_MINIMIZED").equals("yes");
	/* DEBUG */
	if (!fullmode)
		System.out.println("Minimized mode");
	if (!Configuration.get("SHOW_SPLASH").equals("no"))
		showSplash();
	System.out.println(VERSION_INFO);
	System.out.println(Configuration.get("LOOK_AND_FEEL"));
	try {
		if (Configuration.get("LOOK_AND_FEEL").equals("system"))
			UIManager.setLookAndFeel(
				UIManager.getSystemLookAndFeelClassName());
		else if (Configuration.get("LOOK_AND_FEEL").equals("default"))
			UIManager.setLookAndFeel(
				UIManager.getCrossPlatformLookAndFeelClassName());					
		else if (
			Configuration.get("LOOK_AND_FEEL").toString().length() > 0)
			UIManager.setLookAndFeel(
				Configuration.get("LOOK_AND_FEEL").toString());

	} catch (Exception e) {		    
		new ExceptionDialog(e, "Error when initializing a pluggable look-and-feel. Default LF will be used.", "Make sure that specified look-and-feel library classes are on the CLASSPATH.");
	}
	if (Configuration.get("FIRST_DAY_OF_WEEK").equals("")) {
		String fdow;
		if (Calendar.getInstance().getFirstDayOfWeek() == 2)
			fdow = "mon";
		else
			fdow = "sun";
		Configuration.put("FIRST_DAY_OF_WEEK", fdow);
		Configuration.saveConfig();
		/* DEBUG */
		System.out.println("[DEBUG] first day of week is set to " + fdow);
	}

	EventsScheduler.init();
	frame = new AppFrame();
	if (fullmode) {
		init();
	}
	if (!Configuration.get("SHOW_SPLASH").equals("no"))
		splash.dispose();
}
 
开发者ID:ser316asu,项目名称:SER316-Munich,代码行数:47,代码来源:App.java

示例11: App

import net.sf.memoranda.util.Configuration; //导入方法依赖的package包/类
public App(boolean fullmode, boolean tray) {
	super();
	if (fullmode)
		fullmode = !Configuration.get("START_MINIMIZED").equals("yes");
	/* DEBUG */
	if (!fullmode)
		System.out.println("Minimized mode");
	if (!Configuration.get("SHOW_SPLASH").equals("no"))
		showSplash();
	System.out.println(VERSION_INFO);
	System.out.println(Configuration.get("LOOK_AND_FEEL"));
	try {
		if (Configuration.get("LOOK_AND_FEEL").equals("Day")) {
			UIManager.setLookAndFeel(
				UIManager.getCrossPlatformLookAndFeelClassName());
			ColorPanels.setTheme("Day");
		}
		else if (Configuration.get("LOOK_AND_FEEL").equals("Night")) {
			UIManager.setLookAndFeel(
					UIManager.getCrossPlatformLookAndFeelClassName());
			ColorPanels.setTheme("Night");
		}
		else {
			UIManager.setLookAndFeel(
					UIManager.getCrossPlatformLookAndFeelClassName());
				ColorPanels.setTheme("Day");
		}

	} catch (Exception e) {		    
		new ExceptionDialog(e, "Error when initializing a pluggable look-and-feel. Default LF will be used.", "Make sure that specified look-and-feel library classes are on the CLASSPATH.");
	}
	if (Configuration.get("FIRST_DAY_OF_WEEK").equals("")) {
		String fdow;
		if (Calendar.getInstance().getFirstDayOfWeek() == 2)
			fdow = "mon";
		else
			fdow = "sun";
		Configuration.put("FIRST_DAY_OF_WEEK", fdow);
		Configuration.saveConfig();
		/* DEBUG */
		System.out.println("[DEBUG] first day of week is set to " + fdow);
	}

	EventsScheduler.init();
	frame = new AppFrame(tray);
	this.tray = tray;
	if (fullmode) {
		init();
	}
	if (!Configuration.get("SHOW_SPLASH").equals("no"))
		splash.dispose();
}
 
开发者ID:ser316asu,项目名称:Dahlem_SER316,代码行数:53,代码来源:App.java

示例12: 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,项目名称:Dahlem_SER316,代码行数:7,代码来源:NotesControlPanel.java

示例13: App

import net.sf.memoranda.util.Configuration; //导入方法依赖的package包/类
public App(boolean fullmode) {
	super();
	if (fullmode)
		fullmode = !Configuration.get("START_MINIMIZED").equals("yes");
	/* DEBUG */
	if (!fullmode)
		System.out.println("Minimized mode");
	if (!Configuration.get("SHOW_SPLASH").equals("no"))
		showSplash();
	System.out.println(VERSION_INFO);
	System.out.println(Configuration.get("LOOK_AND_FEEL"));
	try {
		if (Configuration.get("LOOK_AND_FEEL").equals("system"))
			UIManager.setLookAndFeel(
				UIManager.getSystemLookAndFeelClassName());
		else if (Configuration.get("LOOK_AND_FEEL").equals("default"))
			UIManager.setLookAndFeel(
				UIManager.getCrossPlatformLookAndFeelClassName());					
		else if (
			Configuration.get("LOOK_AND_FEEL").toString().length() > 0)
			UIManager.setLookAndFeel(
				Configuration.get("LOOK_AND_FEEL").toString());

	} catch (Exception e) {		    
		new ExceptionDialog(e, "Error when initializing a pluggable look-and-feel. Default LF will be used.", "Make sure that specified look-and-feel library classes are on the CLASSPATH.");
	}
	if (Configuration.get("FIRST_DAY_OF_WEEK").equals("")) {
		String fdow;
		if (Calendar.getInstance().getFirstDayOfWeek() == 2)
			fdow = "mon";
		else
			fdow = "sun";
		Configuration.put("FIRST_DAY_OF_WEEK", fdow);
		Configuration.saveConfig();
		/* DEBUG */
		System.out.println("[DEBUG] first day of week is set to " + fdow);
	}
	if (Configuration.get("BACKGROUND_COLOR_SETTING").equals(null))
		Configuration.put("BACKGROUND_COLOR_SETTING", "WHITE");

	EventsScheduler.init();
	frame = new AppFrame();
	if (fullmode) {
		init();
	}
	if (!Configuration.get("SHOW_SPLASH").equals("no"))
		splash.dispose();
}
 
开发者ID:ser316asu,项目名称:Reinickendorf_SER316,代码行数:49,代码来源:App.java

示例14: checkDoNotAsk

import net.sf.memoranda.util.Configuration; //导入方法依赖的package包/类
private void checkDoNotAsk() {
    if (this.donotaskCB.isSelected()) {
        Configuration.put("ASK_ON_EXIT", "no");
        Configuration.saveConfig();
    }
}
 
开发者ID:cst316,项目名称:spring16project-Team-Laredo,代码行数:7,代码来源:ExitConfirmationDialog.java

示例15: App

import net.sf.memoranda.util.Configuration; //导入方法依赖的package包/类
public App(boolean fullmode) {
    super();
    if (fullmode)
        fullmode = !Configuration.get("START_MINIMIZED").equals("yes");
    /* DEBUG */
    if (!fullmode)
        System.out.println("Minimized mode");
    if (!Configuration.get("SHOW_SPLASH").equals("no"))
        showSplash();
    System.out.println(VERSION_INFO);
    System.out.println(Configuration.get("LOOK_AND_FEEL"));
    try {
        if (Configuration.get("LOOK_AND_FEEL").equals("system"))
            UIManager.setLookAndFeel(
                    UIManager.getSystemLookAndFeelClassName());
        else if (Configuration.get("LOOK_AND_FEEL").equals("default"))
            UIManager.setLookAndFeel(
                    UIManager.getCrossPlatformLookAndFeelClassName());
        else if (
                Configuration.get("LOOK_AND_FEEL").toString().length() > 0)
            UIManager.setLookAndFeel(
                    Configuration.get("LOOK_AND_FEEL").toString());

    } catch (Exception e) {
        new ExceptionDialog(e, "Error when initializing a pluggable look-and-feel. Default LF will be used.", "Make sure that specified look-and-feel library classes are on the CLASSPATH.");
    }
    if (Configuration.get("FIRST_DAY_OF_WEEK").equals("")) {
        String fdow;
        if (Calendar.getInstance().getFirstDayOfWeek() == 2)
            fdow = "mon";
        else
            fdow = "sun";
        Configuration.put("FIRST_DAY_OF_WEEK", fdow);
        Configuration.saveConfig();
        /* DEBUG */
        System.out.println("[DEBUG] first day of week is set to " + fdow);
    }

    EventsScheduler.init();
    frame = new AppFrame();
    if (fullmode) {
        init();
    }
    if (!Configuration.get("SHOW_SPLASH").equals("no"))
        splash.dispose();
}
 
开发者ID:cst316,项目名称:spring16project-Team-Laredo,代码行数:47,代码来源:App.java


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