Browse Source

9.0新图表配置界面,样式、特效面板整体调整。

修改甘特图,漏斗图等图表配置界面bug。
master
mengao 7 years ago
parent
commit
055bceb5d4
  1. 28
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java
  2. 4
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java
  3. 7
      designer_chart/src/com/fr/plugin/chart/column/VanChartColumnSeriesPane.java
  4. 8
      designer_chart/src/com/fr/plugin/chart/designer/AbstractVanChartScrollPane.java
  5. 19
      designer_chart/src/com/fr/plugin/chart/designer/TableLayout4VanChartHelper.java
  6. 23
      designer_chart/src/com/fr/plugin/chart/designer/component/VanChartAreaSeriesFillColorPane.java
  7. 3
      designer_chart/src/com/fr/plugin/chart/designer/component/VanChartBeautyPane.java
  8. 3
      designer_chart/src/com/fr/plugin/chart/designer/component/VanChartFillStylePane.java
  9. 3
      designer_chart/src/com/fr/plugin/chart/designer/component/VanChartLineTypePane.java
  10. 6
      designer_chart/src/com/fr/plugin/chart/designer/component/VanChartLineWidthPane.java
  11. 2
      designer_chart/src/com/fr/plugin/chart/designer/component/VanChartMarkerPane.java
  12. 5
      designer_chart/src/com/fr/plugin/chart/designer/component/VanChartTooltipContentPane.java
  13. 3
      designer_chart/src/com/fr/plugin/chart/designer/component/VanChartTrendLinePane.java
  14. 3
      designer_chart/src/com/fr/plugin/chart/designer/component/background/VanChartBackgroundPane.java
  15. 4
      designer_chart/src/com/fr/plugin/chart/designer/component/background/VanChartMarkerBackgroundPane.java
  16. 3
      designer_chart/src/com/fr/plugin/chart/designer/component/border/VanChartBorderPane.java
  17. 4
      designer_chart/src/com/fr/plugin/chart/designer/component/format/VanChartFormatPane.java
  18. 10
      designer_chart/src/com/fr/plugin/chart/designer/component/marker/VanChartCommonMarkerPane.java
  19. 5
      designer_chart/src/com/fr/plugin/chart/designer/component/marker/VanChartImageMarkerPane.java
  20. 27
      designer_chart/src/com/fr/plugin/chart/designer/other/AutoRefreshPane.java
  21. 2
      designer_chart/src/com/fr/plugin/chart/designer/other/AutoRefreshPaneWithoutTooltip.java
  22. 21
      designer_chart/src/com/fr/plugin/chart/designer/other/VanChartInteractivePane.java
  23. 13
      designer_chart/src/com/fr/plugin/chart/designer/style/VanChartPlotLegendPane.java
  24. 12
      designer_chart/src/com/fr/plugin/chart/designer/style/VanChartTitlePane.java
  25. 17
      designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartBaseAxisPane.java
  26. 5
      designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartTimeAxisPane.java
  27. 5
      designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartValueAxisPane.java
  28. 2
      designer_chart/src/com/fr/plugin/chart/designer/style/axis/gauge/VanChartGaugeDetailAxisPane.java
  29. 6
      designer_chart/src/com/fr/plugin/chart/designer/style/axis/radar/VanChartRadarXAxisPane.java
  30. 5
      designer_chart/src/com/fr/plugin/chart/designer/style/axis/radar/VanChartRadarYAxisPane.java
  31. 26
      designer_chart/src/com/fr/plugin/chart/designer/style/background/VanChartAreaPane.java
  32. 5
      designer_chart/src/com/fr/plugin/chart/designer/style/background/VanChartAxisAreaPane.java
  33. 19
      designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartPlotLabelDetailPane.java
  34. 4
      designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java
  35. 26
      designer_chart/src/com/fr/plugin/chart/designer/style/tooltip/VanChartPlotTooltipPane.java
  36. 6
      designer_chart/src/com/fr/plugin/chart/gantt/designer/style/axis/GanttAxisStylePane.java
  37. 13
      designer_chart/src/com/fr/plugin/chart/gantt/designer/style/axis/GanttTimeAxisPane.java
  38. 6
      designer_chart/src/com/fr/plugin/chart/gantt/designer/style/series/VanChartGanttCommonMarkerPane.java
  39. 17
      designer_chart/src/com/fr/plugin/chart/gantt/designer/style/series/VanChartGanttSeriesPane.java
  40. 5
      designer_chart/src/com/fr/plugin/chart/pie/RadiusCardLayoutPane.java
  41. 5
      designer_chart/src/com/fr/plugin/chart/pie/VanChartPieSeriesPane.java
  42. 2
      designer_chart/src/com/fr/plugin/chart/range/component/SectionLegendPane.java
  43. 5
      designer_chart/src/com/fr/plugin/chart/scatter/component/VanChartScatterLineTypePane.java
  44. 26
      designer_chart/src/com/fr/plugin/chart/wordcloud/designer/style/VanChartWordCloudSeriesPane.java

28
designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java

@ -33,7 +33,7 @@ import java.util.List;
*/ */
public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> { public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
private static final long serialVersionUID = 3650522989381790194L; private static final long serialVersionUID = 3650522989381790194L;
private static final int PAN_WIDTH = 234; private static final int PAN_WIDTH = 246;
private static final int FIL_HEIGHT = 150; private static final int FIL_HEIGHT = 150;
private CategoryFilterPane categoryPane; private CategoryFilterPane categoryPane;
@ -55,7 +55,7 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
cardLayout.show(centerPane, nameArray[index]); cardLayout.show(centerPane, nameArray[index]);
} }
}; };
tabPane.setPreferredSize(new Dimension(200, 20)); tabPane.setPreferredSize(new Dimension(221, 20));
} }
} }
@ -68,6 +68,7 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
this.add(pane, BorderLayout.NORTH); this.add(pane, BorderLayout.NORTH);
} }
} }
centerPane.setBorder(BorderFactory.createEmptyBorder(10,0,0,0));
this.add(centerPane, BorderLayout.CENTER); this.add(centerPane, BorderLayout.CENTER);
} }
@ -125,7 +126,7 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
this.removeAll(); this.removeAll();
paneList = initPaneList4NoPresent(plot4Pane, parentPane); paneList = initPaneList4NoPresent(plot4Pane, parentPane);
initAllPane(); initAllPane();
tabPane.setPreferredSize(new Dimension(200, 20)); tabPane.setPreferredSize(new Dimension(221, 20));
centerPane.setPreferredSize(new Dimension(getContentPaneWidth(), 200)); centerPane.setPreferredSize(new Dimension(getContentPaneWidth(), 200));
this.validate(); this.validate();
} }
@ -197,6 +198,16 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
this.parent = parent; this.parent = parent;
} }
protected void layoutContentPane() {
super.layoutContentPane();
leftcontentPane.setBorder(BorderFactory.createEmptyBorder());
}
public void reloaPane(JPanel pane){
super.reloaPane(pane);
leftcontentPane.setBorder(BorderFactory.createEmptyBorder());
}
@Override @Override
public Dimension getPreferredSize() { public Dimension getPreferredSize() {
Dimension dim = super.getPreferredSize(); Dimension dim = super.getPreferredSize();
@ -365,6 +376,17 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
return dim; return dim;
} }
protected void layoutContentPane() {
super.layoutContentPane();
leftcontentPane.setBorder(BorderFactory.createEmptyBorder());
}
public void reloaPane(JPanel pane){
super.reloaPane(pane);
leftcontentPane.setBorder(BorderFactory.createEmptyBorder());
}
@Override @Override
protected JPanel createContentPane() { protected JPanel createContentPane() {
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());

4
designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java

@ -144,8 +144,8 @@ public class ChartTextAttrPane extends BasicPane {
buttonPane.add(fontSizeComboBox, BorderLayout.CENTER); buttonPane.add(fontSizeComboBox, BorderLayout.CENTER);
buttonPane.add(GUICoreUtils.createFlowPane(components1, FlowLayout.LEFT, LayoutConstants.HGAP_LARGE), BorderLayout.EAST); buttonPane.add(GUICoreUtils.createFlowPane(components1, FlowLayout.LEFT, LayoutConstants.HGAP_LARGE), BorderLayout.EAST);
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {p,f}; double[] columnSize = {f,e};
double[] rowSize = {p, p, p}; double[] rowSize = {p, p, p};

7
designer_chart/src/com/fr/plugin/chart/column/VanChartColumnSeriesPane.java

@ -45,11 +45,12 @@ public class VanChartColumnSeriesPane extends VanChartAbstractPlotSeriesPane {
protected JPanel getContentInPlotType() { protected JPanel getContentInPlotType() {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f}; double[] columnSize = {f};
double[] rowSize = {p,p,p,p,p,p,p,p,p,p}; double[] rowSize = {p,p,p,p,p,p,p,p,p,p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{getColorPane()}, new Component[]{getColorPane()},
new Component[]{createSeriesStylePane(new double[]{p,p}, new double[]{p,f})}, new Component[]{createSeriesStylePane(new double[]{p,p}, new double[]{f,e})},
new Component[]{createBorderPane()}, new Component[]{createBorderPane()},
new Component[]{createStackedAndAxisPane()}, new Component[]{createStackedAndAxisPane()},
new Component[]{createTrendLinePane()}, new Component[]{createTrendLinePane()},
@ -81,12 +82,12 @@ public class VanChartColumnSeriesPane extends VanChartAbstractPlotSeriesPane {
new Component[]{new UILabel(Inter.getLocText("FR-Chart-Gap_Series")),seriesGap}, new Component[]{new UILabel(Inter.getLocText("FR-Chart-Gap_Series")),seriesGap},
new Component[]{new UILabel(Inter.getLocText("FR-Chart-Gap_Category")),categoryGap}, new Component[]{new UILabel(Inter.getLocText("FR-Chart-Gap_Category")),categoryGap},
}; };
JPanel panel2 = TableLayoutHelper.createTableLayoutPane(components2, row, col); JPanel panel2 = TableLayout4VanChartHelper.createGapTableLayoutPane(components2, row, col);
Component[][] components3 = new Component[][]{ Component[][] components3 = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Filled_With_Image")),isFillWithImage}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Filled_With_Image")),isFillWithImage},
}; };
JPanel panel3 = TableLayoutHelper.createTableLayoutPane(components3, row, col); JPanel panel3 = TableLayout4VanChartHelper.createGapTableLayoutPane(components3, row, col);
JPanel panel = new JPanel(new BorderLayout(0, 4)); JPanel panel = new JPanel(new BorderLayout(0, 4));
panel.add(panel1, BorderLayout.NORTH); panel.add(panel1, BorderLayout.NORTH);

