Browse Source

Merge pull request #1697 in BA/design from ~RICHIE/design:feature/10.0 to feature/10.0

* commit '5c0f49b7fa60fa6084676590efbd06fc6dc7a29b':
  无JIRA任务 配置文件克隆
master
superman 7 years ago
parent
commit
67f73ce6b6
  1. 13
      designer/src/com/fr/design/actions/server/ServerConfigManagerAction.java
  2. 2
      designer/src/com/fr/design/actions/server/StyleListAction.java
  3. 13
      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. 72
      designer_base/src/com/fr/design/actions/server/ProcedureListAction.java
  8. 3
      designer_base/src/com/fr/design/data/datapane/connect/ConnectionComboBoxPanel.java

13
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);
}

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);
}

13
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);
}

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);
}

2
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() {

3
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) {

72
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<? extends Configuration>[] targets() {
return new Class[]{ProcedureConfig.class};
}
});
@Override
public Class<? extends Configuration>[] targets() {
return new Class[]{ProcedureConfig.class};
}
});
}
});
databaseListDialog.setVisible(true);
}
}
});
databaseListDialog.setVisible(true);
}
public void update() {
this.setEnabled(true);
}
public void update() {
this.setEnabled(true);
}
}

3
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() {

Loading…
Cancel
Save