Browse Source

修改9.0bug

master
mengao 7 years ago
parent
commit
bf8e3e3342
  1. 5
      designer_chart/src/com/fr/plugin/chart/designer/TableLayout4VanChartHelper.java
  2. 2
      designer_chart/src/com/fr/plugin/chart/designer/component/VanChartHtmlLabelPane.java
  3. 24
      designer_chart/src/com/fr/plugin/chart/designer/component/background/VanChartBackgroundPaneWithOutImageAndShadow.java
  4. 1
      designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartPlotLabelDetailPane.java
  5. 10
      designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java
  6. 56
      designer_chart/src/com/fr/plugin/chart/drillmap/designer/data/comp/DrillMapLayerPane.java
  7. 44
      designer_chart/src/com/fr/plugin/chart/drillmap/designer/other/VanChartDrillMapInteractivePane.java
  8. 15
      designer_chart/src/com/fr/plugin/chart/gauge/VanChartGaugeSeriesPane.java
  9. 9
      designer_chart/src/com/fr/plugin/chart/pie/VanChartPieSeriesPane.java
  10. 2
      designer_chart/src/com/fr/plugin/chart/range/component/LegendLabelFormatPane.java

5
designer_chart/src/com/fr/plugin/chart/designer/TableLayout4VanChartHelper.java

@ -5,7 +5,6 @@ import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.general.Inter;
import javax.swing.*;
import java.awt.*;
@ -42,9 +41,11 @@ public class TableLayout4VanChartHelper {
double f = TableLayout.FILL;
double[] columnSize = {f, componentWidth};
double[] rowSize = {p, p};
UILabel label = new UILabel(title);
label.setVerticalAlignment(SwingConstants.TOP);
Component[][] components = new Component[][]{
new Component[]{null, null},
new Component[]{new UILabel(Inter.getLocText(title)), component},
new Component[]{label, component},
};
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, COMPONENT_INTERVAL, LayoutConstants.VGAP_LARGE);
}

2
designer_chart/src/com/fr/plugin/chart/designer/component/VanChartHtmlLabelPane.java

@ -15,7 +15,6 @@ import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.general.Inter;
import com.fr.plugin.chart.base.VanChartHtmlLabel;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.style.VanChartStylePane;
import javax.swing.*;
@ -66,7 +65,6 @@ public class VanChartHtmlLabelPane extends JPanel{
};
JPanel contentPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
contentPane.setBorder(BorderFactory.createEmptyBorder(0, (int)TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH + TableLayout4VanChartHelper.COMPONENT_INTERVAL,0,0));
this.setLayout(new BorderLayout());
this.add(contentPane, BorderLayout.CENTER);

24
designer_chart/src/com/fr/plugin/chart/designer/component/background/VanChartBackgroundPaneWithOutImageAndShadow.java

