Browse Source

Merge pull request #4200 in DESIGN/design from feature/10.0 to research/10.0

* commit '566b55ca01622b94db4705175cc33d4eddd717fd':
  CHART-19174 设计器自定义wms带token无效问题
  REPORT-51305 打开/保存模板时切换时 右侧面板可用问题 + 第一次打开时加载动画问题
research/10.0
superman 4 years ago
parent
commit
eaa215e167
  1. 3
      designer-base/src/main/java/com/fr/design/mainframe/DesktopCardPane.java
  2. 4
      designer-base/src/main/java/com/fr/design/worker/open/OpenWorker.java
  3. 1
      designer-base/src/main/java/com/fr/design/worker/save/SaveWorker.java
  4. 20
      designer-chart/src/main/java/com/fr/van/chart/map/designer/type/WMSLayerPane.java

3
designer-base/src/main/java/com/fr/design/mainframe/DesktopCardPane.java

@ -89,6 +89,7 @@ public class DesktopCardPane extends BasicPane implements TargetModifiedListener
private void checkLoadingPane() {
if (layeredPane.getComponent(LOADING_LAYER) != loadingPane) {
layeredPane.add(loadingPane, LOADING_LAYER);
component.setVisible(false);
}
}
@ -108,11 +109,13 @@ public class DesktopCardPane extends BasicPane implements TargetModifiedListener
transparentPane.start();
layeredPane.moveToFront(transparentPane);
DesignerContext.getDesignerFrame().refreshUIToolBar();
EastRegionContainerPane.getInstance().updateAllPropertyPane();
}
public void hideCover() {
transparentPane.stop();
layeredPane.moveToFront(component);
EastRegionContainerPane.getInstance().updateAllPropertyPane();
}
protected JTemplate<?, ?> getSelectedJTemplate() {

4
designer-base/src/main/java/com/fr/design/worker/open/OpenWorker.java

@ -6,7 +6,6 @@ import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.DesignerFrameFileDealerPane;
import com.fr.design.mainframe.EastRegionContainerPane;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.worker.WorkerManager;
import com.fr.exception.DecryptTemplateException;
@ -99,11 +98,10 @@ public class OpenWorker<T> extends SwingWorker<T, Void> {
currentTemplate.whenClose();
DesignerContext.getDesignerFrame().addAndActivateJTemplate(book);
HistoryTemplateListCache.getInstance().replaceCurrentEditingTemplate(book);
EastRegionContainerPane.getInstance().updateAllPropertyPane();
} else {
// 当前tab页是其他模板
for (int i = 0, len = HistoryTemplateListCache.getInstance().getHistoryCount(); i < len; i++) {
JTemplate<?, ?> template = HistoryTemplateListCache.getInstance().get(i);
JTemplate<?, ?> template = HistoryTemplateListCache.getInstance().getTemplate(i);
if (ComparatorUtils.equals(template.getEditingFILE(), book.getEditingFILE())) {
template.whenClose();
HistoryTemplateListCache.getInstance().getHistoryList().set(i, book);

1
designer-base/src/main/java/com/fr/design/worker/save/SaveWorker.java

@ -68,7 +68,6 @@ public class SaveWorker extends SwingWorker<Boolean, Void> {
this.template.setSaving(false);
// 恢复界面
if (slowly && ComparatorUtils.equals(this.template.getName(), HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().getName())) {
EastRegionContainerPane.getInstance().updateAllPropertyPane();
DesignerContext.getDesignerFrame().refreshUIToolBar();
DesignerContext.getDesignerFrame().getCenterTemplateCardPane().hideCover();
}

20
designer-chart/src/main/java/com/fr/van/chart/map/designer/type/WMSLayerPane.java

@ -1,6 +1,6 @@
package com.fr.van.chart.map.designer.type;
import com.fr.decision.webservice.v10.map.WMSFactory;
import com.fr.decision.webservice.v10.map.MapEditService;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener;
@ -11,7 +11,6 @@ import com.fr.design.gui.itextarea.UITextArea;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.general.http.HttpClient;
import com.fr.plugin.chart.base.GisLayer;
import com.fr.plugin.chart.map.layer.WMSLayer;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
@ -85,21 +84,13 @@ public class WMSLayerPane extends JPanel implements UIObserver {
public void actionPerformed(ActionEvent e) {
new SwingWorker<Void, Double>() {
private java.util.List<WMSLayer> list = new ArrayList<>();
private List<WMSLayer> list = new ArrayList<>();
@Override
protected Void doInBackground() {
HttpClient httpClient = new HttpClient(wmsUrl.getText() + "service=WMS&request=GetCapabilities");
httpClient.asGet();
if (!httpClient.isServerAlive()) {
return null;
}
String res = httpClient.getResponseText();
List<String> layers = WMSFactory.readLayers(res);
List<String> wmsNames = MapEditService.getInstance().getWMSNames(wmsUrl.getText());
list.clear();
for (String layer : layers) {
for (String layer : wmsNames) {
list.add(new WMSLayer(layer, false));
}
return null;
@ -108,9 +99,8 @@ public class WMSLayerPane extends JPanel implements UIObserver {
@Override
protected void done() {
connectButton.setText(Toolkit.i18nText("Fine-Design_Chart_Connect_WMP"));
if (list != null && list.size() > 0) {
resetWMSLayerPane(list);
} else {
if (list == null || list.isEmpty()) {
FineJOptionPane.showMessageDialog(null, Toolkit.i18nText("Fine-Design_Chart_Invalid_WMS"));
}
}

Loading…
Cancel
Save