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


Java Local.getString方法代码示例

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


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

示例1: doExit

import net.sf.memoranda.util.Local; //导入方法依赖的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,项目名称:SER316-Aachen,代码行数:19,代码来源:AppFrame.java

示例2: getDescription

import net.sf.memoranda.util.Local; //导入方法依赖的package包/类
/**
 * @see javax.swing.filechooser.FileFilter#getDescription()
 */
public String getDescription() {
    if (_type.equals(RTF))
        return "Rich Text Format (*.rtf)";
    else if (_type.equals(ZIP))
        return "ZIP archives (*.zip)";
    else if (_type.equals(EXE))
        return Local.getString("Executable Files") + " (*.exe, *.com, *.bat)";
    else if (_type.equals(JAR))
        return "JAR " + Local.getString("Files") + " (*.jar)";
    else if (_type.equals(WAV))
        return Local.getString("Sound files") + " (*.wav, *.au)";
    else if (_type.equals(XHTML))
        return "XHTML files (*.xhtml, *.xml)";
    else if (_type.equals(ICO))
        return Local.getString("Icon") + " " + Local.getString("Files") + " (*.ico, *.png)";
    return "HTML files (*.html, *.htm)";
}
 
开发者ID:ser316asu,项目名称:Neukoelln_SER316,代码行数:21,代码来源:AllFilesFilter.java

示例3: getValueAt

import net.sf.memoranda.util.Local; //导入方法依赖的package包/类
public Object getValueAt(int row, int col) {
    Resource r = (Resource)files.get(row);
    if (col == _RESOURCE)
        return r;
    if (!r.isInetShortcut())  {
        File f = new File(r.getPath());
        switch (col) {
            case 0: return f.getName();
            case 1: MimeType mt = MimeTypesList.getMimeTypeForFile(f.getName());
                    if (mt != null) return mt.getLabel();
                    else return "unknown";
            case 2: Date d = new Date(f.lastModified());
                    return d;/*Local.getDateString(d, java.text.DateFormat.SHORT) +" "+
                           Local.getTimeString(d);*/
            case 3:return f.getPath();
        }
    }
    else {
        if (col == 0)
            return r.getPath();
        else if (col == 1)
            return Local.getString("Internet shortcut");
        else
            return "";                
    }
    return null;
}
 
开发者ID:ser316asu,项目名称:Reinickendorf_SER316,代码行数:28,代码来源:ResourcesTable.java

示例4: removeEventB_actionPerformed

import net.sf.memoranda.util.Local; //导入方法依赖的package包/类
void removeEventB_actionPerformed(ActionEvent e) {
		String msg;
		net.sf.memoranda.Event ev;

		if(eventsTable.getSelectedRows().length > 1) 
			msg = Local.getString("Remove") + " " + eventsTable.getSelectedRows().length 
				+ " " + Local.getString("events") + "\n" + Local.getString("Are you sure?");
		else {
			ev = (net.sf.memoranda.Event) eventsTable.getModel().getValueAt(
                eventsTable.getSelectedRow(),
                EventsTable.EVENT);
			msg = Local.getString("Remove event") + "\n'" 
				+ ev.getText() + "'\n" + Local.getString("Are you sure?");
		}

        int n =
            JOptionPane.showConfirmDialog(
                App.getFrame(),
                msg,
                Local.getString("Remove event"),
                JOptionPane.YES_NO_OPTION);
        if (n != JOptionPane.YES_OPTION) return;

        for(int i=0; i< eventsTable.getSelectedRows().length;i++) {
			ev = (net.sf.memoranda.Event) eventsTable.getModel().getValueAt(
                  eventsTable.getSelectedRows()[i], EventsTable.EVENT);
        EventsManager.removeEvent(ev);
		}
        eventsTable.getSelectionModel().clearSelection();
/*        CurrentStorage.get().storeEventsManager();
        eventsTable.refresh();
        EventsScheduler.init();
        parentPanel.calendar.jnCalendar.updateUI();
        parentPanel.updateIndicators();
*/ saveEvents();  
  }
 
开发者ID:ser316asu,项目名称:Reinickendorf_SER316,代码行数:37,代码来源:EventsPanel.java

示例5: StickerConfirmation

