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


Java Configuration.put方法代码示例

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


在下文中一共展示了Configuration.put方法的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: testSMSEvent

import net.sf.memoranda.util.Configuration; //导入方法依赖的package包/类
@Test
public void testSMSEvent(){
	Configuration.put("PHONE_NUMBER", "(555)-555-5555");
	assertTrue(PhoneNumber.checkPhoneNumber());
	Configuration.put("PHONE_NUMBER", "");
	assertFalse(PhoneNumber.checkPhoneNumber());
	//SMS testing is not done as it would end up texting someone whenever the build is run as a test
	//and we'd rather not pay for all that would stink
}
 
开发者ID:ser316asu,项目名称:SER316-Dresden,代码行数:10,代码来源:EventTest.java

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

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

示例6: apply_ifnewlf

import net.sf.memoranda.util.Configuration; //导入方法依赖的package包/类
void apply_ifnewlf() {
	String lf = Configuration.get("LOOK_AND_FEEL").toString();
	String newlf = "";

	if (!lf.equalsIgnoreCase(newlf)) {
		Configuration.put("LOOK_AND_FEEL", newlf);
		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());
			}

			SwingUtilities.updateComponentTreeUI(App.getFrame());

		} catch (Exception e) {
			Configuration.put("LOOK_AND_FEEL", lf);
			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 (this.lfSystemRB.isSelected()) {
		newlf = "system";
	} else if (this.lfJavaRB.isSelected()) {
		newlf = "default";
	} else if (this.lfCustomRB.isSelected()) {
		newlf = this.lfClassName.getText();
	}
}
 
开发者ID:cst316,项目名称:spring16project-Fortran,代码行数:32,代码来源:PreferencesDialog.java

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

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

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

示例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");
	// 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

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

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

示例13: setUp

import net.sf.memoranda.util.Configuration; //导入方法依赖的package包/类
@Before
public void setUp() throws Exception {
	Configuration.put("FIRST_DAY_OF_WEEK","sun");
	EventsManager.setEventDao(new InMemoryEventDao());
	EventsManager.updateFromSource();
	EventsManager.removeAllEvents();
	tev1 = new Event.Builder()
			.setDate(new CalendarDate(2, 2, 2017))
			.setHour(13)
			.setMinute(6)
			.setText("testEvent1")
			.setDuration(60)
			.setSendsSms(false)
			.build();
	EventsManager.saveEvent(tev1);
	tev2 = new Event.RepeatableBuilder()
			.setRepeatType(Event.RepeatType.REPEAT_DAILY)
			.setStartDate(new CalendarDate(3, 2, 2017))
			.setEndDate(new CalendarDate(5, 4, 2017))
			.setPeriod(2)
			.setHour(10)
			.setMinute(30)
			.setText("testEvent2")
			.setWorkingDays(false)
			.setDuration(30)
			.setRepeatDays(null)
			.setSendsSms(false)
			.build();
	EventsManager.saveEvent(tev2);
	tev3 = new Event.RepeatableBuilder()
			.setRepeatType(Event.RepeatType.REPEAT_WEEKLY)
			.setStartDate(new CalendarDate(5, 2, 2017))
			.setEndDate(new CalendarDate(5, 4, 2017))
			.setPeriod(1)
			.setHour(15)
			.setMinute(45)
			.setText("testEvent3")
			.setWorkingDays(false)
			.setDuration(90)
			.setRepeatDays(new boolean[]{false,true,false,true,false,true,false})
			.setSendsSms(false)
			.build();
	EventsManager.saveEvent(tev3);
}
 
开发者ID:ser316asu,项目名称:SER316-Dresden,代码行数:45,代码来源:EventsTableTest.java

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

示例15: reload

import net.sf.memoranda.util.Configuration; //导入方法依赖的package包/类
/**
 * Method reload to apply color changes.
 */
public static void reload (boolean fullmode) {
	frame.dispose();
	if (fullmode)
		fullmode = !Configuration.get("START_MINIMIZED").equals("yes");
	/* DEBUG */
	if (!fullmode)
		System.out.println("Minimized mode");
	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) {
		double JVMVer =
				Double
					.valueOf(System.getProperty("java.version").substring(0, 3))
					.doubleValue();

			frame.pack();
			if (JVMVer >= 1.4) {
				frame.setExtendedState(Frame.MAXIMIZED_BOTH);
			} else {
				frame.setExtendedState(Frame.NORMAL);
			}
			frame.setVisible(true);
			frame.toFront();
			frame.requestFocus();
	}
}
 
开发者ID:ser316asu,项目名称:Reinickendorf_SER316,代码行数:57,代码来源:App.java


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