Browse Source

CHART-13958 地图点击gis选择会还原缩放大小

feature/big-screen
白岳 5 years ago
parent
commit
f03d6b65fd
  1. 19
      designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapSourceChoosePane.java

19
designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapSourceChoosePane.java

@ -42,7 +42,7 @@ import com.fr.van.chart.drillmap.designer.data.comp.MapDataTree;
import com.fr.workspace.WorkContext; import com.fr.workspace.WorkContext;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.JOptionPane; import javax.swing.DefaultComboBoxModel;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.SwingConstants; import javax.swing.SwingConstants;
import javax.swing.SwingWorker; import javax.swing.SwingWorker;
@ -51,6 +51,8 @@ import javax.swing.event.PopupMenuListener;
import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.TreeNode; import javax.swing.tree.TreeNode;
import javax.swing.tree.TreePath; import javax.swing.tree.TreePath;
import java.util.ArrayList;
import java.util.List;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.CardLayout; import java.awt.CardLayout;
import java.awt.Component; import java.awt.Component;
@ -61,8 +63,6 @@ import java.awt.event.ItemEvent;
import java.awt.event.ItemListener; import java.awt.event.ItemListener;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.awt.event.MouseListener; import java.awt.event.MouseListener;
import java.util.ArrayList;
import java.util.List;
/** /**
* Created by Mitisky on 16/5/11. * Created by Mitisky on 16/5/11.
@ -280,14 +280,12 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver {
public void popupMenuWillBecomeVisible(PopupMenuEvent e) { public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
String selected = Utils.objectToString(gisLayer.getSelectedItem()); String selected = Utils.objectToString(gisLayer.getSelectedItem());
ZoomLevel zoomSelected = (ZoomLevel) zoomLevel.getSelectedItem();
gisLayer.removeAllItems(); gisLayer.setModel(new DefaultComboBoxModel(MapLayerConfigManager.getLayerItems()));
for (String item : MapLayerConfigManager.getLayerItems()) {
gisLayer.addItem(item);
}
gisLayer.setSelectedItem(selected); gisLayer.setSelectedItem(selected);
zoomLevel.setSelectedItem(zoomSelected);
} }
}); });
@ -346,10 +344,7 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver {
} else { } else {
levels = ZOOM_LEVELS; levels = ZOOM_LEVELS;
} }
zoomLevel.removeAllItems(); zoomLevel.setModel(new DefaultComboBoxModel(levels));
for (int i = 0; i < levels.length; i++) {
zoomLevel.addItem(levels[i]);
}
} }

Loading…
Cancel
Save