import net.sf.memoranda.util.Local; //导入方法依赖的package包/类
public StickerConfirmation(Frame frame) {
        super(frame, Local.getString("Sticker"), true);
        try {
                jbInit();
                pack();
        } catch (Exception ex) {
                new ExceptionDialog(ex);
        }
}
 
开发者ID:ser316asu,项目名称:Reinickendorf_SER316,代码行数:10,代码来源:StickerConfirmation.java

示例6: getPriorityString

import net.sf.memoranda.util.Local; //导入方法依赖的package包/类
String getPriorityString(int p) {
    switch (p) {
    case Task.PRIORITY_NORMAL:
        return Local.getString("Normal");
    case Task.PRIORITY_LOW:
        return Local.getString("Low");
    case Task.PRIORITY_LOWEST:
        return Local.getString("Lowest");
    case Task.PRIORITY_HIGH:
        return Local.getString("High");
    case Task.PRIORITY_HIGHEST:
        return Local.getString("Highest");
    }
    return "";
}
 
开发者ID:ser316asu,项目名称:Neukoelln_SER316,代码行数:16,代码来源:TaskTableModel.java

示例7: removeResB_actionPerformed

import net.sf.memoranda.util.Local; //导入方法依赖的package包/类
void removeResB_actionPerformed(ActionEvent e) {
    int[] toRemove = resourcesTable.getSelectedRows();
    String msg = "";
    if (toRemove.length == 1)
        msg =
            Local.getString("Remove the shortcut to resource")
                + "\n'"
                + resourcesTable.getModel().getValueAt(toRemove[0], 0)
                + "'";

    else
        msg = Local.getString("Remove") + " " + toRemove.length + " " + Local.getString("shortcuts");
    msg +=
        "\n"
        + Local.getString("Are you sure?");
    int n =
        JOptionPane.showConfirmDialog(
            App.getFrame(),
            msg,
            Local.getString("Remove resource"),
            JOptionPane.YES_NO_OPTION);
    if (n != JOptionPane.YES_OPTION)
        return;
    for (int i = 0; i < toRemove.length; i++) {        	
    		CurrentProject.getResourcesList().removeResource(
                    ((Resource) resourcesTable.getModel().getValueAt(toRemove[i], ResourcesTable._RESOURCE)).getPath());
    }
    resourcesTable.tableChanged();
}
 
开发者ID:ser316asu,项目名称:SER316-Ingolstadt,代码行数:30,代码来源:ResourcesPanel.java

示例8: StickerExpand

import net.sf.memoranda.util.Local; //导入方法依赖的package包/类
public StickerExpand(Frame frame,String txt, String backcolor, String fontcolor, String priority) {
	super(frame, Local.getString("Sticker")+" ["+priority+"]" , true);
	this.txt=txt;
	this.backGroundColor=Color.decode(backcolor);
	this.foreGroundColor=Color.decode(fontcolor);
	try {
		jbInit();
		pack();
	} catch (Exception ex) {
		new ExceptionDialog(ex);
	}
}
 
开发者ID:ser316asu,项目名称:Reinickendorf_SER316,代码行数:13,代码来源:StickerExpand.java

示例9: EventsTableModel

import net.sf.memoranda.util.Local; //导入方法依赖的package包/类
EventsTableModel() {
    super();
    if(Configuration.get("FIRST_DAY_OF_WEEK").equals("mon")){
    	columnNames = new String[]{
                Local.getString("Monday"),
                Local.getString("Tuesday"),
                Local.getString("Wednesday"),
                Local.getString("Thursday"),
                Local.getString("Friday"),
                Local.getString("Saturday"),
                Local.getString("Sunday")};
    }
}
 
开发者ID:ser316asu,项目名称:SER316-Dresden,代码行数:14,代码来源:EventsTableWeekly.java

示例10: getStatusString

import net.sf.memoranda.util.Local; //导入方法依赖的package包/类
String getStatusString(int status) {
    switch (status) {
        case Project.ACTIVE :
            return Local.getString("Active");
        case Project.COMPLETED :
            return Local.getString("Completed");
        case Project.FAILED :
            return Local.getString("Failed");
        case Project.FROZEN :
            return Local.getString("Frozen");
        case Project.SCHEDULED :
            return Local.getString("Scheduled");
    }
    return "";
}
 