@ -16,23 +16,20 @@ import java.awt.*;
*/
public class VanChartBackgroundPaneWithOutImageAndShadow extends VanChartBackgroundPane {
public VanChartBackgroundPaneWithOutImageAndShadow() {
initComponents();
@Override
protected JPanel initContentPanel() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p, f};
double[] rowSize = { p,p,p,p,p};
double[] rowSize = { p,p,p};
JPanel panel = TableLayoutHelper.createTableLayoutPane(getPaneComponents(),rowSize,columnSize);
this.setLayout(new BorderLayout());
this.add(panel,BorderLayout.CENTER);
return TableLayoutHelper.createTableLayoutPane(getPaneComponents(),rowSize,columnSize);
}
@Override
protected void initList() {
paneList.add(new NullBackgroundQuickPane(){
paneList.add(new NullBackgroundQuickPane() {
/**
* 名称
*
@ -46,14 +43,15 @@ public class VanChartBackgroundPaneWithOutImageAndShadow extends VanChartBackgro
paneList.add(new ColorBackgroundQuickPane());
}
@Override
protected Component[][] getPaneComponents() {
return new Component[][]{
new Component[]{null, null},
new Component[]{new UILabel(Inter.getLocText("FR-Chart-Shape_Fill")), typeComboBox},
new Component[]{null, centerPane},
new Component[]{new UILabel(Inter.getLocText("Plugin-Chart_Alpha")), transparent},
return new Component[][]{
new Component[]{typeComboBox, null},
new Component[]{centerPane, null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Alpha")), transparent},
};
}
}

1
designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartPlotLabelDetailPane.java

@ -205,6 +205,7 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
private void checkStyleUse() {
textFontPane.setVisible(style.getSelectedIndex() == 1);
textFontPane.setPreferredSize(style.getSelectedIndex() == 1 ? new Dimension(0, 60) : new Dimension(0, 0));
}
private void checkPosition() {

10
designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java

@ -68,6 +68,7 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
protected JPanel stackAndAxisEditExpandablePane;//堆積和坐標軸展开面板
private RadiusCardLayoutPane radiusPane;//半径设置界面
private JPanel radiusPaneWithTitle;
private UIButtonGroup<DataProcessor> largeDataModelGroup;//大数据模式
@ -158,9 +159,10 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
}
//半径界面
protected RadiusCardLayoutPane createRadiusPane() {
protected JPanel createRadiusPane() {
radiusPane = initRadiusPane();
return radiusPane;
radiusPaneWithTitle = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_Radius_Set"), radiusPane);
return ((VanChartPlot)plot).isInCustom() ? null : radiusPaneWithTitle;
}
protected JPanel createLargeDataModelPane() {
@ -309,10 +311,10 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
* @param plot
*/
private void checkRadiusPane(Plot plot) {
radiusPane.setVisible(true);
radiusPaneWithTitle.setVisible(true);
if (plot instanceof VanChartPlot){
if (((VanChartPlot) plot).isInCustom()){
radiusPane.setVisible(false);
radiusPaneWithTitle.setVisible(false);
}
}
}

56
designer_chart/src/com/fr/plugin/chart/drillmap/designer/data/comp/DrillMapLayerPane.java

@ -8,12 +8,13 @@ import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.drillmap.DrillMapHelper;
import com.fr.plugin.chart.drillmap.VanChartDrillMapPlot;
import com.fr.plugin.chart.type.MapType;
import com.fr.plugin.chart.type.ZoomLevel;
import com.fr.plugin.chart.map.designer.type.VanChartMapSourceChoosePane;
import com.fr.plugin.chart.map.server.CompatibleGeoJSONTreeHelper;
import com.fr.plugin.chart.type.MapType;
import com.fr.plugin.chart.type.ZoomLevel;
import javax.swing.*;
import javax.swing.tree.DefaultMutableTreeNode;
@ -48,29 +49,28 @@ public class DrillMapLayerPane extends BasicScrollPane<ChartCollection> {
@Override
protected void layoutContentPane() {
leftcontentPane = createContentPane();
leftcontentPane.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10));
leftcontentPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
this.add(leftcontentPane);
}
@Override
protected JPanel createContentPane() {
if(mapDataTree == null){
if (mapDataTree == null) {
mapDataTree = new MapDataTree(CompatibleGeoJSONTreeHelper.getRootNodeWithoutPara(oldGeoUrl));
mapDataTree.setRootVisible(true);
}
JPanel mapDataTreePanel = new JPanel(new BorderLayout());
mapDataTreePanel.add(mapDataTree);
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {f};
double[] rowSize = {p,p,p,p,p,p};
double[] rowSize = {p, p};
Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Layer_Tree"))},
new Component[]{new JSeparator()},
new Component[]{mapDataTree},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Layer_Detail"))},
new Component[]{new JSeparator()},
new Component[]{createLayerDetailPane()}
new Component[]{createTitlePane(Inter.getLocText("Plugin-ChartF_Layer_Tree"), mapDataTreePanel)},
new Component[]{createTitlePane(Inter.getLocText("Plugin-ChartF_Layer_Detail"), createLayerDetailPane())}
};
JPanel contentPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
@ -79,21 +79,29 @@ public class DrillMapLayerPane extends BasicScrollPane<ChartCollection> {
return panel;
}
private JPanel createTitlePane (String title, JPanel panel) {
JPanel jPanel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(title, panel);
panel.setBorder(BorderFactory.createEmptyBorder(10,5,0,0));
jPanel.setBorder(BorderFactory.createEmptyBorder(0,5,0,0));
return jPanel;
}
private JPanel createLayerDetailPane() {
double p = TableLayout.PREFERRED;
double[] columnSize = {p,p,p};
double f = TableLayout.FILL;
double[] columnSize = {f, p, p};
double[] rowSize = new double[depth + 1];
detailComps = new Component[depth + 1][3];
rowSize[0] = p;
detailComps[0] = new Component[]{
new UILabel(Inter.getLocText("Plugin-Chart_Descriptor")),
new UILabel(Inter.getLocText("Plugin-ChartF_Layer_Zoom_Level")),
new UILabel(Inter.getLocText("Plugin-ChartF_Zoom_Layer")),
new UILabel(Inter.getLocText("Plugin-ChartF_Layer_Map_Type"))
};
for(int i = 0; i < depth; i++){
for (int i = 0; i < depth; i++) {
rowSize[i + 1] = p;
int d = i + 1;
UILabel label = new UILabel(String.format("%s%d%s",Inter.getLocText("Plugin-ChartF_Index1"), d, Inter.getLocText("Plugin-ChartF_Index3")));
UILabel label = new UILabel(String.format("%s%d%s", Inter.getLocText("Plugin-ChartF_Index1"), d, Inter.getLocText("Plugin-ChartF_Index3")));
UIComboBox level = new UIComboBox(VanChartMapSourceChoosePane.ZOOM_LEVELS);
level.setEnabled(i != 0);
UIComboBox type = new UIComboBox(TEMP.get(oldMapType));
@ -112,16 +120,16 @@ public class DrillMapLayerPane extends BasicScrollPane<ChartCollection> {
public void populateBean(ChartCollection ob) {
VanChartDrillMapPlot drillMapPlot = DrillMapHelper.getDrillMapPlot(ob);
if(drillMapPlot != null) {
if (drillMapPlot != null) {
java.util.List<ZoomLevel> levelList = drillMapPlot.getLayerLevelList();
java.util.List<MapType> mapTypeList = drillMapPlot.getLayerMapTypeList();
if(detailComps == null || drillMapPlot.getMapType() != oldMapType || !ComparatorUtils.equals(drillMapPlot.getGeoUrl(), oldGeoUrl)){
if (detailComps == null || drillMapPlot.getMapType() != oldMapType || !ComparatorUtils.equals(drillMapPlot.getGeoUrl(), oldGeoUrl)) {
oldMapType = drillMapPlot.getMapType();
oldGeoUrl = drillMapPlot.getGeoUrl();
DefaultMutableTreeNode root = CompatibleGeoJSONTreeHelper.getNodeByJSONPath(oldGeoUrl);
if(root != null){
if (root != null) {
mapDataTree.changeRootNode(root);
depth = root.getDepth() + 1;//根节点也算一层
}
@ -132,18 +140,18 @@ public class DrillMapLayerPane extends BasicScrollPane<ChartCollection> {
//根据层级初始属性,一切以json那边读到的层级为准
int levelSize = levelList.size();
for(int i = levelSize; i < depth; i++){
for (int i = levelSize; i < depth; i++) {
levelList.add(ZoomLevel.AUTO);
}
MapType mapType = drillMapPlot.getMapType() == MapType.POINT ? MapType.POINT : MapType.AREA;
int typeSize = mapTypeList.size();
for(int j = typeSize; j < depth; j++){
for (int j = typeSize; j < depth; j++) {
mapTypeList.add(mapType);
}
for(int i = 0; i < depth; i++){
for (int i = 0; i < depth; i++) {
Component[] components = detailComps[i + 1];
if(components != null) {
if (components != null) {
UIComboBox level = (UIComboBox) components[1];
UIComboBox type = (UIComboBox) components[2];
if (level != null) {
@ -168,11 +176,11 @@ public class DrillMapLayerPane extends BasicScrollPane<ChartCollection> {
@Override
public void updateBean(ChartCollection ob) {
VanChartDrillMapPlot drillMapPlot = DrillMapHelper.getDrillMapPlot(ob);
if(drillMapPlot != null && detailComps != null) {
if (drillMapPlot != null && detailComps != null) {
java.util.List<ZoomLevel> levelList = new ArrayList<ZoomLevel>();
java.util.List<MapType> mapTypeList = new ArrayList<MapType>();
for (Component[] com : detailComps) {
if(com[1] instanceof UIComboBox && com[2] instanceof UIComboBox) {
if (com[1] instanceof UIComboBox && com[2] instanceof UIComboBox) {
UIComboBox level = (UIComboBox) com[1];
UIComboBox type = (UIComboBox) com[2];
levelList.add((ZoomLevel) level.getSelectedItem());

44
designer_chart/src/com/fr/plugin/chart/drillmap/designer/other/VanChartDrillMapInteractivePane.java

@ -33,7 +33,8 @@ public class VanChartDrillMapInteractivePane extends VanChartInteractivePaneWith
protected JPanel getInteractivePane(VanChartPlot plot){
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p, f};
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] rowSize = {p, p, p, p, p, p, p, p, p, p, p};
Component[][] components = new Component[][]{
new Component[]{createToolBarPane(new double[]{p, p, p}, columnSize),null},
@ -49,16 +50,29 @@ public class VanChartDrillMapInteractivePane extends VanChartInteractivePaneWith
private JPanel createDrillToolsPane() {
openOrClose = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Open"), Inter.getLocText("Plugin-ChartF_Close")});
JPanel openOrClosePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_Drill_Dir"), openOrClose);
textAttrPane = new ChartTextAttrPane(){
@Override
protected JPanel getContentPane (JPanel buttonPane) {
double p = TableLayout.PREFERRED;
double e = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH;
double[] columnSize = {e};
double[] rowSize = {p, p};
return TableLayout4VanChartHelper.createGapTableLayoutPane(getComponents(buttonPane), rowSize, columnSize);
}
@Override
protected Component[][] getComponents(JPanel buttonPane) {
return new Component[][]{
new Component[]{fontNameComboBox, null},
new Component[]{buttonPane, null}
new Component[]{fontNameComboBox},
new Component[]{buttonPane}
};
}
};
backgroundPane = new VanChartBackgroundPane4DrillMap();
selectBackgroundPane = new VanChartBackgroundPane4DrillMap();
backgroundPane = new VanChartBackgroundPaneWithOutImageAndShadow();
selectBackgroundPane = new VanChartBackgroundPaneWithOutImageAndShadow();
catalogSuperLink = new VanChartCatalogHyperLinkPane();
double p = TableLayout.PREFERRED;
@ -75,7 +89,7 @@ public class VanChartDrillMapInteractivePane extends VanChartInteractivePaneWith
drillPane = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize);
JPanel panel = new JPanel(new BorderLayout());
panel.add(openOrClose, BorderLayout.NORTH);
panel.add(openOrClosePane, BorderLayout.NORTH);
panel.add(drillPane, BorderLayout.CENTER);
openOrClose.addChangeListener(new ChangeListener() {
@ -85,13 +99,15 @@ public class VanChartDrillMapInteractivePane extends VanChartInteractivePaneWith
}
});
JPanel panel1 = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Drill_Dir"), panel);
JPanel panel1 = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Drill"), panel);
panel.setBorder(BorderFactory.createEmptyBorder(10,5,0,0));
return panel1;
}
private JPanel createTitlePane(String title, Component component) {
return TableLayout4VanChartHelper.createGapTableLayoutPane(title, component);
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(title, component, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH);
panel.setBorder(BorderFactory.createEmptyBorder(0,12,0,0));
return panel;
}
private void checkEnable() {
@ -138,16 +154,4 @@ public class VanChartDrillMapInteractivePane extends VanChartInteractivePaneWith
catalogSuperLink.update(plot);
}
}
public class VanChartBackgroundPane4DrillMap extends VanChartBackgroundPaneWithOutImageAndShadow{
@Override
protected Component[][] getPaneComponents() {
return new Component[][]{
new Component[]{null},
new Component[]{typeComboBox},
new Component[]{centerPane},
new Component[]{transparent},
};
}
}
}

15
designer_chart/src/com/fr/plugin/chart/gauge/VanChartGaugeSeriesPane.java

@ -13,11 +13,9 @@ import com.fr.design.style.color.ColorSelectBox;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.plugin.chart.attr.GaugeDetailStyle;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.base.AttrLabel;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.style.series.VanChartAbstractPlotSeriesPane;
import com.fr.plugin.chart.pie.RadiusCardLayoutPane;
import com.fr.plugin.chart.type.GaugeStyle;
import com.fr.stable.Constants;
@ -119,21 +117,21 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane {
new Component[]{null, null},
getPaneBackgroundColor(),
getInnerPaneBackgroundColor(),
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Radius_Set")),createRadiusPane()}
new Component[]{createRadiusPane(), null}
};
case SLOT:
return new Component[][]{
new Component[]{null, null},
getNeedleColor(),
getSlotBackgroundColor(),
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Radius_Set")),createRadiusPane()}
new Component[]{createRadiusPane(), null}
};
case THERMOMETER:
return new Component[][]{
new Component[]{null, null},
getNeedleColor(),
getSlotBackgroundColor(),
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Radius_Set")),createRadiusPane()}
new Component[]{createRadiusPane(), null}
};
default:
return new Component[][]{
@ -142,16 +140,11 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane {
getHingeBackgroundColor(),
getNeedleColor(),
getPaneBackgroundColor(),
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Radius_Set")),createRadiusPane()}
new Component[]{createRadiusPane(), null}
};
}
}
//半径界面
protected RadiusCardLayoutPane initRadiusPane() {
return ((VanChartPlot)plot).isInCustom() ? null : new RadiusCardLayoutPane();
}
private Component[] getHingeColor() {
hingeColor = new ColorSelectBox(120);
return new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Hinge")),hingeColor};

9
designer_chart/src/com/fr/plugin/chart/pie/VanChartPieSeriesPane.java

@ -10,7 +10,6 @@ import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.general.Inter;
import com.fr.plugin.chart.PiePlot4VanChart;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.style.series.VanChartAbstractPlotSeriesPane;
@ -62,7 +61,7 @@ public class VanChartPieSeriesPane extends VanChartAbstractPlotSeriesPane {
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_StartAngle")),startAngle},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_EndAngle")),endAngle},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_InnerRadius")),innerRadius},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Radius_Set")), createRadiusPane()},
new Component[]{createRadiusPane(),null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Rotation")),supportRotation}
};
@ -71,12 +70,6 @@ public class VanChartPieSeriesPane extends VanChartAbstractPlotSeriesPane {
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style"), panel);
}
//半径界面
protected RadiusCardLayoutPane initRadiusPane() {
return ((VanChartPlot)plot).isInCustom() ? null : new RadiusCardLayoutPane();
}
public void populateBean(Plot plot) {
if(plot == null) {
return;

2
designer_chart/src/com/fr/plugin/chart/range/component/LegendLabelFormatPane.java

@ -33,6 +33,8 @@ public class LegendLabelFormatPane extends JPanel{
Inter.getLocText("Plugin-ChartF_Custom")});
labelFormat = new FormatPaneWithOutFont();
htmlLabelPane = new VanChartHtmlLabelPaneWithOutWidthAndHeight();
htmlLabelPane.setBorder(BorderFactory.createEmptyBorder(0, (int)TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH + TableLayout4VanChartHelper.COMPONENT_INTERVAL,0,0));
centerPane = new JPanel(new CardLayout()){
@Override

Loading…
Cancel
Save