Browse Source

REPORT-103732 海外版本地图组件的GIS图层优化-fvs下标准自动配置切换问题

release/11.0
obo 1 year ago
parent
commit
fea42a047f
  1. 17
      designer-chart/src/main/java/com/fr/van/chart/map/designer/type/GisLayerPane.java

17
designer-chart/src/main/java/com/fr/van/chart/map/designer/type/GisLayerPane.java

@ -3,12 +3,14 @@ package com.fr.van.chart.map.designer.type;
import com.fr.base.Utils; import com.fr.base.Utils;
import com.fr.design.event.UIObserver; import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener; import com.fr.design.event.UIObserverListener;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.mainframe.chart.mode.ChartEditContext; import com.fr.design.mainframe.chart.mode.ChartEditContext;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.GeneralContext; import com.fr.general.GeneralContext;
@ -316,6 +318,7 @@ public class GisLayerPane extends JPanel implements UIObserver {
if (isAuto()) { if (isAuto()) {
layer.setGisLayerType(GISLayerType.AUTO); layer.setGisLayerType(GISLayerType.AUTO);
layer.setLayerName(GISLayerType.getLocString(GISLayerType.AUTO)); layer.setLayerName(GISLayerType.getLocString(GISLayerType.AUTO));
adaptEditingTemplateTheme(layer);
} else if (isStandardGis()) { } else if (isStandardGis()) {
updateStandardGis(layer); updateStandardGis(layer);
} else { } else {
@ -348,4 +351,18 @@ public class GisLayerPane extends JPanel implements UIObserver {
break; break;
} }
} }
/**
* 切换图层时根据主题切换图层名称
*
* @param layer 图层
*/
private void adaptEditingTemplateTheme(GisLayer layer) {
JTemplate<?, ?> currentEditingTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
if(JTemplate.isValid(currentEditingTemplate)) {
boolean dark = currentEditingTemplate.getTemplateTheme().isDark();
String name = dark ? Toolkit.i18nText("Fine-Design_Chart_Layer_Black") : Toolkit.i18nText("Fine-Design_Chart_Layer_MapBox");
layer.setLayerName(name);
}
}
} }

Loading…
Cancel
Save