diff --git a/designer/src/com/fr/design/actions/server/ServerConfigManagerAction.java b/designer/src/com/fr/design/actions/server/ServerConfigManagerAction.java index 5cf98c70fb..75bcd7621d 100644 --- a/designer/src/com/fr/design/actions/server/ServerConfigManagerAction.java +++ b/designer/src/com/fr/design/actions/server/ServerConfigManagerAction.java @@ -26,7 +26,7 @@ import java.awt.event.ActionEvent; public class ServerConfigManagerAction extends UpdateAction { public ServerConfigManagerAction() { this.setMenuKeySet(SERVER_CONFIG_MANAGER); - this.setName(getMenuKeySet().getMenuKeySetName()+ "..."); + this.setName(getMenuKeySet().getMenuKeySetName() + "..."); this.setMnemonic(getMenuKeySet().getMnemonic()); this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/m_web/edit.png")); this.setSearchText(new EditReportServerParameterPane().getAllComponents()); @@ -34,24 +34,25 @@ public class ServerConfigManagerAction extends UpdateAction { /** * 动作 + * * @param e 事件 */ public void actionPerformed(ActionEvent e) { final ServerConfig config = ServerConfig.getInstance(); final EditReportServerParameterPane editReportServerParameterPane = new EditReportServerParameterPane() { @Override - public void complete() { - populate((ServerConfig)config.clone()); + public void complete() { + populate(config.copy()); } }; final BasicDialog editReportServerParameterDialog = editReportServerParameterPane.showWindow( - DesignerContext.getDesignerFrame() + DesignerContext.getDesignerFrame() ); editReportServerParameterDialog.addDialogActionListener(new DialogActionAdapter() { @Override - public void doOk() { + public void doOk() { Configurations.update(new Worker() { @Override public void run() { @@ -70,7 +71,7 @@ public class ServerConfigManagerAction extends UpdateAction { } @Override - public void update() { + public void update() { this.setEnabled(true); } diff --git a/designer/src/com/fr/design/actions/server/StyleListAction.java b/designer/src/com/fr/design/actions/server/StyleListAction.java index 39b2648a8e..a19c6ec624 100644 --- a/designer/src/com/fr/design/actions/server/StyleListAction.java +++ b/designer/src/com/fr/design/actions/server/StyleListAction.java @@ -55,7 +55,7 @@ public class StyleListAction extends UpdateAction { } }); - styleListPane.populate((ServerConfig) ServerConfig.getInstance().clone()); + styleListPane.populate(ServerConfig.getInstance().copy()); styleListDialog.setVisible(true); } diff --git a/designer/src/com/fr/design/actions/server/WidgetManagerAction.java b/designer/src/com/fr/design/actions/server/WidgetManagerAction.java index 51dde470cc..591f0d706c 100644 --- a/designer/src/com/fr/design/actions/server/WidgetManagerAction.java +++ b/designer/src/com/fr/design/actions/server/WidgetManagerAction.java @@ -21,13 +21,14 @@ import java.awt.event.ActionEvent; public class WidgetManagerAction extends UpdateAction { public WidgetManagerAction() { this.setMenuKeySet(WIDGET_MANAGER); - this.setName(getMenuKeySet().getMenuKeySetName()+ "..."); + this.setName(getMenuKeySet().getMenuKeySetName() + "..."); this.setMnemonic(getMenuKeySet().getMnemonic()); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_format/modified.png")); } /** * 动作 + * * @param e 事件 */ public void actionPerformed(ActionEvent e) { @@ -35,14 +36,14 @@ public class WidgetManagerAction extends UpdateAction { final WidgetInfoConfig widgetManager = WidgetInfoConfig.getInstance(); final WidgetManagerPane widgetManagerPane = new WidgetManagerPane() { @Override - public void complete() { - populate((WidgetInfoConfig)widgetManager.clone()); + public void complete() { + populate(widgetManager.copy()); } }; - BasicDialog widgetConfigDialog = widgetManagerPane.showLargeWindow(designerFrame,new DialogActionAdapter() { + BasicDialog widgetConfigDialog = widgetManagerPane.showLargeWindow(designerFrame, new DialogActionAdapter() { @Override - public void doOk() { + public void doOk() { Configurations.update(new Worker() { @Override public void run() { @@ -66,7 +67,7 @@ public class WidgetManagerAction extends UpdateAction { } @Override - public void update() { + public void update() { this.setEnabled(true); } diff --git a/designer_base/src/com/fr/design/actions/server/FunctionManagerAction.java b/designer_base/src/com/fr/design/actions/server/FunctionManagerAction.java index 05f4760014..a65972ebf0 100644 --- a/designer_base/src/com/fr/design/actions/server/FunctionManagerAction.java +++ b/designer_base/src/com/fr/design/actions/server/FunctionManagerAction.java @@ -59,7 +59,7 @@ public class FunctionManagerAction extends UpdateAction { } }); - functionManagerPane.populate((FunctionConfig) functionManager.clone()); + functionManagerPane.populate(functionManager.copy()); functionManagerDialog.setVisible(true); } diff --git a/designer_base/src/com/fr/design/actions/server/GlobalParameterAction.java b/designer_base/src/com/fr/design/actions/server/GlobalParameterAction.java index cb5dc33756..e84f666e57 100644 --- a/designer_base/src/com/fr/design/actions/server/GlobalParameterAction.java +++ b/designer_base/src/com/fr/design/actions/server/GlobalParameterAction.java @@ -47,7 +47,7 @@ public class GlobalParameterAction extends UpdateAction { //marks:读取服务器配置信息 final ServerConfig configManager = ServerConfig.getInstance(); - parameterManagerPane.populate((ServerConfig) configManager.clone()); + parameterManagerPane.populate(configManager.copy()); parameterManagerDialog.addDialogActionListener(new DialogActionAdapter() { public void doOk() { Configurations.update(new Worker() { diff --git a/designer_base/src/com/fr/design/actions/server/GlobalTableDataAction.java b/designer_base/src/com/fr/design/actions/server/GlobalTableDataAction.java index e8a532102c..9a06cccb04 100644 --- a/designer_base/src/com/fr/design/actions/server/GlobalTableDataAction.java +++ b/designer_base/src/com/fr/design/actions/server/GlobalTableDataAction.java @@ -61,6 +61,7 @@ public class GlobalTableDataAction extends UpdateAction implements ResponseDataS /** * 动作 + * * @param evt 事件 */ public void actionPerformed(ActionEvent evt) { @@ -68,7 +69,7 @@ public class GlobalTableDataAction extends UpdateAction implements ResponseDataS final TableDataConfig tableDataConfig = TableDataConfig.getInstance(); final TableDataManagerPane globalTableDataPane = new TableDataManagerPane() { public void complete() { - populate((TableDataConfig) tableDataConfig.clone()); + populate(tableDataConfig.copy()); } protected void renameConnection(final String oldName, final String newName) { diff --git a/designer_base/src/com/fr/design/actions/server/ProcedureListAction.java b/designer_base/src/com/fr/design/actions/server/ProcedureListAction.java index 2b95eae11c..a95c8fae0e 100644 --- a/designer_base/src/com/fr/design/actions/server/ProcedureListAction.java +++ b/designer_base/src/com/fr/design/actions/server/ProcedureListAction.java @@ -1,7 +1,6 @@ package com.fr.design.actions.server; import com.fr.base.BaseUtils; -import com.fr.base.FRContext; import com.fr.config.Configuration; import com.fr.design.DesignModelAdapter; import com.fr.design.actions.UpdateAction; @@ -20,50 +19,49 @@ import com.fr.transaction.Worker; import java.awt.event.ActionEvent; public class ProcedureListAction extends UpdateAction { - public ProcedureListAction() { - this.setName(Inter.getLocText("Datasource-Stored_Procedure") + "(P)" + "..."); - this.setMnemonic('P'); - this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/data/store_procedure.png")); - } + public ProcedureListAction() { + this.setName(Inter.getLocText("Datasource-Stored_Procedure") + "(P)" + "..."); + this.setMnemonic('P'); + this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/data/store_procedure.png")); + } /** * 事件触发操作 * * @param evt 事件 - * */ - public void actionPerformed(ActionEvent evt) { - DesignerFrame designerFrame = DesignerContext.getDesignerFrame(); + public void actionPerformed(ActionEvent evt) { + DesignerFrame designerFrame = DesignerContext.getDesignerFrame(); - final ProcedureConfig procedureConfig = ProcedureConfig.getInstance(); - final ProcedureManagerPane databaseManagerPane = new ProcedureManagerPane() { - public void complete() { - populate((ProcedureConfig)procedureConfig.clone()); - } - }; - BasicDialog databaseListDialog = databaseManagerPane.showLargeWindow(designerFrame,null); - databaseListDialog.addDialogActionListener(new DialogActionAdapter() { - public void doOk() { - Configurations.update(new Worker() { - @Override - public void run() { - DesignTableDataManager.clearGlobalDs(); - databaseManagerPane.update(procedureConfig); - TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()); - } + final ProcedureConfig procedureConfig = ProcedureConfig.getInstance(); + final ProcedureManagerPane databaseManagerPane = new ProcedureManagerPane() { + public void complete() { + populate(procedureConfig.copy()); + } + }; + BasicDialog databaseListDialog = databaseManagerPane.showLargeWindow(designerFrame, null); + databaseListDialog.addDialogActionListener(new DialogActionAdapter() { + public void doOk() { + Configurations.update(new Worker() { + @Override + public void run() { + DesignTableDataManager.clearGlobalDs(); + databaseManagerPane.update(procedureConfig); + TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()); + } - @Override - public Class[] targets() { - return new Class[]{ProcedureConfig.class}; - } - }); + @Override + public Class[] targets() { + return new Class[]{ProcedureConfig.class}; + } + }); - } - }); - databaseListDialog.setVisible(true); - } + } + }); + databaseListDialog.setVisible(true); + } - public void update() { - this.setEnabled(true); - } + public void update() { + this.setEnabled(true); + } } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/data/datapane/connect/ConnectionComboBoxPanel.java b/designer_base/src/com/fr/design/data/datapane/connect/ConnectionComboBoxPanel.java index 232bbc00ec..5c55198d06 100644 --- a/designer_base/src/com/fr/design/data/datapane/connect/ConnectionComboBoxPanel.java +++ b/designer_base/src/com/fr/design/data/datapane/connect/ConnectionComboBoxPanel.java @@ -89,7 +89,8 @@ public class ConnectionComboBoxPanel extends ItemEditableComboBoxPanel { protected void editItems() { final ConnectionListPane connectionListPane = new ConnectionListPane(); final ConnectionConfig connectionConfig = ConnectionConfig.getInstance(); - connectionListPane.populate((ConnectionConfig) connectionConfig.clone()); + ConnectionConfig cloned = connectionConfig.copy(); + connectionListPane.populate(cloned); final BasicDialog connectionListDialog = connectionListPane.showLargeWindow( SwingUtilities.getWindowAncestor(ConnectionComboBoxPanel.this), null); connectionListDialog.addDialogActionListener(new DialogActionAdapter() {