XiaXiang
8 years ago
17 changed files with 182 additions and 39 deletions
@ -1,47 +1,49 @@
|
||||
package com.fr.design.actions.file; |
||||
|
||||
import java.awt.event.ActionEvent; |
||||
|
||||
import com.fr.design.DesignerEnvManager; |
||||
import com.fr.design.actions.UpdateAction; |
||||
import com.fr.design.dialog.BasicDialog; |
||||
import com.fr.design.dialog.DialogActionAdapter; |
||||
import com.fr.design.file.HistoryTemplateListPane; |
||||
import com.fr.design.mainframe.DesignerContext; |
||||
import com.fr.design.mainframe.DesignerFrame; |
||||
import com.fr.design.mainframe.JTemplate; |
||||
import com.fr.design.menu.KeySetUtils; |
||||
import com.fr.design.dialog.BasicDialog; |
||||
import com.fr.design.dialog.DialogActionAdapter; |
||||
|
||||
import java.awt.event.ActionEvent; |
||||
|
||||
|
||||
public class PreferenceAction extends UpdateAction { |
||||
public PreferenceAction() { |
||||
public PreferenceAction() { |
||||
this.setMenuKeySet(KeySetUtils.PREFERENCE); |
||||
this.setName(getMenuKeySet().getMenuKeySetName()+"..."); |
||||
this.setName(getMenuKeySet().getMenuKeySetName() + "..."); |
||||
this.setMnemonic(getMenuKeySet().getMnemonic()); |
||||
} |
||||
this.setSearchText(new PreferencePane()); |
||||
} |
||||
|
||||
/** |
||||
* 动作 |
||||
* |
||||
* @param e 事件 |
||||
*/ |
||||
public void actionPerformed(ActionEvent e) { |
||||
final DesignerFrame designerFrame = DesignerContext.getDesignerFrame(); |
||||
|
||||
final PreferencePane preferencePane = new PreferencePane(); |
||||
preferencePane.populate(DesignerEnvManager.getEnvManager()); |
||||
|
||||
BasicDialog basicDialog = preferencePane.showWindow(designerFrame); |
||||
basicDialog.addDialogActionListener(new DialogActionAdapter() { |
||||
public void doOk() { |
||||
preferencePane.update(DesignerEnvManager.getEnvManager()); |
||||
DesignerEnvManager.loadLogSetting(); |
||||
DesignerEnvManager.getEnvManager().saveXMLFile(); |
||||
JTemplate jt = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); |
||||
jt.refreshToolArea(); |
||||
preferencePane.showRestartDialog(); |
||||
} |
||||
}); |
||||
|
||||
basicDialog.setVisible(true); |
||||
} |
||||
public void actionPerformed(ActionEvent e) { |
||||
final DesignerFrame designerFrame = DesignerContext.getDesignerFrame(); |
||||
|
||||
final PreferencePane preferencePane = new PreferencePane(); |
||||
preferencePane.populate(DesignerEnvManager.getEnvManager()); |
||||
|
||||
BasicDialog basicDialog = preferencePane.showWindow(designerFrame); |
||||
basicDialog.addDialogActionListener(new DialogActionAdapter() { |
||||
public void doOk() { |
||||
preferencePane.update(DesignerEnvManager.getEnvManager()); |
||||
DesignerEnvManager.loadLogSetting(); |
||||
DesignerEnvManager.getEnvManager().saveXMLFile(); |
||||
JTemplate jt = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); |
||||
jt.refreshToolArea(); |
||||
preferencePane.showRestartDialog(); |
||||
} |
||||
}); |
||||
|
||||
basicDialog.setVisible(true); |
||||
} |
||||
} |
Loading…
Reference in new issue