8
designer_chart/src/com/fr/plugin/chart/designer/AbstractVanChartScrollPane.java

@ -13,7 +13,7 @@ public abstract class AbstractVanChartScrollPane<T> extends BasicScrollPane<T> {
protected void layoutContentPane() { protected void layoutContentPane() {
leftcontentPane = createContentPane(); leftcontentPane = createContentPane();
leftcontentPane.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 0, original)); leftcontentPane.setBorder(BorderFactory.createMatteBorder(0, 5, 0, 5, original));
this.add(leftcontentPane); this.add(leftcontentPane);
} }
@ -21,8 +21,10 @@ public abstract class AbstractVanChartScrollPane<T> extends BasicScrollPane<T> {
int width = parent.getWidth(); int width = parent.getWidth();
int height = parent.getHeight(); int height = parent.getHeight();
if (leftcontentPane.getPreferredSize().height > maxheight) { if (leftcontentPane.getPreferredSize().height > maxheight) {
leftcontentPane.setBounds(0, -beginY, width - scrollBar.getWidth(), height + beginY); scrollBar.setBounds(width - scrollBar.getWidth() - 1, 0, 6, height);
scrollBar.setBounds(width - scrollBar.getWidth() - 1, 0, scrollBar.getWidth(), height); leftcontentPane.setBounds(0, -beginY, width - 6, height + beginY);
leftcontentPane.setBorder(BorderFactory.createMatteBorder(0, 4, 0, 4, original));
} else { } else {
leftcontentPane.setBounds(0, 0, width, height); leftcontentPane.setBounds(0, 0, width, height);
} }

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

@ -18,39 +18,48 @@ public class TableLayout4VanChartHelper {
private static final int SMALL_GAP = 20; private static final int SMALL_GAP = 20;
public static final int EXPANDABLE_PANE_WIDTH =290; public static final int EXPANDABLE_PANE_WIDTH =290;
public static final int EXPANDABLE_PANE_HIGHT =24; public static final int EXPANDABLE_PANE_HIGHT =24;
public static final double DESCRIPTION_AREA_WIDTH =60;
public static final double EDIT_AREA_WIDTH =155;
public static final double SECOND_EDIT_AREA_WIDTH =143;
public static final int COMPONENT_INTERVAL =12;
public static JPanel createExpandablePaneWithTitle(String title, JPanel panel) { public static JPanel createExpandablePaneWithTitle(String title, JPanel panel) {
return new UIExpandablePane(title, EXPANDABLE_PANE_WIDTH, EXPANDABLE_PANE_HIGHT, panel){ return new UIExpandablePane(title, EXPANDABLE_PANE_WIDTH, EXPANDABLE_PANE_HIGHT, panel){
protected void setcontentPanelontentPanelBorder (){ protected void setcontentPanelontentPanelBorder (){
getContentPanel().setBorder(BorderFactory.createEmptyBorder(0 ,10, 0, 15)); getContentPanel().setBorder(BorderFactory.createEmptyBorder(0 ,5, 0, 0));
} }
}; };
} }
public static JPanel createGapTableLayoutPane(String title, Component component) { public static JPanel createGapTableLayoutPane(String title, Component component) {
return createGapTableLayoutPane(title, component, EDIT_AREA_WIDTH);
}
public static JPanel createGapTableLayoutPane(String title, Component component, double componentWidth) {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = {p, f}; double[] columnSize = {f, componentWidth};
double[] rowSize = {p, p}; double[] rowSize = {p, p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{null, null}, new Component[]{null, null},
new Component[]{new UILabel(Inter.getLocText(title)), component}, new Component[]{new UILabel(Inter.getLocText(title)), component},
}; };
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, SMALL_GAP, LayoutConstants.VGAP_LARGE); return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, COMPONENT_INTERVAL, LayoutConstants.VGAP_LARGE);
} }
public static JPanel createGapTableLayoutPane(Component[][] components, public static JPanel createGapTableLayoutPane(Component[][] components,
double[] rowSize, double[] columnSize) { double[] rowSize, double[] columnSize) {
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, SMALL_GAP, LayoutConstants.VGAP_LARGE); return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, COMPONENT_INTERVAL, LayoutConstants.VGAP_LARGE);
} }
public static JPanel createGapTableLayoutPane(Component[][] components, public static JPanel createGapTableLayoutPane(Component[][] components,
double[] rowSize, double[] columnSize, int[][] rowCount) { double[] rowSize, double[] columnSize, int[][] rowCount) {
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount,
SMALL_GAP, LayoutConstants.VGAP_LARGE); COMPONENT_INTERVAL, LayoutConstants.VGAP_LARGE);
} }
/** /**

23
designer_chart/src/com/fr/plugin/chart/designer/component/VanChartAreaSeriesFillColorPane.java

@ -2,13 +2,16 @@ package com.fr.plugin.chart.designer.component;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.frpane.UINumberDragPane; import com.fr.design.gui.frpane.UINumberDragPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.VanChartAttrHelper; import com.fr.plugin.chart.VanChartAttrHelper;
import com.fr.plugin.chart.base.AttrAreaSeriesFillColorBackground; import com.fr.plugin.chart.base.AttrAreaSeriesFillColorBackground;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.component.background.VanChartMarkerBackgroundPane; import com.fr.plugin.chart.designer.component.background.VanChartMarkerBackgroundPane;
import javax.swing.*;
import java.awt.*; import java.awt.*;
/** /**
@ -16,6 +19,7 @@ import java.awt.*;
*/ */
public class VanChartAreaSeriesFillColorPane extends BasicPane { public class VanChartAreaSeriesFillColorPane extends BasicPane {
private static final long serialVersionUID = 9166866984438854779L; private static final long serialVersionUID = 9166866984438854779L;
private static final int PANE_WIDTH = 221;
private VanChartMarkerBackgroundPane fillColorPane; private VanChartMarkerBackgroundPane fillColorPane;
private UINumberDragPane transparent; private UINumberDragPane transparent;
@ -24,15 +28,28 @@ public class VanChartAreaSeriesFillColorPane extends BasicPane {
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] row = {p,p}; double[] row = {p,p};
double[] col = {f}; double[] col = {f};
fillColorPane = new VanChartMarkerBackgroundPane(); fillColorPane = new VanChartMarkerBackgroundPane(){
protected Component[][] getPaneComponents() {
return new Component[][]{
new Component[]{null, null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_FillColor")), typeComboBox},
new Component[]{null, centerPane},
};
}
};
transparent = new UINumberDragPane(0, 100); transparent = new UINumberDragPane(0, 100);
JPanel transparentPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-Chart_Alpha"), transparent);
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{fillColorPane}, new Component[]{fillColorPane},
new Component[]{transparent}, new Component[]{transparentPane},
}; };
this.add(TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col)); JPanel contentPane = TableLayoutHelper.createTableLayoutPane(components, row, col);
contentPane.setPreferredSize(new Dimension(PANE_WIDTH, (int)contentPane.getPreferredSize().getHeight()));
this.add(contentPane);
} }
protected String title4PopupWindow(){ protected String title4PopupWindow(){

3
designer_chart/src/com/fr/plugin/chart/designer/component/VanChartBeautyPane.java

@ -23,7 +23,8 @@ public class VanChartBeautyPane extends BasicBeanPane<Integer> {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = {p, f}; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] rowSize = {p}; double[] rowSize = {p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-Chart_Style")), styleBox}, new Component[]{new UILabel(Inter.getLocText("Plugin-Chart_Style")), styleBox},

3
designer_chart/src/com/fr/plugin/chart/designer/component/VanChartFillStylePane.java

@ -18,7 +18,8 @@ public class VanChartFillStylePane extends ChartFillStylePane {
protected JPanel getContentPane () { protected JPanel getContentPane () {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = {p, f}; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] rowSize = {p, p}; double[] rowSize = {p, p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("ColorMatch")),styleSelectBox}, new Component[]{new UILabel(Inter.getLocText("ColorMatch")),styleSelectBox},

3
designer_chart/src/com/fr/plugin/chart/designer/component/VanChartLineTypePane.java

@ -46,7 +46,8 @@ public class VanChartLineTypePane extends BasicPane {
protected JPanel createContentPane(double p, double f) { protected JPanel createContentPane(double p, double f) {
double[] row = {p, p, p, p}; double[] row = {p, p, p, p};
double[] col = {p, f}; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] col = {f, e};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{null,null}, new Component[]{null,null},

6
designer_chart/src/com/fr/plugin/chart/designer/component/VanChartLineWidthPane.java

@ -3,6 +3,7 @@ package com.fr.plugin.chart.designer.component;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -14,8 +15,9 @@ public class VanChartLineWidthPane extends VanChartLineTypePane {
private static final long serialVersionUID = 4537158946119294689L; private static final long serialVersionUID = 4537158946119294689L;
protected JPanel createContentPane(double p, double f) { protected JPanel createContentPane(double p, double f) {
double[] row = {p, p}; double[] row = {p, p, p};
double[] col = {p,f}; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] col = {f, e};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{null,null}, new Component[]{null,null},

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

@ -43,8 +43,6 @@ public class VanChartMarkerPane extends BasicPane {
commonMarkerPane = createCommonMarkerPane(); commonMarkerPane = createCommonMarkerPane();
imageMarkerPane = createImageMarkerPane(); imageMarkerPane = createImageMarkerPane();
commonMarkerPane.setBorder(BorderFactory.createEmptyBorder(10,25,0,15));
cardLayout = new CardLayout(); cardLayout = new CardLayout();
centerPane = new JPanel(cardLayout) { centerPane = new JPanel(cardLayout) {

5
designer_chart/src/com/fr/plugin/chart/designer/component/VanChartTooltipContentPane.java

@ -60,7 +60,8 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = {f, p}; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] rowSize = getRowSize(p); double[] rowSize = getRowSize(p);
final JPanel commonPanel = TableLayoutHelper.createTableLayoutPane(getPaneComponents(), rowSize, columnSize); final JPanel commonPanel = TableLayoutHelper.createTableLayoutPane(getPaneComponents(), rowSize, columnSize);
@ -81,7 +82,7 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
centerPane.add(htmlLabelPane, Inter.getLocText("Plugin-ChartF_Custom")); centerPane.add(htmlLabelPane, Inter.getLocText("Plugin-ChartF_Custom"));
centerPane.add(commonPanel,Inter.getLocText("Plugin-ChartF_Common")); centerPane.add(commonPanel,Inter.getLocText("Plugin-ChartF_Common"));
double[] column = {p, f}; double[] column = {f, e};
double[] row = {p,p,p}; double[] row = {p,p,p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{null,null}, new Component[]{null,null},

3
designer_chart/src/com/fr/plugin/chart/designer/component/VanChartTrendLinePane.java

@ -40,7 +40,8 @@ public class VanChartTrendLinePane extends BasicPane{
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] row = {p,p,p,p,p,p}; double[] row = {p,p,p,p,p,p};
double[] col = {p,f}; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] col = {f, e};
trendLineName = new UITextField(); trendLineName = new UITextField();
trendLineColor = new ColorSelectBox(100); trendLineColor = new ColorSelectBox(100);
trendLineStyle = new LineComboBox(VanChartConstants.ALERT_LINE_STYLE); trendLineStyle = new LineComboBox(VanChartConstants.ALERT_LINE_STYLE);

3
designer_chart/src/com/fr/plugin/chart/designer/component/background/VanChartBackgroundPane.java

@ -46,8 +46,9 @@ public class VanChartBackgroundPane extends BasicPane {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] columnSize = {p, f};
double[] rowSize = { p,p,p,p,p,p}; double[] rowSize = { p,p,p,p,p,p};
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(getPaneComponents(), rowSize, columnSize); JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(getPaneComponents(), rowSize, columnSize);
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());

4
designer_chart/src/com/fr/plugin/chart/designer/component/background/VanChartMarkerBackgroundPane.java

@ -8,6 +8,7 @@ import com.fr.design.mainframe.backgroundpane.BackgroundQuickPane;
import com.fr.design.mainframe.backgroundpane.ColorBackgroundQuickPane; import com.fr.design.mainframe.backgroundpane.ColorBackgroundQuickPane;
import com.fr.design.mainframe.backgroundpane.NullBackgroundQuickPane; import com.fr.design.mainframe.backgroundpane.NullBackgroundQuickPane;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -24,7 +25,8 @@ public class VanChartMarkerBackgroundPane extends VanChartBackgroundPane {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = {p, f}; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] rowSize = {p, p}; double[] rowSize = {p, p};
JPanel panel = TableLayoutHelper.createTableLayoutPane(getPaneComponents(), rowSize, columnSize); JPanel panel = TableLayoutHelper.createTableLayoutPane(getPaneComponents(), rowSize, columnSize);

3
designer_chart/src/com/fr/plugin/chart/designer/component/border/VanChartBorderPane.java

@ -30,7 +30,8 @@ public class VanChartBorderPane extends BasicPane {
currentLineColorPane = new ColorSelectBox(100); currentLineColorPane = new ColorSelectBox(100);
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = { p,f }; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] rowSize = {p, p, p, p}; double[] rowSize = {p, p, p, p};
Component[][] components = getUseComponent(); Component[][] components = getUseComponent();
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize);

4
designer_chart/src/com/fr/plugin/chart/designer/component/format/VanChartFormatPane.java

@ -2,7 +2,6 @@ package com.fr.plugin.chart.designer.component.format;
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.gui.style.FRFontPane;
import com.fr.design.gui.style.FormatPane; import com.fr.design.gui.style.FormatPane;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.general.Inter; import com.fr.general.Inter;
@ -25,7 +24,8 @@ public class VanChartFormatPane extends FormatPane {
double f = TableLayout.FILL; double f = TableLayout.FILL;
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double[] rowSize = {p, p}; double[] rowSize = {p, p};
double[] columnSize = {p, f}; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(getTypeComboBoxComponent(typeComboBox), rowSize, columnSize); JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(getTypeComboBoxComponent(typeComboBox), rowSize, columnSize);
this.add(panel, BorderLayout.NORTH); this.add(panel, BorderLayout.NORTH);
} }

10
designer_chart/src/com/fr/plugin/chart/designer/component/marker/VanChartCommonMarkerPane.java

@ -6,9 +6,9 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner; import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.gui.xcombox.MarkerComboBox; import com.fr.design.gui.xcombox.MarkerComboBox;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.base.VanChartAttrMarker; import com.fr.plugin.chart.base.VanChartAttrMarker;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.component.background.VanChartMarkerBackgroundPane; import com.fr.plugin.chart.designer.component.background.VanChartMarkerBackgroundPane;
import com.fr.plugin.chart.marker.type.MarkerType; import com.fr.plugin.chart.marker.type.MarkerType;
@ -107,14 +107,14 @@ public class VanChartCommonMarkerPane extends BasicBeanPane<VanChartAttrMarker>
radius = new UISpinner(0, 100, 0.5, 0); radius = new UISpinner(0, 100, 0.5, 0);
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double d = TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH;
double[] row = {p, p, p}; double[] row = {p, p, p};
double[] col = {p, f}; double[] col = {d, e};
Component[][] components = getUseComponent(); Component[][] components = getUseComponent();
JPanel jPanel = TableLayoutHelper.createTableLayoutPane(components, row, col); JPanel jPanel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col);
jPanel.setBorder(BorderFactory.createEmptyBorder(10,25,0,15));
this.add(jPanel); this.add(jPanel);
} }

5
designer_chart/src/com/fr/plugin/chart/designer/component/marker/VanChartImageMarkerPane.java

@ -8,8 +8,9 @@ import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.backgroundpane.ImageBackgroundQuickPane; import com.fr.design.mainframe.backgroundpane.ImageBackgroundQuickPane;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.marker.type.MarkerType;
import com.fr.plugin.chart.base.VanChartAttrMarker; import com.fr.plugin.chart.base.VanChartAttrMarker;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.marker.type.MarkerType;
import com.fr.stable.Constants; import com.fr.stable.Constants;
import javax.swing.*; import javax.swing.*;
@ -25,6 +26,7 @@ public class VanChartImageMarkerPane extends BasicBeanPane<VanChartAttrMarker> {
public VanChartImageMarkerPane() { public VanChartImageMarkerPane() {
imageBackgroundPane = new ImageBackgroundQuickPane(false); imageBackgroundPane = new ImageBackgroundQuickPane(false);
imageBackgroundPane.setPreferredSize(new Dimension((int)TableLayout4VanChartHelper.EDIT_AREA_WIDTH, (int)imageBackgroundPane.getPreferredSize().getHeight()));
width = new UISpinner(0, 100, 0.5, 30); width = new UISpinner(0, 100, 0.5, 30);
height = new UISpinner(0, 100, 0.5, 30); height = new UISpinner(0, 100, 0.5, 30);
@ -41,6 +43,7 @@ public class VanChartImageMarkerPane extends BasicBeanPane<VanChartAttrMarker> {
JPanel sizePanel = TableLayoutHelper.createTableLayoutPane(components, row, col); JPanel sizePanel = TableLayoutHelper.createTableLayoutPane(components, row, col);
JPanel panel = createContentPane(imageBackgroundPane, sizePanel); JPanel panel = createContentPane(imageBackgroundPane, sizePanel);
panel.setBorder(BorderFactory.createEmptyBorder(0,72,0,0));
this.add(panel); this.add(panel);
} }

27
designer_chart/src/com/fr/plugin/chart/designer/other/AutoRefreshPane.java

@ -1,7 +1,7 @@
package com.fr.plugin.chart.designer.other; package com.fr.plugin.chart.designer.other;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.design.dialog.BasicScrollPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.DialogActionListener; import com.fr.design.dialog.DialogActionListener;
import com.fr.design.dialog.UIDialog; import com.fr.design.dialog.UIDialog;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
@ -29,7 +29,7 @@ import java.awt.event.ActionListener;
/** /**
* Created by hufan on 2016/12/30. * Created by hufan on 2016/12/30.
*/ */
public class AutoRefreshPane extends BasicScrollPane<RefreshMoreLabel> { public class AutoRefreshPane extends BasicBeanPane<RefreshMoreLabel> {
private static final int P_W = 320; private static final int P_W = 320;
private static final int P_H = 460; private static final int P_H = 460;
@ -50,9 +50,11 @@ public class AutoRefreshPane extends BasicScrollPane<RefreshMoreLabel> {
public AutoRefreshPane(VanChart chart, boolean isLargeModel) { public AutoRefreshPane(VanChart chart, boolean isLargeModel) {
this.chart = chart; this.chart = chart;
this.isLargeModel = isLargeModel; this.isLargeModel = isLargeModel;
this.setLayout(new BorderLayout());
this.add(createContentPane());
} }
@Override
protected JPanel createContentPane() { protected JPanel createContentPane() {
JPanel content = new JPanel(new BorderLayout(0, 6)); JPanel content = new JPanel(new BorderLayout(0, 6));
moreLabel = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Open"), Inter.getLocText("Plugin-ChartF_Close")}); moreLabel = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Open"), Inter.getLocText("Plugin-ChartF_Close")});
@ -83,12 +85,12 @@ public class AutoRefreshPane extends BasicScrollPane<RefreshMoreLabel> {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = {p, f}; double[] columnSize = {p, f, 20};
double[] rowSize = {p, p}; double[] rowSize = {p, p};
Component[][] components = initComponent(jPanel); Component[][] components = initComponent(jPanel);
contentPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); contentPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
contentPane.setBorder(BorderFactory.createEmptyBorder(0,15,0,0)); contentPane.setBorder(BorderFactory.createEmptyBorder(0,12,0,0));
content.add(moreLabelPane, BorderLayout.NORTH); content.add(moreLabelPane, BorderLayout.NORTH);
content.add(contentPane, BorderLayout.CENTER); content.add(contentPane, BorderLayout.CENTER);
return content; return content;
@ -97,8 +99,8 @@ public class AutoRefreshPane extends BasicScrollPane<RefreshMoreLabel> {
protected Component[][] initComponent(JPanel autoTooltipPane){ protected Component[][] initComponent(JPanel autoTooltipPane){
return new Component[][]{ return new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Time_Interval")), autoRefreshTime}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Time_Interval")), autoRefreshTime, new UILabel(Inter.getLocText("Chart-Time_Seconds"))},
new Component[]{autoTooltip, tooltipSet}, new Component[]{autoTooltip,null, tooltipSet},
}; };
} }
@ -130,12 +132,6 @@ public class AutoRefreshPane extends BasicScrollPane<RefreshMoreLabel> {
}); });
} }
protected void layoutContentPane() {
leftcontentPane = createContentPane();
leftcontentPane.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 0));
this.add(leftcontentPane);
}
public void checkRefreshEnable() { public void checkRefreshEnable() {
Boolean enable = moreLabel.getSelectedIndex() == 0; Boolean enable = moreLabel.getSelectedIndex() == 0;
contentPane.setVisible(enable); contentPane.setVisible(enable);
@ -159,6 +155,11 @@ public class AutoRefreshPane extends BasicScrollPane<RefreshMoreLabel> {
} }
@Override
public RefreshMoreLabel updateBean() {
return null;
}
protected void populateAutoRefreshTime() { protected void populateAutoRefreshTime() {
VanChartPlot plot = (VanChartPlot)chart.getPlot(); VanChartPlot plot = (VanChartPlot)chart.getPlot();
if(plot.isSupportAutoRefresh()) { if(plot.isSupportAutoRefresh()) {

2
designer_chart/src/com/fr/plugin/chart/designer/other/AutoRefreshPaneWithoutTooltip.java

@ -19,7 +19,7 @@ public class AutoRefreshPaneWithoutTooltip extends AutoRefreshPane {
protected Component[][] initComponent(JPanel autoTooltipPane){ protected Component[][] initComponent(JPanel autoTooltipPane){
return new Component[][]{ return new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Time_Interval")), getAutoRefreshTime()} new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Time_Interval")), getAutoRefreshTime(),new UILabel(Inter.getLocText("Chart-Time_Seconds"))}
}; };
} }

21
designer_chart/src/com/fr/plugin/chart/designer/other/VanChartInteractivePane.java

@ -89,7 +89,8 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
protected JPanel getInteractivePane(VanChartPlot plot){ protected JPanel getInteractivePane(VanChartPlot plot){
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; 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}; double[] rowSize = {p,p,p,p,p,p};
@ -124,10 +125,14 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_From")), from}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_From")), from},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_To")), to}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_To")), to},
}; };
changeEnablePane = TableLayoutHelper.createTableLayoutPane(components, row, col);
changeEnablePane.setBorder(BorderFactory.createEmptyBorder(10,15,0,0)); double f = TableLayout.FILL;
zoomTypePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_ZoomType"), zoomType); double e = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH;
zoomTypePane.setBorder(BorderFactory.createEmptyBorder(0,15,0,0)); double[] columnSize = {f, e};
changeEnablePane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, columnSize);
changeEnablePane.setBorder(BorderFactory.createEmptyBorder(10,12,0,0));
zoomTypePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_ZoomType"), zoomType, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH);
zoomTypePane.setBorder(BorderFactory.createEmptyBorder(0,12,0,0));
JPanel panel = createZoomPaneContent(zoomWidgetPane, zoomGesturePane, changeEnablePane, zoomTypePane, plot); JPanel panel = createZoomPaneContent(zoomWidgetPane, zoomGesturePane, changeEnablePane, zoomTypePane, plot);
zoomWidget.addActionListener(new ActionListener() { zoomWidget.addActionListener(new ActionListener() {
@Override @Override
@ -196,9 +201,9 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
protected Component[][] createToolBarComponentsWithOutSort() { protected Component[][] createToolBarComponentsWithOutSort() {
return new Component[][]{ return new Component[][]{
new Component[]{exportImages, null}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Content")), exportImages},
new Component[]{fullScreenDisplay, null}, new Component[]{null, fullScreenDisplay},
new Component[]{collapse, null} new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_layout")),collapse}
}; };
} }

13
designer_chart/src/com/fr/plugin/chart/designer/style/VanChartPlotLegendPane.java

@ -107,7 +107,8 @@ public class VanChartPlotLegendPane extends BasicPane {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; 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}; double[] rowSize = { p,p,p,p,p,p,p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
@ -131,7 +132,8 @@ public class VanChartPlotLegendPane extends BasicPane {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; 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}; double[] rowSize = { p,p,p,p,p,p,p,p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
@ -230,8 +232,8 @@ public class VanChartPlotLegendPane extends BasicPane {
JPanel limitSizePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_AreaSize"),limitSize); JPanel limitSizePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_AreaSize"),limitSize);
maxProportionPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_MaxProportion"),maxProportion); maxProportionPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_MaxProportion"),maxProportion,TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH);
maxProportionPane.setBorder(BorderFactory.createEmptyBorder(0,15,0,0)); maxProportionPane.setBorder(BorderFactory.createEmptyBorder(0,12,0,0));
JPanel panel = new JPanel(new BorderLayout()); JPanel panel = new JPanel(new BorderLayout());
panel.add(limitSizePane, BorderLayout.NORTH); panel.add(limitSizePane, BorderLayout.NORTH);
panel.add(maxProportionPane, BorderLayout.CENTER); panel.add(maxProportionPane, BorderLayout.CENTER);
@ -250,7 +252,8 @@ public class VanChartPlotLegendPane extends BasicPane {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = {p,f}; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] rowSize = {p,p}; double[] rowSize = {p,p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{null,null}, new Component[]{null,null},

12
designer_chart/src/com/fr/plugin/chart/designer/style/VanChartTitlePane.java

@ -106,11 +106,13 @@ public class VanChartTitlePane extends AbstractVanChartScrollPane<VanChart> {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = {p, f}; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {p, f};
double[] column = {f,e};
double[] rowSize = {p,p,p,p,p,p,p,p}; double[] rowSize = {p,p,p,p,p,p,p,p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{createTitleContentPane(new double[]{p,p,p},columnSize),null}, new Component[]{createTitleContentPane(new double[]{p,p,p},column),null},
new Component[]{createTitlePositionPane(new double[]{p,p,p},columnSize),null}, new Component[]{createTitlePositionPane(new double[]{p,p,p},column),null},
new Component[]{createTitleStylePane(),null}, new Component[]{createTitleStylePane(),null},
new Component[]{TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Background"), backgroundPane),null}, new Component[]{TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Background"), backgroundPane),null},
new Component[]{createDisplayStrategy(),null} new Component[]{createDisplayStrategy(),null}
@ -165,8 +167,8 @@ public class VanChartTitlePane extends AbstractVanChartScrollPane<VanChart> {
limitSize = new UIButtonGroup<Integer>(new String[]{Inter.getLocText("Plugin-ChartF_Limit"),Inter.getLocText("Plugin-ChartF_NotLimit")}); limitSize = new UIButtonGroup<Integer>(new String[]{Inter.getLocText("Plugin-ChartF_Limit"),Inter.getLocText("Plugin-ChartF_NotLimit")});
JPanel limitSizePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_AreaSize"),limitSize); JPanel limitSizePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_AreaSize"),limitSize);
maxProportionPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_MaxProportion"),maxProportion); maxProportionPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_MaxProportion"),maxProportion, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH);
maxProportionPane.setBorder(BorderFactory.createEmptyBorder(0,15,0,0)); maxProportionPane.setBorder(BorderFactory.createEmptyBorder(0,12,0,0));
JPanel panel = new JPanel(new BorderLayout()); JPanel panel = new JPanel(new BorderLayout());
panel.add(limitSizePane, BorderLayout.NORTH); panel.add(limitSizePane, BorderLayout.NORTH);
panel.add(maxProportionPane, BorderLayout.CENTER); panel.add(maxProportionPane, BorderLayout.CENTER);

17
designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartBaseAxisPane.java

@ -73,6 +73,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
protected FormatPane valueFormat; protected FormatPane valueFormat;
protected JPanel centerPane; protected JPanel centerPane;
private VanChartHtmlLabelPane htmlLabelPane; private VanChartHtmlLabelPane htmlLabelPane;
private JPanel labelGapValuePane;
public VanChartBaseAxisPane(){ public VanChartBaseAxisPane(){
this(true); this(true);
@ -95,7 +96,8 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; 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}; double[] rowSize = {p, p, p, p, p, p, p,p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{createTitlePane(new double[]{p, p, p, p, p, p}, columnSize, isXAxis), null}, new Component[]{createTitlePane(new double[]{p, p, p, p, p, p}, columnSize, isXAxis), null},
@ -161,11 +163,14 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
Component[][] gapComponents = new Component[][]{ Component[][] gapComponents = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_TextRotation")), labelTextRotation}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_TextRotation")), labelTextRotation},
new Component[]{new UILabel(Inter.getLocText("ChartF-Label_Interval")), labelGapStyle}, new Component[]{new UILabel(Inter.getLocText("ChartF-Label_Interval")), labelGapStyle},
new Component[]{new UILabel(Inter.getLocText("FR-Chart-Axis_labelInterval")),labelGapValue},
}; };
JPanel gapPanel = TableLayoutHelper.createTableLayoutPane(gapComponents, row, col); JPanel panel = TableLayoutHelper.createTableLayoutPane(gapComponents, row, col);
labelGapValuePane= TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText(" "),labelGapValue);
JPanel gapPanel = new JPanel(new BorderLayout());
gapPanel.add(panel, BorderLayout.CENTER);
gapPanel.add(labelGapValuePane, BorderLayout.SOUTH);
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{labelTextAttrPane, null}, new Component[]{labelTextAttrPane, null},
new Component[]{gapPanel,null}, new Component[]{gapPanel,null},
}; };
@ -343,8 +348,8 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
} }
protected void checkLabelGapValuePane() { protected void checkLabelGapValuePane() {
if(labelGapValue != null && labelGapStyle != null){ if(labelGapValuePane != null && labelGapStyle != null){
labelGapValue.setEnabled(labelGapStyle.getSelectedIndex() == 1); labelGapValuePane.setVisible(labelGapStyle.getSelectedIndex() == 1);
} }
} }

