本文整理汇总了Java中net.sf.memoranda.util.Context.put方法的典型用法代码示例。如果您正苦于以下问题:Java Context.put方法的具体用法?Java Context.put怎么用?Java Context.put使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sf.memoranda.util.Context
的用法示例。
在下文中一共展示了Context.put方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doExit
import net.sf.memoranda.util.Context; //导入方法依赖的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);
}
示例2: stickerColor_actionPerformed
import net.sf.memoranda.util.Context; //导入方法依赖的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()));
}
示例3: textColor_actionPerformed
import net.sf.memoranda.util.Context; //导入方法依赖的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()));
}
示例4: fontSize_actionPerformed
import net.sf.memoranda.util.Context; //导入方法依赖的package包/类
protected void fontSize_actionPerformed(ActionEvent e) {
int i=fontSize.getSelectedIndex();
if (i < fontLabels.length){
Font f= stickerText.getFont();
stickerText.setFont(new Font(f.getFontName(), f.PLAIN, (i*5)+10));
}
fontSize.setSelectedIndex(i);
Context.put("TEXT_SIZE", new Integer(stickerText.getFont().getSize()));
}
示例5: set
import net.sf.memoranda.util.Context; //导入方法依赖的package包/类
public static void set(Project project) {
if (project.getID().equals(_project.getID())) return;
TaskList newtasklist = CurrentStorage.get().openTaskList(project);
NoteList newnotelist = CurrentStorage.get().openNoteList(project);
ResourcesList newresources = CurrentStorage.get().openResourcesList(project);
notifyListenersBefore(project, newnotelist, newtasklist, newresources);
_project = project;
_tasklist = newtasklist;
_notelist = newnotelist;
_resources = newresources;
notifyListenersAfter();
Context.put("LAST_OPENED_PROJECT_ID", project.getID());
}
示例6: toggleShowActiveOnly_actionPerformed
import net.sf.memoranda.util.Context; //导入方法依赖的package包/类
void toggleShowActiveOnly_actionPerformed(ActionEvent e) {
Context.put(
"SHOW_ACTIVE_TASKS_ONLY",
new Boolean(ppShowActiveOnlyChB.isSelected()));
taskTable.tableChanged();
}
示例7: notesB_actionPerformed
import net.sf.memoranda.util.Context; //导入方法依赖的package包/类
public void notesB_actionPerformed(ActionEvent e) {
cardLayout1.show(panel, "DAILYITEMS");
dailyItemsPanel.selectPanel("NOTES");
setCurrentButton(notesB);
Context.put("CURRENT_PANEL", "NOTES");
}
示例8: tasksB_actionPerformed
import net.sf.memoranda.util.Context; //导入方法依赖的package包/类
public void tasksB_actionPerformed(ActionEvent e) {
cardLayout1.show(panel, "DAILYITEMS");
dailyItemsPanel.selectPanel("TASKS");
setCurrentButton(tasksB, GoogleMaterialDesignIcons.VIEW_LIST);
Context.put("CURRENT_PANEL", "TASKS");
}
示例9: tasksB_actionPerformed
import net.sf.memoranda.util.Context; //导入方法依赖的package包/类
public void tasksB_actionPerformed(ActionEvent e) {
cardLayout1.show(panel, "DAILYITEMS");
dailyItemsPanel.selectPanel("TASKS");
setCurrentButton(tasksB);
Context.put("CURRENT_PANEL", "TASKS");
}
示例10: ppShowActiveOnlyChB_actionPerformed
import net.sf.memoranda.util.Context; //导入方法依赖的package包/类
void ppShowActiveOnlyChB_actionPerformed(ActionEvent e) {
prjTablePanel.setShowActiveOnly(ppShowActiveOnlyChB.isSelected());
Context.put(
"SHOW_ACTIVE_PROJECTS_ONLY",
new Boolean(ppShowActiveOnlyChB.isSelected()));
}
示例11: filesB_actionPerformed
import net.sf.memoranda.util.Context; //导入方法依赖的package包/类
public void filesB_actionPerformed(ActionEvent e) {
cardLayout1.show(panel, "FILES");
setCurrentButton(filesB);
Context.put("CURRENT_PANEL", "FILES");
}
示例12: agendaB_actionPerformed
import net.sf.memoranda.util.Context; //导入方法依赖的package包/类
public void agendaB_actionPerformed(ActionEvent e) {
cardLayout1.show(panel, "DAILYITEMS");
dailyItemsPanel.selectPanel("AGENDA");
setCurrentButton(agendaB);
Context.put("CURRENT_PANEL", "AGENDA");
}
示例13: importB_actionPerformed
import net.sf.memoranda.util.Context; //导入方法依赖的package包/类
void importB_actionPerformed(ActionEvent e) {
// Fix until Sun's JVM supports more locales...
UIManager.put("FileChooser.lookInLabelText", Local
.getString("Look 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.openButtonText", Local.getString("Open"));
UIManager.put("FileChooser.openButtonToolTipText", Local
.getString("Open 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("Insert file"));
chooser.setAcceptAllFileFilterUsed(false);
chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
chooser.addChoosableFileFilter(new AllFilesFilter(AllFilesFilter.HTML));
chooser.setPreferredSize(new Dimension(550, 375));
String lastSel = (String) Context.get("LAST_SELECTED_IMPORT_FILE");
if (lastSel != null)
chooser.setCurrentDirectory(new java.io.File(lastSel));
if (chooser.showOpenDialog(this) != JFileChooser.APPROVE_OPTION)
return;
Context.put("LAST_SELECTED_IMPORT_FILE", chooser.getSelectedFile()
.getPath());
File f = chooser.getSelectedFile();
new HTMLFileImport(f, editor);
}
示例14: eventsB_actionPerformed
import net.sf.memoranda.util.Context; //导入方法依赖的package包/类
public void eventsB_actionPerformed(ActionEvent e) {
cardLayout1.show(panel, "DAILYITEMS");
dailyItemsPanel.selectPanel("EVENTS");
setCurrentButton(eventsB);
Context.put("CURRENT_PANEL", "EVENTS");
}