开发者ID:ser316asu,项目名称:SER316-Ingolstadt,代码行数:16,代码来源:ProjectsTablePanel.java

示例11: newTypeB_actionPerformed

import net.sf.memoranda.util.Local; //导入方法依赖的package包/类
void newTypeB_actionPerformed(ActionEvent e) {
    EditTypeDialog dlg = new EditTypeDialog(App.getFrame(), Local.getString("New resource type"));
    Dimension dlgSize = new Dimension(420, 420);
    dlg.setSize(dlgSize);
    Dimension frmSize = App.getFrame().getSize();
    Point loc = App.getFrame().getLocation();
    dlg.setLocation((frmSize.width - dlgSize.width) / 2 + loc.x, (frmSize.height - dlgSize.height) / 2 + loc.y);
    dlg.extField.setText(ext);
    dlg.descField.setText(ext);
    dlg.appPanel.argumentsField.setText("$1");
    dlg.iconLabel.setIcon(
        new ImageIcon(
            net.sf.memoranda.ui.AppFrame.class.getResource("resources/icons/mimetypes/default.png")));
    dlg.setVisible(true);
    if (dlg.CANCELLED)
        return;
    String typeId = Util.generateId();
    MimeType mt = MimeTypesList.addMimeType(typeId);
    String[] exts = dlg.extField.getText().trim().split(" ");
    for (int i = 0; i < exts.length; i++)
        mt.addExtension(exts[i]);
    mt.setLabel(dlg.descField.getText());
    AppList appList = MimeTypesList.getAppList();
    if (dlg.appPanel.applicationField.getText().length() > 0) {
        File f = new File(dlg.appPanel.applicationField.getText());
        String appId = Util.generateId();
        appList.addApp(
            appId,
            f.getParent().replace('\\', '/'),
            f.getName().replace('\\', '/'),
            dlg.appPanel.argumentsField.getText());
        mt.setApp(appId);
    }
    if (dlg.iconPath.length() > 0)
        mt.setIconPath(dlg.iconPath);
    CurrentStorage.get().storeMimeTypesList();
    this.initTypesList();
    typesList.setSelectedValue(mt, true);
}
 
开发者ID:ser316asu,项目名称:SER316-Ingolstadt,代码行数:40,代码来源:ResourceTypePanel.java

示例12: newResB_actionPerformed

import net.sf.memoranda.util.Local; //导入方法依赖的package包/类
void newResB_actionPerformed(ActionEvent e) {
	AddResourceDialog dlg = new AddResourceDialog(App.getFrame(), Local.getString("New resource"));
	Dimension frmSize = App.getFrame().getSize();
	Point loc = App.getFrame().getLocation();
	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;
	if (dlg.localFileRB.isSelected()) {
		String fpath = dlg.pathField.getText();
		String description = dlg.descriptionField.getText();
		MimeType mt = MimeTypesList.getMimeTypeForFile(fpath);
		if (mt.getMimeTypeId().equals("__UNKNOWN")) {
			mt = addResourceType(fpath);
			if (mt == null)
				return;
		}
		if (!checkApp(mt))
			return;
		// if file if projectFile, than copy the file and change url.
		if (dlg.projectFileCB.isSelected()) {
			fpath = copyFileToProjectDir(fpath);
			CurrentProject.getResourcesList().addResource(fpath, description, false, true);
		} else
			CurrentProject.getResourcesList().addResource(fpath, description);
		resourcesTable.tableChanged();
	} else {
		if (!Util.checkBrowser())
			return;
		CurrentProject.getResourcesList().addResource(dlg.urlField.getText(), dlg.descriptionField.getText(), true,
				false);
		resourcesTable.tableChanged();
	}
}
 
开发者ID:ser316asu,项目名称:Dahlem_SER316,代码行数:36,代码来源:ResourcesPanel.java

示例13: ppClearNote_actionPerformed

