Browse Source

9.0新图表面板调整:

1、样式:标签面板
2、样式:提示面板
3、样式:数据表面板
master
mengao 7 years ago
parent
commit
10aa386621
  1. 19
      designer_base/src/com/fr/design/gui/style/FormatPane.java
  2. 34
      designer_chart/src/com/fr/plugin/chart/designer/component/VanChartTooltipContentPane.java
  3. 37
      designer_chart/src/com/fr/plugin/chart/designer/component/format/DataSheetFormatPane.java
  4. 36
      designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPane4Gauge.java
  5. 7
      designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithCate.java
  6. 7
      designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithCateValue.java
  7. 7
      designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithOutCate.java
  8. 7
      designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithPercent.java
  9. 6
      designer_chart/src/com/fr/plugin/chart/designer/component/tooltip/TooltipContentPaneWithOutSeries.java
  10. 25
      designer_chart/src/com/fr/plugin/chart/designer/style/datasheet/VanChartDataSheetPane.java
  11. 4
      designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugeCateOrPercentLabelDetailPane.java
  12. 40
      designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugeLabelDetailPane.java
  13. 7
      designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugePlotLabelPane.java
  14. 8
      designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugeValueLabelDetailPane.java
  15. 4
      designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartLabelPane.java
  16. 70
      designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartPlotLabelDetailPane.java
  17. 4
      designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartPlotLabelPane.java
  18. 7
      designer_chart/src/com/fr/plugin/chart/designer/style/tooltip/VanChartPlotRefreshTooltipPane.java
  19. 51
      designer_chart/src/com/fr/plugin/chart/designer/style/tooltip/VanChartPlotTooltipPane.java
  20. 6
      designer_chart/src/com/fr/plugin/chart/designer/style/tooltip/VanChartTooltipPane.java

19
designer_base/src/com/fr/design/gui/style/FormatPane.java

@ -104,18 +104,21 @@ public class FormatPane extends AbstractBasicStylePane {
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;
Component[][] components = new Component[][]{
double[] rowSize = {p, p, p, p, p};
double[] columnSize = {p, f};
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 3}, {1, 1}};
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(getComponent(fontPane, centerPane, frFontPane), rowSize, columnSize, rowCount, LayoutConstants.VGAP_SMALL, LayoutConstants.VGAP_MEDIUM);
this.add(panel, BorderLayout.CENTER);
}
protected Component[][] getComponent (JPanel fontPane, JPanel centerPane, FRFontPane frFontPane) {
return new Component[][]{
new Component[]{null, null},
new Component[]{new UILabel(Inter.getLocText("FR-Base_Format") + " ", SwingConstants.LEFT), typeComboBox},
new Component[]{null, centerPane},
new Component[]{fontPane, frFontPane},
new Component[]{null, null}
};
double[] rowSize = {p, p, p, p, p};
double[] columnSize = {p, f};
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 3}, {1, 1}};
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_SMALL, LayoutConstants.VGAP_MEDIUM);
this.add(panel, BorderLayout.CENTER);
}
protected UIComboBoxRenderer createComBoxRender() {
@ -375,6 +378,10 @@ public class FormatPane extends AbstractBasicStylePane {
};
typeComboBox.setRenderer(render);
typeComboBox.addItemListener(itemListener);
setTypeComboBoxPane(typeComboBox);
}
protected void setTypeComboBoxPane (UIComboBox typeComboBox) {
this.add(typeComboBox, BorderLayout.NORTH);
}

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

