|
|
|
@ -1,13 +1,13 @@
|
|
|
|
|
package com.fr.van.chart.drillmap.designer.data.comp; |
|
|
|
|
|
|
|
|
|
import com.fr.design.constants.UIConstants; |
|
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
|
import com.fr.plugin.chart.map.designer.type.GEOJSONTreeHelper; |
|
|
|
|
import com.fr.plugin.chart.map.server.ChartGEOJSONHelper; |
|
|
|
|
import com.fr.plugin.chart.map.server.CompatibleGEOJSONHelper; |
|
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
|
|
|
|
|
import javax.swing.BorderFactory; |
|
|
|
|
import javax.swing.JTree; |
|
|
|
|
import javax.swing.tree.DefaultMutableTreeNode; |
|
|
|
|
import javax.swing.tree.DefaultTreeCellRenderer; |
|
|
|
@ -15,7 +15,6 @@ import javax.swing.tree.DefaultTreeModel;
|
|
|
|
|
import javax.swing.tree.TreeNode; |
|
|
|
|
import javax.swing.tree.TreePath; |
|
|
|
|
import java.awt.Component; |
|
|
|
|
import java.awt.Dimension; |
|
|
|
|
import java.util.Enumeration; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -49,7 +48,7 @@ public class MapDataTree extends JTree {
|
|
|
|
|
if (children.hasMoreElements()) { |
|
|
|
|
DefaultMutableTreeNode child = (DefaultMutableTreeNode) children.nextElement(); |
|
|
|
|
|
|
|
|
|
if(GEOJSONTreeHelper.getInstance().isSelectableTreeNode(child)){ |
|
|
|
|
if (GEOJSONTreeHelper.isSelectableTreeNode(child)) { |
|
|
|
|
selectTreeNode(child, m_model); |
|
|
|
|
} else { |
|
|
|
|
setFirstChildTreeNode(child, m_model); |
|
|
|
@ -115,14 +114,7 @@ public class MapDataTree extends JTree {
|
|
|
|
|
DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) value; |
|
|
|
|
String name = getPresentName(treeNode); |
|
|
|
|
this.setText(name); |
|
|
|
|
|
|
|
|
|
UILabel label = new UILabel(); |
|
|
|
|
label.setText(getText()); |
|
|
|
|
label.setIcon(getIcon()); |
|
|
|
|
this.setSize(label.getPreferredSize()); |
|
|
|
|
Dimension dim = label.getPreferredSize(); |
|
|
|
|
dim.height += 2; |
|
|
|
|
this.setPreferredSize(dim); |
|
|
|
|
this.setBorder(BorderFactory.createEmptyBorder(1, 0, 1, 0)); |
|
|
|
|
this.setBackgroundNonSelectionColor(UIConstants.NORMAL_BACKGROUND); |
|
|
|
|
this.setForeground(UIConstants.FONT_COLOR); |
|
|
|
|
this.setBackgroundSelectionColor(UIConstants.FLESH_BLUE); |
|
|
|
|