5
designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartTimeAxisPane.java

@ -58,11 +58,12 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; 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,p,p,p}; double[] rowSize = {p,p,p,p,p,p,p,p,p,p,p,p,p,p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{createTitlePane(new double[]{p, p, p, p, p,p}, columnSize, isXAxis),null}, new Component[]{createTitlePane(new double[]{p, p, p, p, p,p}, columnSize, isXAxis),null},
new Component[]{createLabelPane(new double[]{p, p, p}, columnSize),null}, new Component[]{createLabelPane(new double[]{p, p}, columnSize),null},
new Component[]{createValueDefinition(),null}, new Component[]{createValueDefinition(),null},
new Component[]{createLineStylePane(new double[]{p, p,p,p,p}, columnSize),null}, new Component[]{createLineStylePane(new double[]{p, p,p,p,p}, columnSize),null},
new Component[]{createAxisPositionPane(new double[]{p, p}, columnSize, isXAxis),null}, new Component[]{createAxisPositionPane(new double[]{p, p}, columnSize, isXAxis),null},

5
designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartValueAxisPane.java

@ -41,11 +41,12 @@ public class VanChartValueAxisPane extends VanChartBaseAxisPane {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; 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,p,p,p}; double[] rowSize = {p,p,p,p,p,p,p,p,p,p,p,p,p,p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{createTitlePane(new double[]{p, p, p, p, p, p}, columnSize, isXAxis), null}, new Component[]{createTitlePane(new double[]{p, p, p, p, p, p}, columnSize, isXAxis), null},
new Component[]{createLabelPane(new double[]{p, p, p}, columnSize), null}, new Component[]{createLabelPane(new double[]{p, p}, columnSize), null},
new Component[]{createMinMaxValuePane(new double[]{p, p}, columnSize), null}, new Component[]{createMinMaxValuePane(new double[]{p, p}, columnSize), null},
new Component[]{createLineStylePane(new double[]{p, p, p, p, p}, columnSize), null}, new Component[]{createLineStylePane(new double[]{p, p, p, p, p}, columnSize), null},
new Component[]{createAxisPositionPane(new double[]{p, p, p}, columnSize, isXAxis), null}, new Component[]{createAxisPositionPane(new double[]{p, p, p}, columnSize, isXAxis), null},

2
designer_chart/src/com/fr/plugin/chart/designer/style/axis/gauge/VanChartGaugeDetailAxisPane.java

@ -53,7 +53,7 @@ public class VanChartGaugeDetailAxisPane extends VanChartValueAxisPane{
switch (gaugeStyle){ switch (gaugeStyle){
case THERMOMETER: case THERMOMETER:
return new Component[][]{ return new Component[][]{
new Component[]{createLabelPane(new double[]{p, p, p}, columnSize), null}, new Component[]{createLabelPane(new double[]{p, p}, columnSize), null},
new Component[]{createValueDefinition(), null}, new Component[]{createValueDefinition(), null},
new Component[]{createTickColorPane(new double[]{p, p, p}, new double[]{p, f}), null}, new Component[]{createTickColorPane(new double[]{p, p, p}, new double[]{p, f}), null},
new Component[]{createValueStylePane()}, new Component[]{createValueStylePane()},

6
designer_chart/src/com/fr/plugin/chart/designer/style/axis/radar/VanChartRadarXAxisPane.java

@ -4,6 +4,7 @@ import com.fr.design.gui.ilable.UILabel;
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.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.style.axis.VanChartBaseAxisPane; import com.fr.plugin.chart.designer.style.axis.VanChartBaseAxisPane;
import javax.swing.*; import javax.swing.*;
@ -20,10 +21,11 @@ public class VanChartRadarXAxisPane extends VanChartBaseAxisPane {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; 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}; double[] rowSize = {p,p,p,p,p,p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{createLabelPane(new double[]{p, p, p}, columnSize),null}, new Component[]{createLabelPane(new double[]{p, p}, columnSize),null},
new Component[]{createLineStylePane(new double[]{p, p, p, p}, columnSize),null}, new Component[]{createLineStylePane(new double[]{p, p, p, p}, columnSize),null},
new Component[]{createValueStylePane(),null}, new Component[]{createValueStylePane(),null},
}; };

5
designer_chart/src/com/fr/plugin/chart/designer/style/axis/radar/VanChartRadarYAxisPane.java

@ -30,10 +30,11 @@ public class VanChartRadarYAxisPane extends VanChartValueAxisPane {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; 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}; double[] rowSize = {p, p, p, p, p, p, p, p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{createLabelPane(new double[]{p, p, p}, columnSize), null}, new Component[]{createLabelPane(new double[]{p, p}, columnSize), null},
new Component[]{createMinMaxValuePane(new double[]{p, p, p}, columnSize), null}, new Component[]{createMinMaxValuePane(new double[]{p, p, p}, columnSize), null},
new Component[]{createLineStylePane(new double[]{p, p, p, p}, columnSize), null}, new Component[]{createLineStylePane(new double[]{p, p, p, p}, columnSize), null},
new Component[]{createValueStylePane(), null}, new Component[]{createValueStylePane(), null},

26
designer_chart/src/com/fr/plugin/chart/designer/style/background/VanChartAreaPane.java

@ -1,17 +1,19 @@
package com.fr.plugin.chart.designer.style.background; package com.fr.plugin.chart.designer.style.background;
import java.util.ArrayList; import com.fr.chart.chartattr.Plot;
import java.util.List;
import com.fr.chart.chartattr.*;
import com.fr.design.gui.frpane.AbstractAttrNoScrollPane; import com.fr.design.gui.frpane.AbstractAttrNoScrollPane;
import com.fr.design.mainframe.chart.PaneTitleConstants; import com.fr.design.mainframe.chart.PaneTitleConstants;
import com.fr.design.mainframe.chart.gui.style.legend.AutoSelectedPane;
import com.fr.design.mainframe.chart.gui.style.ThirdTabPane; import com.fr.design.mainframe.chart.gui.style.ThirdTabPane;
import com.fr.design.mainframe.chart.gui.style.legend.AutoSelectedPane;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.plugin.chart.designer.style.VanChartStylePane; import com.fr.plugin.chart.designer.style.VanChartStylePane;
import com.fr.plugin.chart.vanchart.VanChart; import com.fr.plugin.chart.vanchart.VanChart;
import javax.swing.*;
import java.awt.*;
import java.util.ArrayList;
import java.util.List;
/** /**
* 属性表, 图表样式-背景界面. * 属性表, 图表样式-背景界面.
*/ */
@ -27,6 +29,20 @@ public class VanChartAreaPane extends ThirdTabPane<VanChart> implements AutoSele
super(plot, parent); super(plot, parent);
} }
protected void initLayout() {
this.setLayout(new BorderLayout());
if (!paneList.isEmpty()) {
JPanel pane = new JPanel(new FlowLayout(FlowLayout.LEADING, 0, 0));
if (nameArray.length > 1) {
pane.add(tabPane);
this.add(pane, BorderLayout.NORTH);
}
}
centerPane.setBorder(BorderFactory.createEmptyBorder(10,0,0,0));
this.add(centerPane, BorderLayout.CENTER);
}
/** /**
* 界面 使用标题 * 界面 使用标题
* @return 标题 * @return 标题

5
designer_chart/src/com/fr/plugin/chart/designer/style/background/VanChartAxisAreaPane.java

@ -43,13 +43,14 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot> {
protected void initComponents() { protected void initComponents() {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f}; double[] columnSize = {f};
double[] rowSize = {p, p, p}; double[] rowSize = {p, p, p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{createGridLinePane(new double[]{p, p, p}, new double[]{p, f})}, new Component[]{createGridLinePane(new double[]{p, p, p}, new double[]{f, e})},
new Component[]{createAlertLinePane()}, new Component[]{createAlertLinePane()},
new Component[]{createIntervalPane(new double[]{p, p, p, p}, new double[]{p, f})}, new Component[]{createIntervalPane(new double[]{p, p, p, p}, new double[]{f, e})},
}; };
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); JPanel panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());

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

@ -43,6 +43,8 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
protected ColorSelectBox backgroundColor; protected ColorSelectBox backgroundColor;
private JPanel tractionLinePane;
protected VanChartStylePane parent; protected VanChartStylePane parent;
public VanChartPlotLabelDetailPane(Plot plot, VanChartStylePane parent) { public VanChartPlotLabelDetailPane(Plot plot, VanChartStylePane parent) {
@ -61,7 +63,8 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
private JPanel createLabelPane(Plot plot) { private JPanel createLabelPane(Plot plot) {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = {p, f}; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] rowSize = getLabelPaneRowSize(plot, p); double[] rowSize = getLabelPaneRowSize(plot, p);
Component[][] components = getLabelPaneComponents(plot, p, columnSize); Component[][] components = getLabelPaneComponents(plot, p, columnSize);
@ -111,20 +114,22 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
autoAdjust = new UIButtonGroup<Boolean>(new String[]{Inter.getLocText("Plugin-ChartF_On"), Inter.getLocText("Plugin-ChartF_Off")}, new Boolean[]{true, false}); autoAdjust = new UIButtonGroup<Boolean>(new String[]{Inter.getLocText("Plugin-ChartF_On"), Inter.getLocText("Plugin-ChartF_Off")}, new Boolean[]{true, false});
Component[][] comps = new Component[3][2]; Component[][] comps = new Component[2][2];
comps[0] = new Component[]{null,null}; comps[0] = new Component[]{null,null};
comps[1] = new Component[]{new UILabel(Inter.getLocText("Chart-Layout_Position"), SwingConstants.LEFT), position}; comps[1] = new Component[]{new UILabel(Inter.getLocText("Chart-Layout_Position"), SwingConstants.LEFT), position};
JPanel panel =new JPanel(new BorderLayout());
panel.add(getLabelPositionPane(comps,row,col),BorderLayout.CENTER);
if(plot.isSupportLeadLine()){ if(plot.isSupportLeadLine()){
tractionLine = new UIToggleButton(Inter.getLocText("ChartF-Show_GuidLine")); tractionLine = new UIToggleButton(Inter.getLocText("ChartF-Show_GuidLine"));
comps[2] = new Component[]{null,tractionLine}; tractionLinePane = TableLayout4VanChartHelper.createGapTableLayoutPane("",tractionLine);
panel.add(tractionLinePane, BorderLayout.SOUTH);
initPositionListener(); initPositionListener();
} else if(PlotFactory.plotAutoAdjustLabelPosition(plot)){ } else if(PlotFactory.plotAutoAdjustLabelPosition(plot)){
comps[2]= new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Auto_Adjust"), SwingConstants.LEFT),autoAdjust}; panel.add(TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_Auto_Adjust"),autoAdjust), BorderLayout.SOUTH);
} }
return getLabelPositionPane(comps,row,col); return panel;
} }
return new JPanel(); return new JPanel();
} }
@ -207,7 +212,7 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
checkPositionEnabled(); checkPositionEnabled();
} }
private void checkPositionEnabled() { private void checkPositionEnabled() {
tractionLine.setEnabled(position.getSelectedItem() == Constants.OUTSIDE); tractionLinePane.setVisible(position.getSelectedItem() == Constants.OUTSIDE);
} }
public void populate(AttrLabelDetail detail) { public void populate(AttrLabelDetail detail) {

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

@ -109,7 +109,7 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
JPanel panel = new JPanel(new BorderLayout()); JPanel panel = new JPanel(new BorderLayout());
setColorPaneContent(panel); setColorPaneContent(panel);
JPanel colorPane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Color"), panel); JPanel colorPane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Color"), panel);
panel.setBorder(BorderFactory.createEmptyBorder(10,10,0,15)); panel.setBorder(BorderFactory.createEmptyBorder(10,5,0,0));
return colorPane; return colorPane;
} }
@ -144,7 +144,7 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
//填充颜色 //填充颜色
protected JPanel createAreaFillColorPane() { protected JPanel createAreaFillColorPane() {
areaSeriesFillColorPane = new VanChartAreaSeriesFillColorPane(); areaSeriesFillColorPane = new VanChartAreaSeriesFillColorPane();
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_FillColor"), areaSeriesFillColorPane); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Chart_Area"), areaSeriesFillColorPane);
} }
//边框(默认没有圆角) //边框(默认没有圆角)

26
designer_chart/src/com/fr/plugin/chart/designer/style/tooltip/VanChartPlotTooltipPane.java

@ -80,7 +80,8 @@ public class VanChartPlotTooltipPane extends BasicPane {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; 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}; double[] rowSize = {p,p,p,p,p,p,p,p,p};
Component[][] components = createComponents(plot); Component[][] components = createComponents(plot);
@ -115,21 +116,15 @@ public class VanChartPlotTooltipPane extends BasicPane {
}; };
} }
}; };
UILabel text = new UILabel(Inter.getLocText("Plugin-Chart_Character"), SwingConstants.LEFT);
double p = TableLayout.PREFERRED; JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-Chart_Character"), style);
double f = TableLayout.FILL; JPanel panel1 = new JPanel(new BorderLayout());
double[] columnSize = {p, f}; panel1.add(panel, BorderLayout.CENTER);
double[] rowSize = {p, p, p}; panel1.add(textFontPane, BorderLayout.SOUTH);
Component[][] components = new Component[][]{
new Component[]{null, null},
new Component[]{text, style},
new Component[]{null, textFontPane},
};
initStyleListener(); initStyleListener();
JPanel panel = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style"), panel1);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style"), panel);
} }
@ -148,7 +143,8 @@ public class VanChartPlotTooltipPane extends BasicPane {
Inter.getLocText("Plugin-ChartF_NotFollowMouse")}); Inter.getLocText("Plugin-ChartF_NotFollowMouse")});
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = { p,f }; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] rowSize = { p,p,p}; double[] rowSize = { p,p,p};
Component[][] components = new Component[3][2]; Component[][] components = new Component[3][2];
components[0] = new Component[]{null,null}; components[0] = new Component[]{null,null};
@ -186,7 +182,7 @@ public class VanChartPlotTooltipPane extends BasicPane {
} }
private void checkStyleUse() { private void checkStyleUse() {
textFontPane.setEnabled(style.getSelectedIndex() == 1); textFontPane.setVisible(style.getSelectedIndex() == 1);
} }
protected AttrTooltip getAttrTooltip() { protected AttrTooltip getAttrTooltip() {

6
designer_chart/src/com/fr/plugin/chart/gantt/designer/style/axis/GanttAxisStylePane.java

@ -8,6 +8,7 @@ import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ColorSelectBoxWithOutTransparent; import com.fr.design.mainframe.chart.gui.ColorSelectBoxWithOutTransparent;
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane; import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.gantt.attr.GanttAxisStyleAttr; import com.fr.plugin.chart.gantt.attr.GanttAxisStyleAttr;
import javax.swing.*; import javax.swing.*;
@ -28,13 +29,14 @@ public class GanttAxisStylePane extends BasicBeanPane<GanttAxisStyleAttr> {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] row = {p,p,p}; double[] row = {p,p,p};
double[] col = {p, f}; double[] col = {f, e};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{textAttrPane, null}, new Component[]{textAttrPane, null},
new Component[]{new UILabel(Inter.getLocText("FR-Chart-Color_Color")), colorSelectBox4button}, new Component[]{new UILabel(Inter.getLocText("FR-Chart-Color_Color")), colorSelectBox4button},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Alpha"), SwingConstants.RIGHT), transparent} new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Alpha")), transparent}
}; };
JPanel content = TableLayoutHelper.createTableLayoutPane(components, row, col); JPanel content = TableLayoutHelper.createTableLayoutPane(components, row, col);

13
designer_chart/src/com/fr/plugin/chart/gantt/designer/style/axis/GanttTimeAxisPane.java

@ -71,17 +71,18 @@ public class GanttTimeAxisPane extends AbstractVanChartScrollPane<VanChart> {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] row = {p,p,p}; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] col = {p, f}; double[] row = {p, p, p, p};
double[] col = {f, e};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{null, null}, new Component[]{null, null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Time_Zoom"), SwingConstants.RIGHT), timeZoom}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Time_Zoom")), timeZoom},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Initial_Level"), SwingConstants.RIGHT), initialLevel}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Initial_Level")), initialLevel},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Weekend_Tooltip"), SwingConstants.RIGHT), weekendTooltip} new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Weekend_Tooltip")), weekendTooltip}
}; };
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, row, col); JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Condition_Config"),panel); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Condition_Config"),panel);
} }

6
designer_chart/src/com/fr/plugin/chart/gantt/designer/style/series/VanChartGanttCommonMarkerPane.java

@ -5,9 +5,9 @@ import com.fr.chart.chartglyph.Marker;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.chart.gui.ColorSelectBoxWithOutTransparent; import com.fr.design.mainframe.chart.gui.ColorSelectBoxWithOutTransparent;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.marker.type.MarkerType;
import com.fr.plugin.chart.base.VanChartAttrMarker; import com.fr.plugin.chart.base.VanChartAttrMarker;
import com.fr.plugin.chart.designer.component.marker.VanChartCommonMarkerPane; import com.fr.plugin.chart.designer.component.marker.VanChartCommonMarkerPane;
import com.fr.plugin.chart.marker.type.MarkerType;
import java.awt.*; import java.awt.*;
@ -27,8 +27,8 @@ public class VanChartGanttCommonMarkerPane extends VanChartCommonMarkerPane {
colorSelect = new ColorSelectBoxWithOutTransparent(100); colorSelect = new ColorSelectBoxWithOutTransparent(100);
return new Component[][]{ return new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Shape") + ":"), getMarkerPane()}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Shape")), getMarkerPane()},
new Component[]{new UILabel(Inter.getLocText("FR-Chart-Color_Color") + ":"), colorSelect} new Component[]{new UILabel(Inter.getLocText("FR-Chart-Color_Color")), colorSelect}
}; };
} }

17
designer_chart/src/com/fr/plugin/chart/gantt/designer/style/series/VanChartGanttSeriesPane.java

@ -58,12 +58,8 @@ public class VanChartGanttSeriesPane extends VanChartAbstractPlotSeriesPane {
private JPanel createGanntStylePane(){ private JPanel createGanntStylePane(){
seriesNewLine = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Open"), Inter.getLocText("Plugin-ChartF_Close")}); seriesNewLine = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Open"), Inter.getLocText("Plugin-ChartF_Close")});
JPanel panel = new JPanel(new BorderLayout(5, 0)); JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_Series_New_Line"),seriesNewLine);
panel.add(new UILabel(Inter.getLocText("Plugin-ChartF_Series_New_Line")), BorderLayout.WEST);
panel.add(seriesNewLine, BorderLayout.CENTER);
JPanel ganntStylePane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Style"), panel); JPanel ganntStylePane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Style"), panel);
panel.setBorder(BorderFactory.createEmptyBorder(10,10,0,15));
return ganntStylePane; return ganntStylePane;
} }
@ -73,17 +69,18 @@ public class VanChartGanttSeriesPane extends VanChartAbstractPlotSeriesPane {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] col = {f, e};
double[] row = {p,p,p}; double[] row = {p,p,p};
double[] col = {p,f};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_LineStyle")+":"), lineWidth}, new Component[]{null, null},
new Component[]{new UILabel(Inter.getLocText("FR-Chart-Color_Color")+":"), colorSelect} new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_LineStyle")), lineWidth},
new Component[]{new UILabel(Inter.getLocText("FR-Chart-Color_Color")), colorSelect}
}; };
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, row, col); JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col);
JPanel linkLinePane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Link_Line"), panel); JPanel linkLinePane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Link_Line"), panel);
panel.setBorder(BorderFactory.createEmptyBorder(10,10,0,15));
return linkLinePane; return linkLinePane;
} }

5
designer_chart/src/com/fr/plugin/chart/pie/RadiusCardLayoutPane.java

@ -24,9 +24,6 @@ public class RadiusCardLayoutPane extends BasicBeanPane<Plot> {
private static final double MIN_RADIUS = 0; private static final double MIN_RADIUS = 0;
private static final double MAX_RADIUS = Double.MAX_VALUE; private static final double MAX_RADIUS = Double.MAX_VALUE;
//半径距离左边框的距离
private static final int RADIUS_LEFT_MARGIN = 53;
private UIComboBox radiusType;//半径类型 private UIComboBox radiusType;//半径类型
private JPanel radiusContent;//半径的布局界面 private JPanel radiusContent;//半径的布局界面
private UISpinner radius;//半径值 private UISpinner radius;//半径值
@ -45,7 +42,7 @@ public class RadiusCardLayoutPane extends BasicBeanPane<Plot> {
radiusContent = new JPanel(new BorderLayout()); radiusContent = new JPanel(new BorderLayout());
radiusContent.add(radius, BorderLayout.CENTER); radiusContent.add(radius, BorderLayout.CENTER);
radiusContent.setBorder(BorderFactory.createEmptyBorder(0, RADIUS_LEFT_MARGIN, 0, 0)); radiusContent.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
nullPane = new JPanel(); nullPane = new JPanel();

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

@ -37,11 +37,12 @@ public class VanChartPieSeriesPane extends VanChartAbstractPlotSeriesPane {
protected JPanel getContentInPlotType() { protected JPanel getContentInPlotType() {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f}; double[] columnSize = {f};
double[] rowSize = {p,p,p,p,p}; double[] rowSize = {p,p,p,p,p,p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{getColorPane()}, new Component[]{getColorPane()},
new Component[]{createSeriesStylePane(rowSize, new double[]{p,f})}, new Component[]{createSeriesStylePane(rowSize, new double[]{f, e})},
new Component[]{createBorderPane()}, new Component[]{createBorderPane()},
}; };

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

@ -33,7 +33,7 @@ public class SectionLegendPane extends JPanel{
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] col = {f}; double[] col = {f};
double[] row = {p, p, p, p}; double[] row = {p, p, p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{null}, new Component[]{null},
new Component[]{intervalConfigPaneWithTitle}, new Component[]{intervalConfigPaneWithTitle},

5
designer_chart/src/com/fr/plugin/chart/scatter/component/VanChartScatterLineTypePane.java

@ -5,6 +5,7 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.base.VanChartAttrLine; import com.fr.plugin.chart.base.VanChartAttrLine;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.component.VanChartLineTypePane; import com.fr.plugin.chart.designer.component.VanChartLineTypePane;
import com.fr.plugin.chart.type.LineStyle; import com.fr.plugin.chart.type.LineStyle;
import com.fr.stable.Constants; import com.fr.stable.Constants;
@ -27,8 +28,8 @@ public class VanChartScatterLineTypePane extends VanChartLineTypePane {
@Override @Override
protected JPanel createContentPane(double p, double f) { protected JPanel createContentPane(double p, double f) {
double[] row = {p,p,p}; double[] row = {p,p,p};
double[] col = {p,f}; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] col = {f, e};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{null,null}, new Component[]{null,null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_LineStyle")), lineWidth}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_LineStyle")), lineWidth},

26
designer_chart/src/com/fr/plugin/chart/wordcloud/designer/style/VanChartWordCloudSeriesPane.java

@ -3,6 +3,7 @@ package com.fr.plugin.chart.wordcloud.designer.style;
import com.fr.base.Utils; import com.fr.base.Utils;
import com.fr.base.background.ImageBackground; import com.fr.base.background.ImageBackground;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
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.gui.ispinner.UISpinner; import com.fr.design.gui.ispinner.UISpinner;
@ -21,6 +22,8 @@ import com.fr.plugin.chart.wordcloud.VanChartWordCloudPlot;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent; import java.awt.event.ItemEvent;
import java.awt.event.ItemListener; import java.awt.event.ItemListener;
@ -31,11 +34,11 @@ public class VanChartWordCloudSeriesPane extends VanChartAbstractPlotSeriesPane
private static final String AUTO_FONT_SIZE = Inter.getLocText("Plugin-ChartF_Auto"); private static final String AUTO_FONT_SIZE = Inter.getLocText("Plugin-ChartF_Auto");
private static final String CUSTOM_FONT_SIZE = Inter.getLocText("Plugin-ChartF_Define_Size"); private static final String CUSTOM_FONT_SIZE = Inter.getLocText("Plugin-ChartF_Define_Size");
private static final double MAX_ROTATION = 90; private static final double MAX_ROTATION = 90;
private static final double LABEL_SIZE = 48; private static final double LABEL_SIZE = 65;
private UIComboBox fontNameComboBox; private UIComboBox fontNameComboBox;
private UISpinner minRotation; private UISpinner minRotation;
private UISpinner maxRotation; private UISpinner maxRotation;
private UIComboBox defineFontSize; private UIButtonGroup defineFontSize;
private JPanel fontPanel; private JPanel fontPanel;
private UISpinner minFontSize; private UISpinner minFontSize;
private UISpinner maxFontSize; private UISpinner maxFontSize;
@ -69,13 +72,14 @@ public class VanChartWordCloudSeriesPane extends VanChartAbstractPlotSeriesPane
//设置色彩面板内容 //设置色彩面板内容
protected void setColorPaneContent (JPanel panel) { protected void setColorPaneContent (JPanel panel) {
panel.add(getFillStylePane(), BorderLayout.NORTH); panel.add(getFillStylePane(), BorderLayout.NORTH);
panel.add(createAlphaPane(), BorderLayout.CENTER);
} }
private JPanel createWordCloudStylePane(){ private JPanel createWordCloudStylePane(){
double labelSize = LABEL_SIZE; double labelSize = LABEL_SIZE;
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] centerC = {labelSize,f,p,f}; double[] centerC = {labelSize,f,p,f};
double[] centerR = {p}; double[] centerR = {p};
@ -87,17 +91,17 @@ public class VanChartWordCloudSeriesPane extends VanChartAbstractPlotSeriesPane
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Rotation_Angle")), minRotation, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Rotation_Angle")), minRotation,
new UILabel("-"), maxRotation}, new UILabel("-"), maxRotation},
}; };
JPanel centerPanel = TableLayoutHelper.createTableLayoutPane(centerComps,centerR,centerC); JPanel centerPanel = TableLayout4VanChartHelper.createGapTableLayoutPane(centerComps,centerR,centerC);
double[] northC = {labelSize,f}; double[] northC = {f, e};
double[] northR = {p,p}; double[] northR = {p,p};
fontNameComboBox = new UIComboBox(Utils.getAvailableFontFamilyNames4Report()); fontNameComboBox = new UIComboBox(Utils.getAvailableFontFamilyNames4Report());
defineFontSize = new UIComboBox(new String[]{AUTO_FONT_SIZE, CUSTOM_FONT_SIZE}); defineFontSize = new UIButtonGroup(new String[]{AUTO_FONT_SIZE, CUSTOM_FONT_SIZE});
Component[][] northComps = new Component[][]{ Component[][] northComps = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("FR-Designer_Font")), fontNameComboBox}, new Component[]{new UILabel(Inter.getLocText("FR-Designer_Font")), fontNameComboBox},
new Component[]{new UILabel(Inter.getLocText("FR-Designer_Font-Size")), defineFontSize } new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Custom")), defineFontSize }
}; };
JPanel northPanel = TableLayoutHelper.createTableLayoutPane(northComps,northR,northC); JPanel northPanel = TableLayout4VanChartHelper.createGapTableLayoutPane(northComps,northR,northC);
minFontSize = new UISpinner(0,Double.MAX_VALUE,1,10); minFontSize = new UISpinner(0,Double.MAX_VALUE,1,10);
maxFontSize = new UISpinner(0,Double.MAX_VALUE,1,100); maxFontSize = new UISpinner(0,Double.MAX_VALUE,1,100);
@ -105,7 +109,7 @@ public class VanChartWordCloudSeriesPane extends VanChartAbstractPlotSeriesPane
new Component[]{null, minFontSize, new Component[]{null, minFontSize,
new UILabel("-"), maxFontSize}, new UILabel("-"), maxFontSize},
}; };
fontPanel = TableLayoutHelper.createTableLayoutPane(fontComps,centerR,centerC); fontPanel = TableLayout4VanChartHelper.createGapTableLayoutPane(fontComps,centerR,centerC);
double[] columnSize = {f}; double[] columnSize = {f};
double[] rowSize = {p, p, p, p}; double[] rowSize = {p, p, p, p};
@ -117,9 +121,9 @@ public class VanChartWordCloudSeriesPane extends VanChartAbstractPlotSeriesPane
}; };
defineFontSize.addItemListener(new ItemListener() { defineFontSize.addActionListener(new ActionListener() {
@Override @Override
public void itemStateChanged(ItemEvent e) { public void actionPerformed(ActionEvent e) {
checkFontPane(); checkFontPane();
} }
}); });

Loading…
Cancel
Save