import net.sf.memoranda.util.Local; //导入方法依赖的package包/类
void ppClearNote_actionPerformed(ActionEvent e) {
	String msg;
	if (notesList.getSelectedIndices().length > 1)
		msg = Local.getString(Local.getString("Clear")) + " " + notesList.getSelectedIndices().length + " "
				+ Local.getString("notes") + "\n" + Local.getString("Are you sure?");
	else
		msg = Local.getString("Clear note") + "\n'"
				+ ((Note) notesList.getNote(notesList.getSelectedIndex())).getDate().getFullDateString() + "'\n"
				+ Local.getString("Are you sure?");

	int n = JOptionPane.showConfirmDialog(App.getFrame(), msg, Local.getString("Clear note"),
			JOptionPane.YES_NO_OPTION);
	if (n != JOptionPane.YES_OPTION)
		return;

	for (int i = 0; i < notesList.getSelectedIndices().length; i++) {
		Note note = (Note) notesList.getNote(notesList.getSelectedIndices()[i]);
		if (CurrentProject.getNoteList().getActiveNote() != null
				&& note.getDate().equals(CurrentProject.getNoteList().getActiveNote().getDate())) {
			/* Debug */ System.out.println("[DEBUG] Current note removed");
			CurrentNote.set(null, true);
		}
		CurrentProject.getNoteList().removeNote(note.getDate(), note.getId());
		CurrentStorage.get().removeNote(note);
	}
	bookmarksListPanel.notesList.update();
	searchPanel.notesList.update();
	notesListPanel.notesList.update();
	notesList.updateUI();
	notesList.clearSelection();
	// notesList.requestFocus();*/
	// ((AppFrame)App.getFrame()).workPanel.dailyItemsPanel.editorPanel.editor.requestFocus();
}
 
开发者ID:ser316asu,项目名称:Dahlem_SER316,代码行数:34,代码来源:NotesControlPanel.java

示例14: editTimeB_actionPerformed

import net.sf.memoranda.util.Local; //导入方法依赖的package包/类
void editTimeB_actionPerformed(ActionEvent e) {
	TimeLog t =
			CurrentProject.getTimeLogList().getTimeLog(
					timeLogTable.getModel().getValueAt(timeLogTable.getSelectedRow(), TimeLogTable.TIMELOG_ID).toString());


	TimeLogDialogue dlg = new TimeLogDialogue(App.getFrame(), Local.getString("Edit time"));

	Dimension frmSize = App.getFrame().getSize();
	Point loc = App.getFrame().getLocation();
	dlg.setLocation((frmSize.width - dlg.getSize().width) / 2 + loc.x, (frmSize.height - dlg.getSize().height) / 2 + loc.y);

	dlg.taskSelect.setSelectedIndex(0);
	if (!dlg.taskSelect.getItemAt(0).equals(t.getTimeLogTask())){
		System.out.println("if worked");
		for (int i = 0; i < dlg.taskSelect.getItemCount(); i++){
			dlg.taskSelect.setSelectedIndex(i);
			if (dlg.taskSelect.getItemAt(i).equals(t.getTimeLogTask())){
				i = dlg.taskSelect.getItemCount();
			}
		}
	}

	dlg.descriptionField.setText(t.getDescription());
	dlg.startHrsField.setText(String.valueOf(t.getStartHour()));
	dlg.startMinsField.setText(String.format("%02d",t.getStartMin()));
	dlg.amPmBox1.setSelectedIndex(t.getStartPeriod());
	dlg.endHrsField.setText(String.valueOf(t.getEndHour()));
	dlg.endMinsField.setText(String.format("%02d",t.getEndMin()));
	dlg.amPmBox2.setSelectedIndex(t.getEndPeriod());
	dlg.interruptField.setText(String.valueOf(t.getInterruptTime()));

	dlg.startDate.getModel().setValue(t.getStartDate().getDate());
	dlg.setVisible(true);

	if (dlg.CANCELLED)
		return;

	if(dlg.validTimes()){

		CalendarDate sd = new CalendarDate((Date) dlg.startDate.getModel().getValue());

		t.setStartDate(sd);
		String selectedText = (String) dlg.taskSelect.getItemAt(dlg.taskSelect.getSelectedIndex());

		t.setTimeLogTask(selectedText);
		t.setDescription(dlg.descriptionField.getText());

		//everything here down needs to be sent to object
		System.out.println((dlg.phaseCB.getSelectedIndex()));

		t.setStartHour(Integer.valueOf(dlg.startHrsField.getText()));
		t.setStartPeriod(dlg.amPmBox1.getSelectedIndex());
		t.setStartMin(Integer.valueOf(dlg.startMinsField.getText()));
		// double startTime = t.getStartTime();

		t.setEndHour(Integer.valueOf(dlg.endHrsField.getText()));
		t.setEndPeriod(dlg.amPmBox2.getSelectedIndex());
		t.setEndMin(Integer.valueOf(dlg.endMinsField.getText()));
		// double endTime = t.getEndTime();

		t.setInterruptTime(Integer.valueOf(dlg.interruptField.getText()));
		t.setDeltaTime();

		//to here

		timeLogTable.tableChanged();
		parentPanel.updateIndicators();
		parentPanel.tasksPanel.taskTable.tableChanged();
		parentPanel.tasksPanel.taskTable.updateUI();
		//taskTable.updateUI();
	}
}
 
