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


Java Local类代码示例

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


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

示例1: getTime

import net.sf.memoranda.util.Local; //导入依赖的package包/类
/**
   * @see net.sf.memoranda.Event#getTime()
   */
  public Date getTime() {
  	//Deprecated methods
//Date d = new Date();
//d.setHours(getHour());
//d.setMinutes(getMinute());
//d.setSeconds(0);
//End deprecated methods

Date d = new Date(); //Revision to fix deprecated methods (jcscoobyrs) 12-NOV-2003 14:26:00
Calendar calendar = new GregorianCalendar(Local.getCurrentLocale()); //Revision to fix deprecated methods (jcscoobyrs) 12-NOV-2003 14:26:00
calendar.setTime(d); //Revision to fix deprecated methods (jcscoobyrs) 12-NOV-2003 14:26:00
calendar.set(Calendar.HOUR_OF_DAY, getHour()); //Revision to fix deprecated methods (jcscoobyrs) 12-NOV-2003 14:26:00
calendar.set(Calendar.MINUTE, getMinute()); //Revision to fix deprecated methods (jcscoobyrs) 12-NOV-2003 14:26:00
calendar.set(Calendar.SECOND, 0); //Revision to fix deprecated methods (jcscoobyrs) 12-NOV-2003 14:26:00
d = calendar.getTime(); //Revision to fix deprecated methods (jcscoobyrs) 12-NOV-2003 14:26:00
      return d;
  }
 
开发者ID:ser316asu,项目名称:Neukoelln_SER316,代码行数:21,代码来源:EventImpl.java

示例2: 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-Munich,代码行数:19,代码来源:AppFrame.java

示例3: textColor_actionPerformed

import net.sf.memoranda.util.Local; //导入依赖的package包/类
void textColor_actionPerformed(ActionEvent e) {
	int i=textColor.getSelectedIndex();
	if (i < colors.length){
		if(i!=stickerColor.getSelectedIndex()){
			stickerText.setForeground(colors[i]);
			textColor.setSelectedIndex(i);
		}
		else{
			textColor.setSelectedIndex(i+1);
			stickerText.setForeground(colors[i+1]);
			JOptionPane.showMessageDialog(this, Local.getString("SAME FOREGROUND COLOR"), "Error", 0);
		}
		stickerText.setForeground(colors[textColor.getSelectedIndex()]);
	}
	else {
		Color c =
			JColorChooser.showDialog(
				this,
				Local.getString("Text color"),
				stickerText.getForeground());
		if (c != null)
			stickerText.setForeground(c);
	}
	Context.put("TEXT_COLOR", new Integer(stickerText.getForeground().getRGB()));		
}
 
开发者ID:ser316asu,项目名称:Reinickendorf_SER316,代码行数:26,代码来源:StickerDialog.java

示例4: 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,项目名称:SER316-Munich,代码行数:21,代码来源:AllFilesFilter.java

示例5: stickerColor_actionPerformed

import net.sf.memoranda.util.Local; //导入依赖的package包/类
void stickerColor_actionPerformed(ActionEvent e) {
	int i=stickerColor.getSelectedIndex();
	if (i< colors.length){
		if(i!=textColor.getSelectedIndex()){
			stickerText.setBackground(colors[i]);
			stickerColor.setSelectedIndex(i);
		}
		else{
			stickerColor.setSelectedIndex(i+1);
			stickerText.setBackground(colors[i+1]);
			JOptionPane.showMessageDialog(this, Local.getString("SAME BACKGROUND COLOR"), "Error", 0);
		}
		stickerText.setForeground(colors[textColor.getSelectedIndex()]);
	}
	else {
		Color c =
			JColorChooser.showDialog(
				this,
				Local.getString("Sticker color"),
				stickerText.getBackground());
		if (c != null)
			stickerText.setBackground(c);
	}
	Context.put("STICKER_COLOR", new Integer(stickerText.getBackground().getRGB()));
}
 
开发者ID:ser316asu,项目名称:SER316-Ingolstadt,代码行数:26,代码来源:StickerDialog.java

示例6: import_file

