Browse Source

无JIRA任务 配置文件克隆

master
RichieJi 7 years ago
parent
commit
5c0f49b7fa
  1. 3
      designer/src/com/fr/design/actions/server/ServerConfigManagerAction.java
  2. 2
      designer/src/com/fr/design/actions/server/StyleListAction.java
  3. 3
      designer/src/com/fr/design/actions/server/WidgetManagerAction.java
  4. 2
      designer_base/src/com/fr/design/actions/server/FunctionManagerAction.java
  5. 2
      designer_base/src/com/fr/design/actions/server/GlobalParameterAction.java
  6. 3
      designer_base/src/com/fr/design/actions/server/GlobalTableDataAction.java
  7. 4
      designer_base/src/com/fr/design/actions/server/ProcedureListAction.java
  8. 3
      designer_base/src/com/fr/design/data/datapane/connect/ConnectionComboBoxPanel.java

3
designer/src/com/fr/design/actions/server/ServerConfigManagerAction.java

@ -34,6 +34,7 @@ public class ServerConfigManagerAction extends UpdateAction {
/** /**
* 动作 * 动作
*
* @param e 事件 * @param e 事件
*/ */
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
@ -41,7 +42,7 @@ public class ServerConfigManagerAction extends UpdateAction {
final EditReportServerParameterPane editReportServerParameterPane = new EditReportServerParameterPane() { final EditReportServerParameterPane editReportServerParameterPane = new EditReportServerParameterPane() {
@Override @Override
public void complete() { public void complete() {
populate((ServerConfig)config.clone()); populate(config.copy());
} }
}; };

2
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); styleListDialog.setVisible(true);
} }

3
designer/src/com/fr/design/actions/server/WidgetManagerAction.java

@ -28,6 +28,7 @@ public class WidgetManagerAction extends UpdateAction {
/** /**
* 动作 * 动作
*
* @param e 事件 * @param e 事件
*/ */
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
@ -36,7 +37,7 @@ public class WidgetManagerAction extends UpdateAction {
final WidgetManagerPane widgetManagerPane = new WidgetManagerPane() { final WidgetManagerPane widgetManagerPane = new WidgetManagerPane() {
@Override @Override
public void complete() { public void complete() {
populate((WidgetInfoConfig)widgetManager.clone()); populate(widgetManager.copy());
} }
}; };

2
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); functionManagerDialog.setVisible(true);
} }

2
designer_base/src/com/fr/design/actions/server/GlobalParameterAction.java

@ -47,7 +47,7 @@ public class GlobalParameterAction extends UpdateAction {
//marks:读取服务器配置信息 //marks:读取服务器配置信息
final ServerConfig configManager = ServerConfig.getInstance(); final ServerConfig configManager = ServerConfig.getInstance();
parameterManagerPane.populate((ServerConfig) configManager.clone()); parameterManagerPane.populate(configManager.copy());
parameterManagerDialog.addDialogActionListener(new DialogActionAdapter() { parameterManagerDialog.addDialogActionListener(new DialogActionAdapter() {
public void doOk() { public void doOk() {
Configurations.update(new Worker() { Configurations.update(new Worker() {

3
designer_base/src/com/fr/design/actions/server/GlobalTableDataAction.java

@ -61,6 +61,7 @@ public class GlobalTableDataAction extends UpdateAction implements ResponseDataS
/** /**
* 动作 * 动作
*
* @param evt 事件 * @param evt 事件
*/ */
public void actionPerformed(ActionEvent evt) { public void actionPerformed(ActionEvent evt) {
@ -68,7 +69,7 @@ public class GlobalTableDataAction extends UpdateAction implements ResponseDataS
final TableDataConfig tableDataConfig = TableDataConfig.getInstance(); final TableDataConfig tableDataConfig = TableDataConfig.getInstance();
final TableDataManagerPane globalTableDataPane = new TableDataManagerPane() { final TableDataManagerPane globalTableDataPane = new TableDataManagerPane() {
public void complete() { public void complete() {
populate((TableDataConfig) tableDataConfig.clone()); populate(tableDataConfig.copy());
} }
protected void renameConnection(final String oldName, final String newName) { protected void renameConnection(final String oldName, final String newName) {

4
designer_base/src/com/fr/design/actions/server/ProcedureListAction.java

@ -1,7 +1,6 @@
package com.fr.design.actions.server; package com.fr.design.actions.server;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.FRContext;
import com.fr.config.Configuration; import com.fr.config.Configuration;
import com.fr.design.DesignModelAdapter; import com.fr.design.DesignModelAdapter;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
@ -30,7 +29,6 @@ public class ProcedureListAction extends UpdateAction {
* 事件触发操作 * 事件触发操作
* *
* @param evt 事件 * @param evt 事件
*
*/ */
public void actionPerformed(ActionEvent evt) { public void actionPerformed(ActionEvent evt) {
DesignerFrame designerFrame = DesignerContext.getDesignerFrame(); DesignerFrame designerFrame = DesignerContext.getDesignerFrame();
@ -38,7 +36,7 @@ public class ProcedureListAction extends UpdateAction {
final ProcedureConfig procedureConfig = ProcedureConfig.getInstance(); final ProcedureConfig procedureConfig = ProcedureConfig.getInstance();
final ProcedureManagerPane databaseManagerPane = new ProcedureManagerPane() { final ProcedureManagerPane databaseManagerPane = new ProcedureManagerPane() {
public void complete() { public void complete() {
populate((ProcedureConfig)procedureConfig.clone()); populate(procedureConfig.copy());
} }
}; };
BasicDialog databaseListDialog = databaseManagerPane.showLargeWindow(designerFrame, null); BasicDialog databaseListDialog = databaseManagerPane.showLargeWindow(designerFrame, null);

3
designer_base/src/com/fr/design/data/datapane/connect/ConnectionComboBoxPanel.java

@ -89,7 +89,8 @@ public class ConnectionComboBoxPanel extends ItemEditableComboBoxPanel {
protected void editItems() { protected void editItems() {
final ConnectionListPane connectionListPane = new ConnectionListPane(); final ConnectionListPane connectionListPane = new ConnectionListPane();
final ConnectionConfig connectionConfig = ConnectionConfig.getInstance(); final ConnectionConfig connectionConfig = ConnectionConfig.getInstance();
connectionListPane.populate((ConnectionConfig) connectionConfig.clone()); ConnectionConfig cloned = connectionConfig.copy();
connectionListPane.populate(cloned);
final BasicDialog connectionListDialog = connectionListPane.showLargeWindow( final BasicDialog connectionListDialog = connectionListPane.showLargeWindow(
SwingUtilities.getWindowAncestor(ConnectionComboBoxPanel.this), null); SwingUtilities.getWindowAncestor(ConnectionComboBoxPanel.this), null);
connectionListDialog.addDialogActionListener(new DialogActionAdapter() { connectionListDialog.addDialogActionListener(new DialogActionAdapter() {

Loading…
Cancel
Save