开发者ID:ser316asu,项目名称:Wilmersdorf_SER316,代码行数:74,代码来源:TimeLogPanel.java

示例15: ppExport_actionPerformed

import net.sf.memoranda.util.Local; //导入方法依赖的package包/类
protected void ppExport_actionPerformed(ActionEvent e) {
// Fix until Sun's JVM supports more locales...
UIManager.put(
        "FileChooser.lookInLabelText",
        Local.getString("Save in:"));
UIManager.put(
        "FileChooser.upFolderToolTipText",
        Local.getString("Up One Level"));
UIManager.put(
        "FileChooser.newFolderToolTipText",
        Local.getString("Create New Folder"));
UIManager.put(
        "FileChooser.listViewButtonToolTipText",
        Local.getString("List"));
UIManager.put(
        "FileChooser.detailsViewButtonToolTipText",
        Local.getString("Details"));
UIManager.put(
        "FileChooser.fileNameLabelText",
        Local.getString("File Name:"));
UIManager.put(
        "FileChooser.filesOfTypeLabelText",
        Local.getString("Files of Type:"));
UIManager.put("FileChooser.saveButtonText", Local.getString("Save"));
UIManager.put(
        "FileChooser.saveButtonToolTipText",
        Local.getString("Save selected file"));
UIManager.put(
        "FileChooser.cancelButtonText",
        Local.getString("Cancel"));
UIManager.put(
        "FileChooser.cancelButtonToolTipText",
        Local.getString("Cancel"));

JFileChooser chooser = new JFileChooser();
chooser.setFileHidingEnabled(false);
chooser.setDialogTitle(Local.getString("Export notes"));
chooser.setAcceptAllFileFilterUsed(false);
chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
chooser.addChoosableFileFilter(
        new AllFilesFilter(AllFilesFilter.XHTML));
chooser.addChoosableFileFilter(new AllFilesFilter(AllFilesFilter.HTML));

String lastSel = (String) Context.get("LAST_SELECTED_EXPORT_FILE");
if (lastSel != null)
        chooser.setCurrentDirectory(new File(lastSel));

ProjectExportDialog dlg =
        new ProjectExportDialog(
                App.getFrame(),
                Local.getString("Export notes"),
                chooser);
String enc = (String) Context.get("EXPORT_FILE_ENCODING");
if (enc != null)
        dlg.encCB.setSelectedItem(enc);
Dimension dlgSize = new Dimension(550, 500);
dlg.setSize(dlgSize);
Dimension frmSize = App.getFrame().getSize();
Point loc = App.getFrame().getLocation();
dlg.setLocation(
        (frmSize.width - dlgSize.width) / 2 + loc.x,
        (frmSize.height - dlgSize.height) / 2 + loc.y);
dlg.setVisible(true);
if (dlg.CANCELLED)
        return;                
        Context.put(
                "LAST_SELECTED_EXPORT_FILE",
                chooser.getSelectedFile().getPath());                
int ei = dlg.encCB.getSelectedIndex();
enc = null;
if (ei == 1)
        enc = "UTF-8";
boolean nument = (ei == 2);
File f = chooser.getSelectedFile();
boolean xhtml =
        chooser.getFileFilter().getDescription().indexOf("XHTML") > -1;
 CurrentProject.save();
 ProjectExporter.export(CurrentProject.get(), chooser.getSelectedFile(), enc, xhtml, 
                 false, true, nument, false, false); 
}
 
开发者ID:ser316asu,项目名称:Neukoelln_SER316,代码行数:81,代码来源:AppFrame.java


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