@ -2,12 +2,18 @@ package com.fr.plugin.chart.designer.component;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.ibutton.UIButtonGroup;
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 com.fr.plugin.chart.base.AttrTooltipContent;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.component.format.*;
import com.fr.plugin.chart.designer.component.format.CategoryNameFormatPaneWithCheckBox;
import com.fr.plugin.chart.designer.component.format.ChangedPercentFormatPaneWithCheckBox;
import com.fr.plugin.chart.designer.component.format.ChangedValueFormatPaneWithCheckBox;
import com.fr.plugin.chart.designer.component.format.PercentFormatPaneWithCheckBox;
import com.fr.plugin.chart.designer.component.format.SeriesNameFormatPaneWithCheckBox;
import com.fr.plugin.chart.designer.component.format.ValueFormatPaneWithCheckBox;
import com.fr.plugin.chart.designer.style.VanChartStylePane;
import javax.swing.*;
@ -38,6 +44,10 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
private VanChartStylePane parent;
private JPanel showOnPane;
public JPanel getCenterPane() {
return centerPane;
}
public VanChartTooltipContentPane(VanChartStylePane parent, JPanel showOnPane){
this.parent = parent;
this.showOnPane = showOnPane;
@ -76,10 +86,22 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
centerPane.add(commonPanel,Inter.getLocText("Plugin-ChartF_Common"));
initContentListener();
return getContentPane();
}
protected JPanel getContentPane (){
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] column = {p, f};
double[] row = {p,p,p};
Component[][] components = new Component[][]{
new Component[]{null,null},
new Component[]{new UILabel(Inter.getLocText("FR-Designer_Text")),content},
new Component[]{null,centerPane},
};
JPanel contentPane = new JPanel(new BorderLayout(0, 4));
contentPane.add(content, BorderLayout.NORTH);
contentPane.add(centerPane, BorderLayout.CENTER);
JPanel contentPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components,row,column);
return createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Content"), contentPane);
}
@ -95,8 +117,8 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
percentFormatPane = new PercentFormatPaneWithCheckBox(parent, showOnPane);
}
protected JPanel createTableLayoutPaneWithTitle(String title, Component component) {
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(title, component);
protected JPanel createTableLayoutPaneWithTitle(String title, JPanel panel) {
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(title, panel);
}
protected double[] getRowSize(double p){

37
designer_chart/src/com/fr/plugin/chart/designer/component/format/DataSheetFormatPane.java

@ -0,0 +1,37 @@
package com.fr.plugin.chart.designer.component.format;
import com.fr.design.gui.icombobox.UIComboBox;
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.layout.TableLayout;
import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import javax.swing.*;
import java.awt.*;
/**
* Created by mengao on 2017/8/14.
*/
public class DataSheetFormatPane extends FormatPane {
protected Component[][] getComponent(JPanel fontPane, JPanel centerPane, FRFontPane frFontPane) {
return new Component[][]{
new Component[]{null, centerPane},
};
}
protected void setTypeComboBoxPane(UIComboBox typeComboBox) {
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;
double[] rowSize = {p, p};
double[] columnSize = {p, f};
Component[][] components = new Component[][]{
new Component[]{null, null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_DataType") + " ", SwingConstants.LEFT), typeComboBox},
};
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize);
this.add(panel, BorderLayout.NORTH);
}
}

36
designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPane4Gauge.java

@ -0,0 +1,36 @@
package com.fr.plugin.chart.designer.component.label;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.component.VanChartLabelContentPane;
import com.fr.plugin.chart.designer.style.VanChartStylePane;
import javax.swing.*;
import java.awt.*;
/**
* Created by mengao on 2017/8/13.
*/
public class LabelContentPane4Gauge extends VanChartLabelContentPane {
public LabelContentPane4Gauge(VanChartStylePane parent, JPanel showOnPane) {
super(parent, showOnPane);
}
protected JPanel getContentPane (){
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] column = {p, f};
double[] row = {p,p,p};
Component[][] components = new Component[][]{
new Component[]{null,null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Content")),content},
new Component[]{null,getCenterPane()},
};
return TableLayout4VanChartHelper.createGapTableLayoutPane(components,row,column);
}
}

7
designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithCate.java

@ -1,7 +1,6 @@
package com.fr.plugin.chart.designer.component.label;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.component.VanChartLabelContentPane;
import com.fr.plugin.chart.designer.style.VanChartStylePane;
import javax.swing.*;
@ -10,7 +9,7 @@ import java.awt.*;
/**
* 只有分类仪表盘的分类标签
*/
public class LabelContentPaneWithCate extends VanChartLabelContentPane {
public class LabelContentPaneWithCate extends LabelContentPane4Gauge {
private static final long serialVersionUID = 1238530475858471304L;
@ -18,8 +17,8 @@ public class LabelContentPaneWithCate extends VanChartLabelContentPane {
super(parent, showOnPane);
}
protected JPanel createTableLayoutPaneWithTitle(String title, Component component) {
return TableLayout4VanChartHelper.createTableLayoutPaneWithSmallTitle(title, component);
protected JPanel createTableLayoutPaneWithTitle(String title, JPanel panel) {
return TableLayout4VanChartHelper.createTableLayoutPaneWithSmallTitle(title, panel);
}
protected double[] getRowSize(double p){

7
designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithCateValue.java

@ -1,7 +1,6 @@
package com.fr.plugin.chart.designer.component.label;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.component.VanChartLabelContentPane;
import com.fr.plugin.chart.designer.style.VanChartStylePane;
import javax.swing.*;
@ -10,7 +9,7 @@ import java.awt.*;
/**
* 分类和值仪表盘的值标签
*/
public class LabelContentPaneWithCateValue extends VanChartLabelContentPane {
public class LabelContentPaneWithCateValue extends LabelContentPane4Gauge {
private static final long serialVersionUID = -8286902939543416431L;
@ -18,8 +17,8 @@ public class LabelContentPaneWithCateValue extends VanChartLabelContentPane {
super(parent, showOnPane);
}
protected JPanel createTableLayoutPaneWithTitle(String title, Component component) {
return TableLayout4VanChartHelper.createTableLayoutPaneWithSmallTitle(title, component);
protected JPanel createTableLayoutPaneWithTitle(String title, JPanel panel) {
return TableLayout4VanChartHelper.createTableLayoutPaneWithSmallTitle(title, panel);
}
protected double[] getRowSize(double p){

7
designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithOutCate.java

@ -1,7 +1,6 @@
package com.fr.plugin.chart.designer.component.label;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.component.VanChartLabelContentPane;
import com.fr.plugin.chart.designer.style.VanChartStylePane;
import javax.swing.*;
@ -10,7 +9,7 @@ import java.awt.*;
/**
* 系列值所占比例仪表盘的值标签
*/
public class LabelContentPaneWithOutCate extends VanChartLabelContentPane {
public class LabelContentPaneWithOutCate extends LabelContentPane4Gauge {
private static final long serialVersionUID = 1198062632979554467L;
@ -18,8 +17,8 @@ public class LabelContentPaneWithOutCate extends VanChartLabelContentPane {
super(parent, showOnPane);
}
protected JPanel createTableLayoutPaneWithTitle(String title, Component component) {
return TableLayout4VanChartHelper.createTableLayoutPaneWithSmallTitle(title, component);
protected JPanel createTableLayoutPaneWithTitle(String title, JPanel panel) {
return TableLayout4VanChartHelper.createTableLayoutPaneWithSmallTitle(title, panel);
}
protected double[] getRowSize(double p){

7
designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithPercent.java

@ -1,7 +1,6 @@
package com.fr.plugin.chart.designer.component.label;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.component.VanChartLabelContentPane;
import com.fr.plugin.chart.designer.style.VanChartStylePane;
import javax.swing.*;
@ -10,15 +9,15 @@ import java.awt.*;
/**
* 只有百分比仪表盘的百分比标签
*/
public class LabelContentPaneWithPercent extends VanChartLabelContentPane {
public class LabelContentPaneWithPercent extends LabelContentPane4Gauge {
private static final long serialVersionUID = -3739217668948747606L;
public LabelContentPaneWithPercent(VanChartStylePane parent, JPanel showOnPane){
super(parent, showOnPane);
}
protected JPanel createTableLayoutPaneWithTitle(String title, Component component) {
return TableLayout4VanChartHelper.createTableLayoutPaneWithSmallTitle(title, component);
protected JPanel createTableLayoutPaneWithTitle(String title, JPanel panel) {
return TableLayout4VanChartHelper.createTableLayoutPaneWithSmallTitle(title, panel);
}
protected double[] getRowSize(double p){

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

@ -1,6 +1,5 @@
package com.fr.plugin.chart.designer.component.tooltip;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.component.VanChartTooltipContentPane;
import com.fr.plugin.chart.designer.style.VanChartStylePane;
@ -18,11 +17,6 @@ public class TooltipContentPaneWithOutSeries extends VanChartTooltipContentPane{
super(parent, showOnPane);
}
@Override
protected JPanel createTableLayoutPaneWithTitle(String title, Component component) {
return TableLayout4VanChartHelper.createTableLayoutPaneWithSmallTitle(title, component);
}
protected double[] getRowSize(double p){
return new double[]{p,p,p};
}

25
designer_chart/src/com/fr/plugin/chart/designer/style/datasheet/VanChartDataSheetPane.java

@ -5,9 +5,7 @@ import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.DataSheet;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.style.FormatPane;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
@ -17,10 +15,13 @@ import com.fr.general.ComparatorUtils;
import com.fr.general.FRFont;
import com.fr.general.Inter;
import com.fr.plugin.chart.VanChartAttrHelper;
import com.fr.plugin.chart.type.AxisType;
import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot;
import com.fr.plugin.chart.base.VanChartConstants;
import com.fr.plugin.chart.designer.AbstractVanChartScrollPane;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.component.border.VanChartBorderPane;
import com.fr.plugin.chart.designer.component.format.DataSheetFormatPane;
import com.fr.plugin.chart.type.AxisType;
import javax.swing.*;
import java.awt.*;
@ -30,7 +31,7 @@ import java.awt.event.ActionListener;
/**
* 样式-数据表
*/
public class VanChartDataSheetPane extends BasicScrollPane<Chart> {
public class VanChartDataSheetPane extends AbstractVanChartScrollPane<Chart> {
private static final long serialVersionUID = 5547658195141361981L;
private UICheckBox isShowDataSheet;
@ -73,7 +74,6 @@ public class VanChartDataSheetPane extends BasicScrollPane<Chart> {
Component[][] components = new Component[][]{
new Component[]{isShowDataSheet},
new Component[]{new JSeparator()},
new Component[]{dataSheetPane}
};
return components;
@ -85,23 +85,18 @@ public class VanChartDataSheetPane extends BasicScrollPane<Chart> {
private JPanel createDataSheetPane(){
textAttrPane = new ChartTextAttrPane();
formatPane = new FormatPane();
formatPane = new DataSheetFormatPane();
formatPane.setForDataSheet();
borderPane = new VanChartBorderPane();
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {LayoutConstants.CHART_ATTR_TOMARGIN, f};
double[] rowSize = {p,p,p,p,p,p,p,p};
double[] rowSize = {p,p,p};
Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("FR-Designer-Widget_Style")),null},
new Component[]{null,textAttrPane},
new Component[]{new JSeparator(),null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_DataType")),null},
new Component[]{null,formatPane},
new Component[]{new JSeparator(),null},
new Component[]{borderPane,null},
new Component[]{new JSeparator(),null},
new Component[]{TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Base_Format"),formatPane),null},
new Component[]{TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style"),textAttrPane),null},
new Component[]{TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Border"),borderPane),null},
};
return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize);

4
designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugeCateOrPercentLabelDetailPane.java

@ -5,8 +5,8 @@ import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.component.label.LabelContentPaneWithCate;
import com.fr.plugin.chart.designer.component.label.LabelContentPaneWithPercent;
import com.fr.plugin.chart.designer.style.VanChartStylePane;
import com.fr.plugin.chart.type.GaugeStyle;
import com.fr.plugin.chart.gauge.VanChartGaugePlot;
import com.fr.plugin.chart.type.GaugeStyle;
import javax.swing.*;
import java.awt.*;
@ -14,7 +14,7 @@ import java.awt.*;
/**
* 仪表盘的分类多指针时或者百分比标签
*/
public class VanChartGaugeCateOrPercentLabelDetailPane extends VanChartPlotLabelDetailPane {
public class VanChartGaugeCateOrPercentLabelDetailPane extends VanChartGaugeLabelDetailPane {
private static final long serialVersionUID = 5176535960949074945L;

40
designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugeLabelDetailPane.java

@ -0,0 +1,40 @@
package com.fr.plugin.chart.designer.style.label;
import com.fr.chart.chartattr.Plot;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane;
import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.style.VanChartStylePane;
import javax.swing.*;
import java.awt.*;
/**
* Created by mengao on 2017/8/13.
*/
public class VanChartGaugeLabelDetailPane extends VanChartPlotLabelDetailPane {
public VanChartGaugeLabelDetailPane(Plot plot, VanChartStylePane parent) {
super(plot, parent);
}
protected JPanel createLabelStylePane(double[] row, double[] col, Plot plot) {
style = new UIButtonGroup<Integer>(new String[]{Inter.getLocText("Plugin-ChartF_Automatic"),
Inter.getLocText("Plugin-ChartF_Custom")});
textFontPane = new ChartTextAttrPane();
initStyleListener();
return TableLayoutHelper.createTableLayoutPane(getLabelStyleComponents(plot),row,col);
}
protected JPanel getLabelPositionPane (Component[][] comps, double[] row, double[] col){
return TableLayoutHelper.createTableLayoutPane(comps,row,col);
}
protected JPanel createTableLayoutPaneWithTitle(String title, JPanel panel) {
return TableLayout4VanChartHelper.createGapTableLayoutPane(title, panel);
}
}

7
designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugePlotLabelPane.java

@ -5,8 +5,8 @@ import com.fr.general.Inter;
import com.fr.plugin.chart.base.AttrLabel;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.style.VanChartStylePane;
import com.fr.plugin.chart.type.GaugeStyle;
import com.fr.plugin.chart.gauge.VanChartGaugePlot;
import com.fr.plugin.chart.type.GaugeStyle;
import javax.swing.*;
import java.awt.*;
@ -40,10 +40,9 @@ public class VanChartGaugePlotLabelPane extends VanChartPlotLabelPane {
cateTitle = Inter.getLocText("Plugin-ChartF_PercentLabel");
break;
}
JPanel cateOrPercentPane = TableLayout4VanChartHelper.createTableLayoutPaneWithSmallTitle(cateTitle, labelDetailPane);
JPanel valuePane = TableLayout4VanChartHelper.createTableLayoutPaneWithSmallTitle(valueTitle, gaugeValueLabelPane);
JPanel cateOrPercentPane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(cateTitle, labelDetailPane);
JPanel valuePane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(valueTitle, gaugeValueLabelPane);
labelPane.add(cateOrPercentPane, BorderLayout.NORTH);
labelPane.add(new JSeparator(), BorderLayout.CENTER);
labelPane.add(valuePane, BorderLayout.SOUTH);
}

8
designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugeValueLabelDetailPane.java

@ -5,8 +5,8 @@ import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.component.label.LabelContentPaneWithCateValue;
import com.fr.plugin.chart.designer.component.label.LabelContentPaneWithOutCate;
import com.fr.plugin.chart.designer.style.VanChartStylePane;
import com.fr.plugin.chart.type.GaugeStyle;
import com.fr.plugin.chart.gauge.VanChartGaugePlot;
import com.fr.plugin.chart.type.GaugeStyle;
import javax.swing.*;
import java.awt.*;
@ -14,7 +14,7 @@ import java.awt.*;
/**
* 仪表盘的值标签
*/
public class VanChartGaugeValueLabelDetailPane extends VanChartPlotLabelDetailPane {
public class VanChartGaugeValueLabelDetailPane extends VanChartGaugeLabelDetailPane {
private static final long serialVersionUID = 2601073419430634281L;
private GaugeStyle gaugeStyle;
@ -59,9 +59,7 @@ public class VanChartGaugeValueLabelDetailPane extends VanChartPlotLabelDetailPa
private Component[][] getLabelPaneComponentsWithBackground(Plot plot, double p, double[] columnSize) {
return new Component[][]{
new Component[]{dataLabelContentPane,null},
new Component[]{new JSeparator(),null},
new Component[]{createLabelStylePane(new double[]{p,p}, columnSize, plot),null},
new Component[]{new JSeparator(),null},
new Component[]{createLabelStylePane(new double[]{p,p,p}, columnSize, plot),null},
new Component[]{createBackgroundColorPane(),null},
};
}

4
designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartLabelPane.java

@ -4,17 +4,17 @@ import com.fr.chart.base.DataSeriesCondition;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.mainframe.chart.PaneTitleConstants;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.base.AttrLabel;
import com.fr.plugin.chart.designer.AbstractVanChartScrollPane;
import com.fr.plugin.chart.designer.PlotFactory;
import com.fr.plugin.chart.designer.style.VanChartStylePane;
import javax.swing.*;
import java.awt.*;
public class VanChartLabelPane extends BasicScrollPane<Chart> {
public class VanChartLabelPane extends AbstractVanChartScrollPane<Chart> {
private VanChartPlotLabelPane labelPane;
private Chart chart;
protected VanChartStylePane parent;

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

@ -5,6 +5,7 @@ import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ibutton.UIToggleButton;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane;
@ -34,7 +35,7 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
protected BasicBeanPane<AttrTooltipContent> dataLabelContentPane;
protected UIButtonGroup<Integer> position;
protected UIToggleButton autoAdjust;
protected UIButtonGroup<Boolean> autoAdjust;
protected UIToggleButton tractionLine;
protected UIButtonGroup<Integer> style;
@ -71,16 +72,13 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
if(hasLabelPosition(plot)){
return new Component[][]{
new Component[]{dataLabelContentPane,null},
new Component[]{new JSeparator(),null},
new Component[]{createLabelPositionPane(new double[]{p,p}, columnSize, plot),null},
new Component[]{new JSeparator(),null},
new Component[]{createLabelStylePane(new double[]{p,p}, columnSize, plot),null},
new Component[]{createLabelPositionPane(new double[]{p,p,p}, columnSize, plot),null},
new Component[]{createLabelStylePane(new double[]{p,p,p}, columnSize, plot),null},
};
} else {
return new Component[][]{
new Component[]{dataLabelContentPane,null},
new Component[]{new JSeparator(),null},
new Component[]{createLabelStylePane(new double[]{p,p}, columnSize, plot),null},
new Component[]{createLabelStylePane(new double[]{p,p,p}, columnSize, plot),null},
};
}
}
@ -93,8 +91,8 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
return plot instanceof VanChartLabelPositionPlot;
}
protected JPanel createTableLayoutPaneWithTitle(String title, Component component) {
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(title, component);
protected JPanel createTableLayoutPaneWithTitle(String title, JPanel panel) {
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(title, panel);
}
protected JPanel createLabelPositionPane(double[] row, double[] col, Plot plot) {
@ -110,33 +108,33 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
}
position = new UIButtonGroup<Integer>(names, values);
autoAdjust = new UIToggleButton(Inter.getLocText("Plugin-ChartF_Auto_Adjust"));
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];
comps[0] = new Component[]{null,null};
comps[1] = new Component[]{new UILabel(Inter.getLocText("Chart-Layout_Position"), SwingConstants.LEFT), position};
Component[] comps;
if(plot.isSupportLeadLine()){
tractionLine = new UIToggleButton(Inter.getLocText("ChartF-Show_GuidLine"));
comps = new Component[]{position, tractionLine};
comps[2] = new Component[]{null,tractionLine};
initPositionListener();
} else if(PlotFactory.plotAutoAdjustLabelPosition(plot)){
comps = new Component[]{position, autoAdjust};
} else {
comps = new Component[]{position};
}
int len = comps.length;
Component[][] components = new Component[len][2];
for(int i = 0; i < len; i++){
components[i] = new Component[]{comps[i], null};
comps[2]= new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Auto_Adjust"), SwingConstants.LEFT),autoAdjust};
}
JPanel panel = TableLayoutHelper.createTableLayoutPane(components,row,col);
return createTableLayoutPaneWithTitle(Inter.getLocText("Chart-Layout_Position"), panel);
return getLabelPositionPane(comps,row,col);
}
return new JPanel();
}
protected JPanel getLabelPositionPane (Component[][] comps, double[] row, double[] col){
JPanel panel = TableLayoutHelper.createTableLayoutPane(comps,row,col);
return createTableLayoutPaneWithTitle(Inter.getLocText("FR-Chart_Layout"), panel);
}
protected void initPositionListener() {
position.addChangeListener(new ChangeListener() {
@Override
@ -149,7 +147,15 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
protected JPanel createLabelStylePane(double[] row, double[] col, Plot plot) {
style = new UIButtonGroup<Integer>(new String[]{Inter.getLocText("Plugin-ChartF_Automatic"),
Inter.getLocText("Plugin-ChartF_Custom")});
textFontPane = new ChartTextAttrPane();
textFontPane = new ChartTextAttrPane(){
protected Component[][] getComponents(JPanel buttonPane) {
return new Component[][]{
new Component[]{null, null},
new Component[]{null, fontNameComboBox},
new Component[]{null, buttonPane}
};
}
};
initStyleListener();
@ -158,13 +164,15 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
}
protected Component[][] getLabelStyleComponents(Plot plot) {
UILabel text = new UILabel(Inter.getLocText("Plugin-Chart_Character"), SwingConstants.LEFT);
return new Component[][]{
new Component[]{style,null},
new Component[]{null,null},
new Component[]{text,style},
new Component[]{textFontPane,null},
};
}
private void initStyleListener() {
protected void initStyleListener() {
style.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@ -191,7 +199,7 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
}
private void checkStyleUse() {
textFontPane.setEnabled(style.getSelectedIndex() == 1);
textFontPane.setVisible(style.getSelectedIndex() == 1);
}
private void checkPosition() {
@ -211,7 +219,7 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
tractionLine.setSelected(detail.isShowGuidLine());
}
if(autoAdjust != null){
autoAdjust.setSelected(detail.isAutoAdjust());
autoAdjust.setSelectedIndex(detail.isAutoAdjust() == true ? 0 : 1);
}
style.setSelectedIndex(detail.isCustom() ? 1 : 0);
textFontPane.populate(detail.getTextAttr());
@ -234,7 +242,7 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
position.setSelectedItem(detail.getPosition());
}
detail.setAutoAdjust(autoAdjust != null && autoAdjust.isSelected());
detail.setAutoAdjust(autoAdjust != null && autoAdjust.getSelectedItem());
if(tractionLine != null){
detail.setShowGuidLine(tractionLine.isSelected() && detail.getPosition() == Constants.OUTSIDE);

4
designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartPlotLabelPane.java

@ -6,7 +6,6 @@ import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.general.Inter;
import com.fr.plugin.chart.VanChartAttrHelper;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.base.AttrLabel;
import com.fr.plugin.chart.designer.PlotFactory;
@ -46,10 +45,9 @@ public class VanChartPlotLabelPane extends BasicPane {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {f};
double[] rowSize = {p,p,p};
double[] rowSize = {p,p};
Component[][] components = new Component[][]{
new Component[]{isLabelShow},
new Component[]{new JSeparator()},
new Component[]{labelPane}
};

7
designer_chart/src/com/fr/plugin/chart/designer/style/tooltip/VanChartPlotRefreshTooltipPane.java

@ -57,13 +57,10 @@ public class VanChartPlotRefreshTooltipPane extends VanChartPlotTooltipNoCheckPa
protected Component[][] createComponents(Plot plot) {
Component[][] components = new Component[][]{
new Component[]{refreshTooltipContentPane,null},
new Component[]{new JSeparator(),null},
new Component[]{initDurationPane(),null},
new Component[]{new JSeparator(),null},
new Component[]{createLabelStylePane(),null},
new Component[]{new JSeparator(),null},
new Component[]{borderPane,null},
new Component[]{backgroundPane,null}
new Component[]{TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Border"),borderPane),null},
new Component[]{TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Background"), backgroundPane),null},
};
return components;

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

@ -3,8 +3,8 @@ package com.fr.plugin.chart.designer.style.tooltip;
import com.fr.chart.chartattr.Plot;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ibutton.UIToggleButton;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane;
@ -36,7 +36,7 @@ public class VanChartPlotTooltipPane extends BasicPane {
protected VanChartBackgroundWithOutImagePane backgroundPane;
protected UIToggleButton showAllSeries;
protected UICheckBox showAllSeries;
protected UIButtonGroup followMouse;
protected VanChartStylePane parent;
@ -55,10 +55,9 @@ public class VanChartPlotTooltipPane extends BasicPane {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {f};
double[] rowSize = {p,p,p};
double[] rowSize = {p,p};
Component[][] components = new Component[][]{
new Component[]{isTooltipShow},
new Component[]{new JSeparator()},
new Component[]{tooltipPane}
};
@ -92,11 +91,9 @@ public class VanChartPlotTooltipPane extends BasicPane {
protected Component[][] createComponents(Plot plot) {
Component[][] components = new Component[][]{
new Component[]{tooltipContentPane,null},
new Component[]{new JSeparator(),null},
new Component[]{createLabelStylePane(),null},
new Component[]{new JSeparator(),null},
new Component[]{borderPane,null},
new Component[]{backgroundPane,null},
new Component[]{TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Border"),borderPane),null},
new Component[]{TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Background"), backgroundPane),null},
new Component[]{createDisplayStrategy(plot),null},
};
return components;
@ -109,21 +106,30 @@ public class VanChartPlotTooltipPane extends BasicPane {
protected JPanel createLabelStylePane() {
style = new UIButtonGroup<Integer>(new String[]{Inter.getLocText("Plugin-ChartF_Automatic"),Inter.getLocText("Plugin-ChartF_Custom")});
textFontPane = new ChartTextAttrPane();
textFontPane = new ChartTextAttrPane() {
protected Component[][] getComponents(JPanel buttonPane) {
return new Component[][]{
new Component[]{null, null},
new Component[]{null, fontNameComboBox},
new Component[]{null, buttonPane}
};
}
};
UILabel text = new UILabel(Inter.getLocText("Plugin-Chart_Character"), SwingConstants.LEFT);
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p, f};
double[] rowSize = {p,p};
double[] rowSize = {p, p, p};
Component[][] components = new Component[][]{
new Component[]{style,null},
new Component[]{textFontPane,null},
new Component[]{null, null},
new Component[]{text, style},
new Component[]{null, textFontPane},
};
initStyleListener();
JPanel panel = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize);
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style"), panel);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style"), panel);
}
@ -137,15 +143,22 @@ public class VanChartPlotTooltipPane extends BasicPane {
}
protected JPanel createDisplayStrategy(Plot plot) {
showAllSeries = new UIToggleButton(getShowAllSeriesLabelText());
showAllSeries = new UICheckBox(getShowAllSeriesLabelText());
followMouse = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_FollowMouse"),
Inter.getLocText("Plugin-ChartF_NotFollowMouse")});
JPanel panel = new JPanel(new BorderLayout(0,4));
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = { p,f };
double[] rowSize = { p,p,p};
Component[][] components = new Component[3][2];
components[0] = new Component[]{null,null};
components[1] = new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Prompt_Box")),followMouse};
if(plot.isSupportTooltipSeriesType() && hasTooltipSeriesType()){
panel.add(showAllSeries, BorderLayout.NORTH);
components[2] = new Component[]{showAllSeries,null};
}
panel.add(followMouse,BorderLayout.SOUTH);
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_DisplayStrategy"), panel);
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components,rowSize,columnSize);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_DisplayStrategy"), panel);
}
protected String getShowAllSeriesLabelText() {

6
designer_chart/src/com/fr/plugin/chart/designer/style/tooltip/VanChartTooltipPane.java

@ -4,17 +4,17 @@ import com.fr.chart.base.DataSeriesCondition;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.design.dialog.BasicScrollPane;
import com.fr.general.Inter;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.base.AttrTooltip;
import com.fr.plugin.chart.designer.AbstractVanChartScrollPane;
import com.fr.plugin.chart.designer.PlotFactory;
import com.fr.plugin.chart.designer.style.VanChartStylePane;
import javax.swing.*;
import java.awt.*;
public class VanChartTooltipPane extends BasicScrollPane<Chart> {
public class VanChartTooltipPane extends AbstractVanChartScrollPane<Chart> {
private static final long serialVersionUID = -2974722365840564105L;
private VanChartPlotTooltipPane tooltipPane;
private Chart chart;
@ -70,7 +70,7 @@ public class VanChartTooltipPane extends BasicScrollPane<Chart> {
}
@Override
protected String title4PopupWindow() {
public String title4PopupWindow() {
return Inter.getLocText("Plugin-Chart_Tooltip");
}

Loading…
Cancel
Save