import net.sf.memoranda.util.Local; //导入依赖的package包/类
public boolean import_file(){
	AppFrame app = new AppFrame();
	app.p1Import_actionPerformed();
        /*
         We are working on this =)
          
          
          */
	//CANCELLED=false;
	if(CANCELLED==true){}
        

	else
		JOptionPane.showMessageDialog(null,Local.getString("Import Canceled."));
        return true;
}
 
开发者ID:ser316asu,项目名称:SER316-Munich,代码行数:17,代码来源:ImportSticker.java

示例7: 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(ICS))
    	return "iCalendar files (*.ics)";
    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,项目名称:SER316-Dresden,代码行数:23,代码来源:AllFilesFilter.java

示例8: getStatusString

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

示例9: getStatusString

import net.sf.memoranda.util.Local; //导入依赖的package包/类
String getStatusString(int status) {
    switch (status) {
    case Task.ACTIVE:
        return Local.getString("Active");
    case Task.DEADLINE:
        return Local.getString("Deadline");
    case Task.COMPLETED:
        return Local.getString("Completed");
    case Task.OVERDUE:
        return Local.getString("Overdue");
    case Task.FROZEN:
        return Local.getString("Frozen");
    case Task.LOCKED:
        return Local.getString("Locked");
    case Task.SCHEDULED:
        return Local.getString("Scheduled");
    }
    return "";
}
 
开发者ID:ser316asu,项目名称:Dahlem_SER316,代码行数:20,代码来源:TaskTableModel.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");
        default:
          return "";
    }
}
 
开发者ID:ser316asu,项目名称:SER316-Dresden,代码行数:17,代码来源:ProjectsTablePanel.java

示例11: StickerDialog

import net.sf.memoranda.util.Local; //导入依赖的package包/类
public StickerDialog(Frame frame) {
	super(frame, Local.getString("Sticker"), true);
	try {
		jbInit();
		pack();
	} catch (Exception ex) {
		new ExceptionDialog(ex);
	}
}
 
开发者ID:ser316asu,项目名称:SER316-Aachen,代码行数:10,代码来源:StickerDialog.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();
        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, false, true);
        }
        else
        	CurrentProject.getResourcesList().addResource(fpath);            	     	
        
        resourcesTable.tableChanged();
    }
    else {
        if (!Util.checkBrowser())
            return;
        CurrentProject.getResourcesList().addResource(dlg.urlField.getText(), true, false);
        resourcesTable.tableChanged();
    }
}
 
开发者ID:ser316asu,项目名称:SER316-Aachen,代码行数:36,代码来源:ResourcesPanel.java

示例13: 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,项目名称:Neukoelln_SER316,代码行数:10,代码来源:StickerConfirmation.java

示例14: TaskTableModel

import net.sf.memoranda.util.Local; //导入依赖的package包/类
/**
 * JAVADOC: Constructor of <code>TaskTableModel</code>
 * 
 * @param root
 */
public TaskTableModel(){
    super(CurrentProject.get());
    if (CurrentProject.get().getType().compareTo(Project.Type.STANDARD) == 0) {
    	columnNames = new String[] {"", Local.getString("To-do"),
    			Local.getString("Start date"), Local.getString("End date"),
    			Local.getString("Priority"), Local.getString("Status"), "% " + Local.getString("done") };
    }
    else {
    	columnNames = new String[] {"", Local.getString("To-do"),
				Local.getString("Start date"), Local.getString("End date"),
				Local.getString("Priority"), Local.getString("Status"), Local.getString("Defects Injected"), 
				Local.getString("Defects Removed"),Local.getString("LOC"), "% " + Local.getString("done") };
    }
}
 
开发者ID:ser316asu,项目名称:Reinickendorf_SER316,代码行数:20,代码来源:TaskTableModel.java

示例15: setStartDateB_actionPerformed

import net.sf.memoranda.util.Local; //导入依赖的package包/类
void setStartDateB_actionPerformed(ActionEvent e) {
    //startCalFrame.setLocation(setStartDateB.getLocation());
    startCalFrame.setSize(200, 190);
    startCalFrame.setTitle(Local.getString("Start date"));
    this.getLayeredPane().add(startCalFrame);
    startCalFrame.show();
}
 
开发者ID:ser316asu,项目名称:SER316-Munich,代码行数:8,代码来源:EventDialog.java


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