Browse Source

坐标轴系列等面板

master
mengao 7 years ago
parent
commit
425efd12c7
  1. 4
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java
  2. 40
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java
  3. 4
      designer_chart/src/com/fr/plugin/chart/column/VanChartColumnSeriesPane.java
  4. 10
      designer_chart/src/com/fr/plugin/chart/designer/AbstractVanChartAttrPane.java
  5. 8
      designer_chart/src/com/fr/plugin/chart/designer/AbstractVanChartTabPane.java
  6. 4
      designer_chart/src/com/fr/plugin/chart/designer/component/VanChartBeautyPane.java
  7. 3
      designer_chart/src/com/fr/plugin/chart/designer/component/background/VanChartGradientPane.java
  8. 4
      designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartAxisScrollPaneWithOutTypeSelect.java
  9. 9
      designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartAxisScrollPaneWithTypeSelect.java
  10. 112
      designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartBaseAxisPane.java
  11. 50
      designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartTimeAxisPane.java
  12. 19
      designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartValueAxisPane.java
  13. 24
      designer_chart/src/com/fr/plugin/chart/designer/style/axis/gauge/VanChartGaugeDetailAxisPane.java
  14. 3
      designer_chart/src/com/fr/plugin/chart/designer/style/axis/radar/VanChartRadarXAxisPane.java
  15. 6
      designer_chart/src/com/fr/plugin/chart/designer/style/axis/radar/VanChartRadarYAxisPane.java
  16. 10
      designer_chart/src/com/fr/plugin/chart/designer/style/background/VanChartAreaBackgroundPane.java
  17. 18
      designer_chart/src/com/fr/plugin/chart/designer/style/background/VanChartAxisAreaPane.java
  18. 35
      designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java
  19. 10
      designer_chart/src/com/fr/plugin/chart/gauge/VanChartGaugeSeriesPane.java
  20. 7
      designer_chart/src/com/fr/plugin/chart/pie/RadiusCardLayoutPane.java
  21. 22
      designer_chart/src/com/fr/plugin/chart/pie/VanChartPieSeriesPane.java

4
designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java

@ -4,6 +4,7 @@ import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.gui.frpane.UIComboBoxPane;
import com.fr.design.gui.ilable.UILabel;
@ -80,7 +81,8 @@ public class NormalChartDataPane extends DataContentsPane {
};
contentPane.add(dataPane, BorderLayout.CENTER);
dataPane.setBorder(BorderFactory.createEmptyBorder(10 ,0, 0, 0));
return contentPane;
UIExpandablePane advanceExpandablePane = new UIExpandablePane(Inter.getLocText("FR-Designer_Basic"), 280, 20, contentPane);
return advanceExpandablePane;
}
@Override

40
designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java

@ -1,27 +1,11 @@
package com.fr.design.mainframe.chart.gui.style.series;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.LayoutManager;
import java.awt.Point;
import java.awt.event.*;
import java.util.ArrayList;
import java.util.List;
import javax.swing.*;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import com.fr.base.Formula;
import com.fr.chart.base.AreaColor;
import com.fr.chart.base.ChartBaseUtils;
import com.fr.chart.chartglyph.MapHotAreaColor;
import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.BasicPane;
import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener;
import com.fr.design.gui.frpane.UINumberDragPane;
@ -31,12 +15,20 @@ import com.fr.design.gui.ipoppane.PopupHider;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.design.dialog.BasicPane;
import com.fr.general.Inter;
import com.fr.stable.StringUtils;
import com.fr.design.style.color.ColorControlWindow;
import com.fr.design.style.color.ColorSelectBox;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter;
import com.fr.stable.StringUtils;
import javax.swing.*;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.*;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.ArrayList;
import java.util.List;
public class UIColorPickerPane extends BasicPane implements UIObserver {
private static final int MARGIN_TOP = 10;
@ -105,11 +97,10 @@ public class UIColorPickerPane extends BasicPane implements UIObserver {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p, f};
double[] rowSize = {p, p, p};
Component[][] components = createComponents();
upControlPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
upControlPane = TableLayoutHelper.createTableLayoutPane(components, getRowSIze (), columnSize);
this.textFieldList = this.getTextFieldList();
this.textGroup = new TextFieldGroupPane();
@ -122,6 +113,11 @@ public class UIColorPickerPane extends BasicPane implements UIObserver {
refreshGroupPane(colors, getValueArray(number));
}
protected double[] getRowSIze () {
double p = TableLayout.PREFERRED;
return new double[]{p, p, p};
}
protected UIButtonGroup<Integer> getDesignTypeButtonGroup(){
return designTypeButtonGroup;
}

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

@ -50,9 +50,7 @@ public class VanChartColumnSeriesPane extends VanChartAbstractPlotSeriesPane {
double[] rowSize = {p,p,p,p,p,p,p,p,p,p};
Component[][] components = new Component[][]{
new Component[]{createStylePane()},
new Component[]{stylePane == null ? null : new JSeparator()},
new Component[]{createSeriesStylePane(new double[]{p,p}, new double[]{p,f})},
new Component[]{new JSeparator()},
new Component[]{createBorderPane()},
new Component[]{createStackedAndAxisPane()},
new Component[]{createTrendLinePane()},
@ -113,7 +111,7 @@ public class VanChartColumnSeriesPane extends VanChartAbstractPlotSeriesPane {
checkImagePane();
}
});
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style"), borderPane);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style"), borderPane);
}
private void checkAll() {

10
designer_chart/src/com/fr/plugin/chart/designer/AbstractVanChartAttrPane.java

@ -0,0 +1,10 @@
package com.fr.plugin.chart.designer;
import com.fr.design.mainframe.chart.AbstractChartAttrPane;
/**
* Created by mengao on 2017/8/11.
*/
public abstract class AbstractVanChartAttrPane extends AbstractChartAttrPane {
}

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

@ -0,0 +1,8 @@
package com.fr.plugin.chart.designer;
/**
* Created by mengao on 2017/8/13.
*/
public abstract class AbstractVanChartTabPane<T> extends AbstractVanChartScrollPane<T> {
public abstract String title4PopupWindow();
}

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

@ -4,8 +4,8 @@ import com.fr.chart.base.ChartConstants;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import javax.swing.*;
import java.awt.*;
@ -27,7 +27,7 @@ public class VanChartBeautyPane extends BasicBeanPane<Integer> {
Component[][] components = new Component[][]{
new Component[]{styleBox},
} ;
JPanel panel = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Plugin-Chart_Style"}, components, rowSize, columnSize);
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize);
this.setLayout(new BorderLayout());
this.add(panel,BorderLayout.CENTER);
}

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

@ -44,8 +44,7 @@ public class VanChartGradientPane extends GradientBackgroundQuickPane {
Component[][] components = new Component[][]{
new Component[]{gradientBar, null},
new Component[]{new UILabel(Inter.getLocText("Plugin-Chart_Gradient_Direction") + ":")},
new Component[]{directionPane}
new Component[]{new UILabel(Inter.getLocText("Plugin-Chart_Gradient_Direction")),directionPane},
};
JPanel Gradient = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
this.setLayout(new BorderLayout());

4
designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartAxisScrollPaneWithOutTypeSelect.java

@ -1,8 +1,8 @@
package com.fr.plugin.chart.designer.style.axis;
import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.mainframe.chart.PaneTitleConstants;
import com.fr.plugin.chart.attr.axis.VanChartAxis;
import com.fr.plugin.chart.designer.AbstractVanChartScrollPane;
import com.fr.plugin.chart.designer.style.VanChartStylePane;
import javax.swing.*;
@ -10,7 +10,7 @@ import javax.swing.*;
/**
* 无类型选择y轴数值轴
*/
public class VanChartAxisScrollPaneWithOutTypeSelect extends BasicScrollPane<VanChartAxis> implements VanChartXYAxisPaneInterface{
public class VanChartAxisScrollPaneWithOutTypeSelect extends AbstractVanChartScrollPane<VanChartAxis> implements VanChartXYAxisPaneInterface{
private static final long serialVersionUID = 7700110757493668325L;
protected VanChartBaseAxisPane axisPane;

9
designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartAxisScrollPaneWithTypeSelect.java

@ -2,17 +2,17 @@ package com.fr.plugin.chart.designer.style.axis;
import com.fr.chart.chartattr.Axis;
import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.gui.frpane.UIComboBoxPane;
import com.fr.design.mainframe.chart.PaneTitleConstants;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.plugin.chart.type.AxisType;
import com.fr.plugin.chart.attr.axis.VanChartAxis;
import com.fr.plugin.chart.attr.axis.VanChartTimeAxis;
import com.fr.plugin.chart.attr.axis.VanChartValueAxis;
import com.fr.plugin.chart.designer.AbstractVanChartScrollPane;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.style.VanChartStylePane;
import com.fr.plugin.chart.type.AxisType;
import javax.swing.*;
import java.awt.*;
@ -22,7 +22,7 @@ import java.util.List;
/**
* 带有坐标轴类型选择控件可选类型分类时间数值
*/
public class VanChartAxisScrollPaneWithTypeSelect extends BasicScrollPane<VanChartAxis> implements VanChartXYAxisPaneInterface{
public class VanChartAxisScrollPaneWithTypeSelect extends AbstractVanChartScrollPane<VanChartAxis> implements VanChartXYAxisPaneInterface{
private static final long serialVersionUID = -8462279689749700666L;
private UIComboBoxPane axisTypePane;
private VanChartTimeAxisPane timeAxisPane;
@ -56,7 +56,8 @@ public class VanChartAxisScrollPaneWithTypeSelect extends BasicScrollPane<VanCha
protected void initLayout() {
this.setLayout(new BorderLayout(0,6));
JPanel northPane = TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_type"),jcb);
JPanel northPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_type"),jcb);
northPane.setBorder(BorderFactory.createEmptyBorder(0,10,10,10));
this.add(northPane, BorderLayout.NORTH);
this.add(cardPane, BorderLayout.CENTER);

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

@ -21,12 +21,12 @@ import com.fr.design.mainframe.chart.PaneTitleConstants;
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane;
import com.fr.design.style.color.ColorSelectBox;
import com.fr.general.Inter;
import com.fr.plugin.chart.type.AxisTickLineType;
import com.fr.plugin.chart.attr.axis.VanChartAxis;
import com.fr.plugin.chart.base.VanChartConstants;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.component.VanChartHtmlLabelPane;
import com.fr.plugin.chart.designer.style.VanChartStylePane;
import com.fr.plugin.chart.type.AxisTickLineType;
import com.fr.stable.Constants;
import com.fr.stable.CoreConstants;
import com.fr.stable.StableUtils;
@ -54,6 +54,8 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
protected UINumberDragPane labelTextRotation;
protected UIButtonGroup<Integer> labelGapStyle;
protected UITextField labelGapValue;
protected JPanel labelPanel;
protected LineComboBox axisLineStyle;
protected ColorSelectBox axisLineColor;
@ -61,10 +63,11 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
protected UIButtonGroup<AxisTickLineType> secondTick;
protected UIButtonGroup<Integer> position;
protected UIToggleButton reversed;
protected UIButtonGroup<Boolean> reversed;
protected UIButtonGroup<Integer> axisLimitSize;
protected UISpinner maxProportion;
protected JPanel maxProportionPane;
protected UIButtonGroup valueFormatStyle;
protected FormatPane valueFormat;
@ -93,20 +96,14 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p, f};
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};
Component[][] components = new Component[][]{
new Component[]{new JSeparator(),null},
new Component[]{createTitlePane(new double[]{p, p, p, p, p}, columnSize, isXAxis),null},
new Component[]{new JSeparator(),null},
new Component[]{createLabelPane(new double[]{p, p, p}, columnSize),null},
new Component[]{new JSeparator(),null},
new Component[]{createLineStylePane(new double[]{p, p,p,p}, columnSize),null},
new Component[]{new JSeparator(),null},
new Component[]{createAxisPositionPane(new double[]{p, p}, columnSize, isXAxis),null},
new Component[]{new JSeparator(),null},
new Component[]{createDisplayStrategy(new double[]{p, p}, columnSize),null},
new Component[]{new JSeparator(),null},
new Component[]{createValueStylePane(),null},
new Component[]{createTitlePane(new double[]{p, p, p, p, p, p}, columnSize, isXAxis), null},
new Component[]{createLabelPane(new double[]{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[]{createDisplayStrategy(new double[]{p, p, p}, columnSize), null},
new Component[]{createValueStylePane(), null},
};
return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize);
@ -125,15 +122,16 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
titleTextRotation.populateBean(-ROTATION_MAX);
}
Component[][] components = new Component[][]{
new Component[]{titleContent,null},
new Component[]{titleAlignPane,null},
new Component[]{titleUseHtml,null},
new Component[]{null,null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Content")),titleContent},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Position")),titleAlignPane},
new Component[]{null,titleUseHtml},
new Component[]{titleTextAttrPane,null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_TextRotation")),titleTextRotation},
};
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, row, col);
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(PaneTitleConstants.CHART_STYLE_TITLE_TITLE, panel);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(PaneTitleConstants.CHART_STYLE_TITLE_TITLE, panel);
}
private UIButtonGroup<Integer> getXAxisTitleAlignPane(){
@ -168,11 +166,13 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
JPanel gapPanel = TableLayoutHelper.createTableLayoutPane(gapComponents, row, col);
Component[][] components = new Component[][]{
new Component[]{showLabel,null},
new Component[]{labelTextAttrPane, null},
new Component[]{gapPanel,null},
};
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, row, col);
JPanel showLabelPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_AxisLabel"),showLabel);
labelPanel = TableLayoutHelper.createTableLayoutPane(components, row, col);
labelPanel.setBorder(BorderFactory.createEmptyBorder(0,10,0,0));
showLabel.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@ -185,7 +185,10 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
checkLabelGapValuePane();
}
});
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(PaneTitleConstants.CHART_STYLE_LABEL_TITLE, panel);
JPanel jPanel = new JPanel(new BorderLayout());
jPanel.add(showLabelPane, BorderLayout.NORTH);
jPanel.add(labelPanel, BorderLayout.CENTER);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(PaneTitleConstants.CHART_STYLE_LABEL_TITLE, jPanel);
}
protected JPanel createLineStylePane(double[] row, double[] col){
@ -197,11 +200,12 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
secondTick = new UIButtonGroup<AxisTickLineType>(strings, values);
JPanel panel = TableLayoutHelper.createTableLayoutPane(getLineStylePaneComponents(), row, col);
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_AxisLineStyle"), panel);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_AxisLineStyle"), panel);
}
protected Component[][] getLineStylePaneComponents() {
return new Component[][]{
new Component[]{null,null} ,
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_type")),axisLineStyle} ,
new Component[]{new UILabel(Inter.getLocText("FR-Chart-Color_Color")),axisLineColor},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MainGraduationLine")),mainTick},
@ -211,14 +215,15 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
protected JPanel createAxisPositionPane(double[] row, double[] col, boolean isXAxis){
position = new UIButtonGroup<Integer>(getAxisPositionNameArray(isXAxis), getAxisPositionValueArray(isXAxis));
reversed = new UIToggleButton(Inter.getLocText("Plugin-ChartF_OpenAxisReversed"));
reversed = new UIButtonGroup<Boolean>(new String[]{Inter.getLocText("Plugin-ChartF_On"), Inter.getLocText("Plugin-ChartF_Off")}, new Boolean[]{true, false});
Component[][] components = new Component[][]{
new Component[]{position, null},
new Component[]{reversed,null},
new Component[]{null, null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_AxisLabel_Position")),position},
new Component[]{new UILabel(Inter.getLocText("FR-Designer_AxisReversed")),reversed},
} ;
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, row, col);
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Chart-Layout_Position"), panel);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Chart-Layout_Position"), panel);
}
private String[] getAxisPositionNameArray(boolean isXAxis){
@ -240,11 +245,13 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
protected JPanel createDisplayStrategy(double[] row, double[] col){
maxProportion = new UISpinner(0,100,1,30);
axisLimitSize = new UIButtonGroup<Integer>(new String[]{Inter.getLocText("Plugin-ChartF_LimitAreaSize"),Inter.getLocText("Plugin-ChartF_NotLimitAreaSize")});
Component[][] components = new Component[][]{
new Component[]{axisLimitSize,null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_AxisProportion")+":"),maxProportion},
};
JPanel panel = TableLayoutHelper.createTableLayoutPane(components,row,col);
JPanel limitSizePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_AreaSize"),axisLimitSize);
maxProportionPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_MaxProportion"),maxProportion);
maxProportionPane.setBorder(BorderFactory.createEmptyBorder(0,15,0,0));
JPanel panel = new JPanel(new BorderLayout());
panel.add(limitSizePane, BorderLayout.NORTH);
panel.add(maxProportionPane, BorderLayout.CENTER);
axisLimitSize.addActionListener(new ActionListener() {
@Override
@ -253,7 +260,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
}
});
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_DisplayStrategy"), panel);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_DisplayStrategy"), panel);
}
protected JPanel createValueStylePane(){
@ -269,9 +276,17 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
centerPane.add(valueFormat,Inter.getLocText("Plugin-ChartF_Common"));
centerPane.add(htmlLabelPane, Inter.getLocText("Plugin-ChartF_Custom"));
JPanel contentPane = new JPanel(new BorderLayout(0, 4));
contentPane.add(valueFormatStyle, BorderLayout.NORTH);
contentPane.add(centerPane, BorderLayout.CENTER);
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p,f};
double[] rowSize = {p,p,p};
Component[][] components = new Component[][]{
new Component[]{null,null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_AxisLabel_Format"), SwingConstants.LEFT), valueFormatStyle},
new Component[]{null, centerPane},
};
JPanel contentPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components,rowSize,columnSize);
valueFormatStyle.addActionListener(new ActionListener() {
@Override
@ -280,7 +295,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
}
});
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Chart-Use_Format"), contentPane);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Chart-Use_Format"), contentPane);
}
protected FormatPane createFormatPane(){
@ -311,17 +326,8 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
protected void checkLabelPane() {
if(showLabel != null){
boolean enabled = showLabel.getSelectedIndex() == 0;
if(labelTextAttrPane != null){
labelTextAttrPane.setEnabled(enabled);
}
if(labelTextRotation != null){
labelTextRotation.setEnabled(enabled);
}
if(labelGapValue != null){
labelGapValue.setEnabled(enabled);
}
if(labelGapStyle != null){
labelGapStyle.setEnabled(enabled);
if(labelPanel != null){
labelPanel.setVisible(enabled);
}
if(enabled){
checkLabelGapValuePane();
@ -329,7 +335,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
}
}
private void checkLabelGapValuePane() {
protected void checkLabelGapValuePane() {
if(labelGapValue != null && labelGapStyle != null){
labelGapValue.setEnabled(labelGapStyle.getSelectedIndex() == 1);
}
@ -337,8 +343,8 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
//检查最大显示占比是否可用
private void checkMaxProPortionUse() {
if(maxProportion != null && axisLimitSize != null){
maxProportion.setEnabled(axisLimitSize.getSelectedIndex() == 0 && axisLimitSize.isEnabled());
if(maxProportionPane != null && axisLimitSize != null){
maxProportionPane.setVisible(axisLimitSize.getSelectedIndex() == 0 && axisLimitSize.isEnabled());
}
}
@ -453,7 +459,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
}
}
if(reversed != null){
reversed.setSelected(axis.hasAxisReversed());
reversed.setSelectedIndex(axis.hasAxisReversed() == true ? 0 : 1);
}
}
@ -574,7 +580,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
axis.setPosition(position.getSelectedItem());
}
if(reversed != null){
axis.setAxisReversed(reversed.isSelected());
axis.setAxisReversed(reversed.getSelectedItem());
}
}

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

@ -10,6 +10,7 @@ import com.fr.design.editor.editor.FormulaEditor;
import com.fr.design.gui.date.UIDatePicker;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.gui.style.FormatPane;
import com.fr.design.layout.FRGUIPaneFactory;
@ -18,12 +19,12 @@ import com.fr.design.layout.TableLayoutHelper;
import com.fr.general.DateUtils;
import com.fr.general.FRLogger;
import com.fr.general.Inter;
import com.fr.plugin.chart.type.TimeType;
import com.fr.plugin.chart.attr.axis.VanChartAxis;
import com.fr.plugin.chart.attr.axis.VanChartTimeAxis;
import com.fr.plugin.chart.base.VanChartConstants;
import com.fr.plugin.chart.designer.PlotFactory;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.type.TimeType;
import com.fr.stable.StringUtils;
import javax.swing.*;
@ -57,19 +58,12 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane {
double[] columnSize = {p, f};
double[] rowSize = {p,p,p,p,p,p,p,p,p,p,p,p,p,p};
Component[][] components = new Component[][]{
new Component[]{new JSeparator(),null},
new Component[]{createTitlePane(new double[]{p, p, p, p, p}, columnSize, isXAxis),null},
new Component[]{new JSeparator(),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[]{new JSeparator(),null},
new Component[]{createValueDefinition(),null},
new Component[]{new JSeparator(),null},
new Component[]{createLineStylePane(new double[]{p, p,p,p}, columnSize),null},
new Component[]{new JSeparator(),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[]{new JSeparator(),null},
new Component[]{createDisplayStrategy(new double[]{p, p}, columnSize),null},
new Component[]{new JSeparator(),null},
new Component[]{createDisplayStrategy(new double[]{p, p,p}, columnSize),null},
new Component[]{createValueStylePane(),null},
};
@ -78,7 +72,7 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane {
private JPanel createValueDefinition(){
timeMinMaxValuePane = new TimeMinMaxValuePane();
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_ValueDefinition"), timeMinMaxValuePane);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_ValueDefinition"), timeMinMaxValuePane);
}
@Override
@ -145,38 +139,36 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] rowSize = {p, p, p};
double[] columnSize = {p, f};
Component[][] maxMin = {
{minCheckBox, minValueField},
{maxCheckBox, maxValueField},
};
JPanel maxMinPane = TableLayoutHelper.createTableLayoutPane(maxMin, rowSize, columnSize);
double[] rowSize = {p, p, p, p, p, p, p, p};
double[] columnSize = {f, p, p};
JPanel mainTickPane = new JPanel();
mainTickPane.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
mainTickPane.add(mainTickBox);
mainTickPane.add(mainUnitField);
mainTickPane.add(mainType);
JPanel secTickPane = new JPanel();
secTickPane.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
secTickPane.add(secondTickBox);
secTickPane.add(secondUnitField);
secTickPane.add(secondType);
Component[][] components = {
{maxMinPane, null},
{mainTickPane, null},
{secTickPane, null},
{minCheckBox, null, null},
{null, new UILabel(Inter.getLocText("FR-Chart-Data_Min")), minValueField},
{maxCheckBox, null, null},
{null, new UILabel(Inter.getLocText("FR-Chart-Data_Max")), maxValueField},
{mainTickBox, null, null},
{null, new UILabel(Inter.getLocText("Plugin-ChartF_MainType")), mainTickPane},
{secondTickBox, null, null},
{null, new UILabel(Inter.getLocText("Plugin-ChartF_SecType")), secTickPane},
};
this.add(TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize));
this.add(TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize));
}
private void initMin() {
// 最小值.
minCheckBox = new UICheckBox(Inter.getLocText("FR-Chart-Data_Min"));
minCheckBox = new UICheckBox(Inter.getLocText(new String[]{"Custom", "Min_Value"}));
Date tmp = null;
DateEditor dateEditor = new DateEditor(tmp, true, Inter.getLocText("FR-Designer_Date"), UIDatePicker.STYLE_CN_DATETIME1);
Editor formulaEditor = new FormulaEditor(Inter.getLocText("Plugin-ChartF_Formula"));
@ -192,7 +184,7 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane {
private void initMax() {
// 最大值
maxCheckBox = new UICheckBox(Inter.getLocText("FR-Chart-Data_Max"));
maxCheckBox = new UICheckBox(Inter.getLocText(new String[]{"Custom", "Max_Value"}));
Date tmp = null;
DateEditor dateEditor = new DateEditor(tmp, true, Inter.getLocText("FR-Designer_Date"), UIDatePicker.STYLE_CN_DATETIME1);
Editor formulaEditor = new FormulaEditor(Inter.getLocText("Plugin-ChartF_Formula"));
@ -208,7 +200,7 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane {
private void initMain() {
// 主要刻度单位
mainTickBox = new UICheckBox(Inter.getLocText("Plugin-ChartF_MainType"));
mainTickBox = new UICheckBox(Inter.getLocText(new String[]{"Custom", "Plugin-ChartF_MainType"}));
mainUnitField = new UITextField();
mainUnitField.setPreferredSize(new Dimension(20, 20));
mainUnitField.setEditable(false);
@ -226,7 +218,7 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane {
private void initSecond() {
// 次要刻度单位
secondTickBox = new UICheckBox(Inter.getLocText("Plugin-ChartF_SecType"));
secondTickBox = new UICheckBox(Inter.getLocText(new String[]{"Custom", "Plugin-ChartF_SecType"}));
secondUnitField = new UITextField();
secondUnitField.setPreferredSize(new Dimension(20, 20));
secondUnitField.setEditable(false);

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

@ -43,19 +43,12 @@ public class VanChartValueAxisPane extends VanChartBaseAxisPane {
double[] columnSize = {p, f};
double[] rowSize = {p,p,p,p,p,p,p,p,p,p,p,p,p,p};
Component[][] components = new Component[][]{
new Component[]{new JSeparator(),null},
new Component[]{createTitlePane(new double[]{p, p, p, p,p}, columnSize, isXAxis),null},
new Component[]{new JSeparator(),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[]{new JSeparator(),null},
new Component[]{createMinMaxValuePane(new double[]{p, p, p}, columnSize),null},
new Component[]{new JSeparator(),null},
new Component[]{createLineStylePane(new double[]{p, p,p,p}, columnSize),null},
new Component[]{new JSeparator(),null},
new Component[]{createAxisPositionPane(new double[]{p, p}, columnSize, isXAxis),null},
new Component[]{new JSeparator(),null},
new Component[]{createDisplayStrategy(new double[]{p, p}, columnSize),null},
new Component[]{new JSeparator(),null},
new Component[]{createMinMaxValuePane(new double[]{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[]{createDisplayStrategy(new double[]{p, p,p}, columnSize),null},
new Component[]{createValueStylePane(),null},
};
@ -64,7 +57,7 @@ public class VanChartValueAxisPane extends VanChartBaseAxisPane {
protected JPanel createMinMaxValuePane(double[] row, double[] col){
JPanel panel = createCommenValuePane(row,col);
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_ValueDefinition"), panel);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_ValueDefinition"), panel);
}
protected JPanel createCommenValuePane(double[] row, double[] col){
initMinMaxValuePane();

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

@ -15,8 +15,8 @@ import com.fr.plugin.chart.designer.style.VanChartStylePane;
import com.fr.plugin.chart.designer.style.axis.VanChartValueAxisPane;
import com.fr.plugin.chart.designer.style.axis.component.MinMaxValuePaneWithOutTick;
import com.fr.plugin.chart.designer.style.axis.component.VanChartMinMaxValuePane;
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.*;
@ -54,11 +54,8 @@ public class VanChartGaugeDetailAxisPane extends VanChartValueAxisPane{
case THERMOMETER:
return new Component[][]{
new Component[]{createLabelPane(new double[]{p, p, p}, columnSize), null},
new Component[]{new JSeparator(), null},
new Component[]{createValueDefinition(), null},
new Component[]{new JSeparator(), null},
new Component[]{createTickColorPane(new double[]{p, p, p}, new double[]{p, f}), null},
new Component[]{new JSeparator(), null},
new Component[]{createValueStylePane()},
};
case RING:
@ -72,9 +69,7 @@ public class VanChartGaugeDetailAxisPane extends VanChartValueAxisPane{
default:
return new Component[][]{
new Component[]{createLabelPane(new double[]{p, p, p}, columnSize), null},
new Component[]{new JSeparator(), null},
new Component[]{createValueDefinition(), null},
new Component[]{new JSeparator(), null},
new Component[]{createValueStylePane()},
};
}
@ -83,16 +78,21 @@ public class VanChartGaugeDetailAxisPane extends VanChartValueAxisPane{
protected JPanel createLabelPane(double[] row, double[] col){
showLabel = new UIButtonGroup(new String[]{Inter.getLocText("Chart-Use_Show"), Inter.getLocText("Plugin-ChartF_Hidden")});
labelTextAttrPane = new ChartTextAttrPane();
labelPanel = new JPanel(new BorderLayout());
labelPanel.add(labelTextAttrPane);
labelPanel.setBorder(BorderFactory.createEmptyBorder(0,15,0,0));
JPanel panel = new JPanel(new BorderLayout(0, 6));
panel.add(showLabel, BorderLayout.NORTH);
panel.add(labelTextAttrPane, BorderLayout.CENTER);
panel.add(TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_AxisLabel"), showLabel), BorderLayout.NORTH);
panel.add(labelPanel, BorderLayout.CENTER);
showLabel.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
checkLabelPane();
}
});
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(PaneTitleConstants.CHART_STYLE_LABEL_TITLE, panel);
JPanel jPanel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(PaneTitleConstants.CHART_STYLE_LABEL_TITLE, panel);
panel.setBorder(BorderFactory.createEmptyBorder(10,10,0,15));
return jPanel;
}
private JPanel createValueDefinition(){
@ -107,7 +107,7 @@ public class VanChartGaugeDetailAxisPane extends VanChartValueAxisPane{
minMaxValuePane = new VanChartMinMaxValuePane();
break;
}
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_ValueDefinition"), minMaxValuePane);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_ValueDefinition"), minMaxValuePane);
}
private JPanel createTickColorPane(double[] row, double[] col){
@ -118,7 +118,9 @@ public class VanChartGaugeDetailAxisPane extends VanChartValueAxisPane{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_SecondGraduationLine")), secTickColor},
};
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, row, col);
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_TickColor"), panel);
JPanel jPanel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_TickColor"), panel);
panel.setBorder(BorderFactory.createEmptyBorder(10,10,0,15));
return jPanel;
}
private boolean isMulti(GaugeStyle style){

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

@ -23,11 +23,8 @@ public class VanChartRadarXAxisPane extends VanChartBaseAxisPane {
double[] columnSize = {p, f};
double[] rowSize = {p,p,p,p,p,p};
Component[][] components = new Component[][]{
new Component[]{new JSeparator(),null},
new Component[]{createLabelPane(new double[]{p, p, p}, columnSize),null},
new Component[]{new JSeparator(),null},
new Component[]{createLineStylePane(new double[]{p, p, p, p}, columnSize),null},
new Component[]{new JSeparator(),null},
new Component[]{createValueStylePane(),null},
};

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

@ -33,13 +33,9 @@ public class VanChartRadarYAxisPane extends VanChartValueAxisPane {
double[] columnSize = {p, f};
double[] rowSize = {p, p, p, p, p, p, p, p};
Component[][] components = new Component[][]{
new Component[]{new JSeparator(), null},
new Component[]{createLabelPane(new double[]{p, p, p}, columnSize), null},
new Component[]{new JSeparator(), null},
new Component[]{createMinMaxValuePane(new double[]{p, p, p}, columnSize), null},
new Component[]{new JSeparator(), null},
new Component[]{createLineStylePane(new double[]{p, p, p, p}, columnSize), null},
new Component[]{new JSeparator(), null},
new Component[]{createValueStylePane(), null},
};
@ -71,7 +67,7 @@ public class VanChartRadarYAxisPane extends VanChartValueAxisPane {
}
});
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_ValueDefinition"), contentPane);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_ValueDefinition"), contentPane);
}
protected Component[][] getLineStylePaneComponents() {

10
designer_chart/src/com/fr/plugin/chart/designer/style/background/VanChartAreaBackgroundPane.java

@ -7,6 +7,8 @@ import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.PaneTitleConstants;
import com.fr.design.mainframe.chart.gui.style.AbstractChartTabPane;
import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.component.background.VanChartBackgroundPane;
import com.fr.plugin.chart.designer.component.border.VanChartBorderWithRadiusPane;
import com.fr.plugin.chart.designer.style.background.radar.VanChartRadarAxisAreaPane;
@ -45,8 +47,8 @@ public class VanChartAreaBackgroundPane extends AbstractChartTabPane<Chart> {
double[] columnSize = { f };
double[] rowSize = {p,p,p};
Component[][] components = new Component[][]{
new Component[]{chartBorderPane},
new Component[]{chartBackgroundPane}
new Component[]{TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Border"),chartBorderPane)},
new Component[]{TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Background"), chartBackgroundPane)},
};
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
contentPane.add(panel, BorderLayout.CENTER);
@ -88,8 +90,8 @@ public class VanChartAreaBackgroundPane extends AbstractChartTabPane<Chart> {
protected Component[][] initComponents() {
return new Component[][]{
new Component[]{chartBorderPane},
new Component[]{chartBackgroundPane},
new Component[]{TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Border"),chartBorderPane)},
new Component[]{TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Background"), chartBackgroundPane)},
new Component[]{chartAxisAreaPane}
};
}

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

@ -15,8 +15,8 @@ import com.fr.plugin.chart.VanChartAttrHelper;
import com.fr.plugin.chart.attr.DefaultAxisHelper;
import com.fr.plugin.chart.attr.axis.VanChartAlertValue;
import com.fr.plugin.chart.attr.axis.VanChartAxis;
import com.fr.plugin.chart.base.VanChartCustomIntervalBackground;
import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot;
import com.fr.plugin.chart.base.VanChartCustomIntervalBackground;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.component.VanChartUIMenuNameableCreator;
@ -53,14 +53,12 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot>{
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = { f };
double[] rowSize = {p,p,p,p,p};
double[] rowSize = {p,p,p};
Component[][] components = new Component[][]{
new Component[]{createGridLinePane(new double[]{p,p}, new double[]{p,f})},
new Component[]{new JSeparator()},
new Component[]{createGridLinePane(new double[]{p,p,p}, new double[]{p,f})},
new Component[]{createAlertLinePane()},
new Component[]{new JSeparator()},
new Component[]{createIntervalPane(new double[]{p,p,p}, new double[]{p,f})},
new Component[]{createIntervalPane(new double[]{p,p,p,p}, new double[]{p,f})},
};
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
this.setLayout(new BorderLayout());
@ -72,11 +70,12 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot>{
verticalGridLine = new ColorSelectBox(100);
Component[][] components = getGridLinePaneComponents();
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, row, col);
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("ChartF-Grid_Line"),panel);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("ChartF-Grid_Line"),panel);
}
protected Component[][] getGridLinePaneComponents() {
return new Component[][]{
new Component[]{null,null},
new Component[]{new UILabel(Inter.getLocText("FR-Chart-Direction_Horizontal")),horizontalGridLine},
new Component[]{new UILabel(Inter.getLocText("FR-Chart-Direction_Vertical")),verticalGridLine},
};
@ -84,7 +83,7 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot>{
protected JPanel createAlertLinePane(){
alertLine = new UICorrelationComboBoxPane();
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_AlertLine"),alertLine);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_AlertLine"),alertLine);
}
protected JPanel createIntervalPane(double[] row, double[] col){
@ -108,11 +107,12 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot>{
JPanel intervalPane = new JPanel(new BorderLayout(0, 6));
intervalPane.add(isDefaultIntervalBackground, BorderLayout.NORTH);
intervalPane.add(centerPane, BorderLayout.CENTER);
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_IntervalBackground"),intervalPane);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_IntervalBackground"),intervalPane);
}
protected Component[][] getIntervalPaneComponents() {
return new Component[][]{
new Component[]{null,null},
new Component[]{new UILabel(Inter.getLocText("FR-Chart-Direction_Horizontal")),horizontalColorBackground},
new Component[]{new UILabel(Inter.getLocText("FR-Chart-Direction_Vertical")),verticalColorBackground},
};

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

@ -19,12 +19,21 @@ import com.fr.plugin.chart.VanChartAttrHelper;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot;
import com.fr.plugin.chart.attr.radius.VanChartRadiusPlot;
import com.fr.plugin.chart.base.*;
import com.fr.plugin.chart.base.AttrAreaSeriesFillColorBackground;
import com.fr.plugin.chart.base.AttrEffect;
import com.fr.plugin.chart.base.AttrLabel;
import com.fr.plugin.chart.base.AttrLineEffect;
import com.fr.plugin.chart.base.VanChartAttrLine;
import com.fr.plugin.chart.base.VanChartAttrMarker;
import com.fr.plugin.chart.base.VanChartAttrTrendLine;
import com.fr.plugin.chart.custom.style.VanChartCustomStylePane;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.component.*;
import com.fr.plugin.chart.designer.component.VanChartAreaSeriesFillColorPane;
import com.fr.plugin.chart.designer.component.VanChartBeautyPane;
import com.fr.plugin.chart.designer.component.VanChartLineTypePane;
import com.fr.plugin.chart.designer.component.VanChartMarkerPane;
import com.fr.plugin.chart.designer.component.VanChartTrendLinePane;
import com.fr.plugin.chart.designer.component.border.VanChartBorderPane;
import com.fr.plugin.chart.base.AttrLineEffect;
import com.fr.plugin.chart.pie.RadiusCardLayoutPane;
import com.fr.plugin.chart.scatter.attr.ScatterAttrLabel;
@ -76,26 +85,26 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
}
//风格
protected VanChartBeautyPane createStylePane() {
protected JPanel createStylePane() {
//如果是自定義組合圖,則不創建填充界面
if (parentPane instanceof VanChartCustomStylePane){
stylePane = null;
}else {
stylePane = new VanChartBeautyPane();
}
return stylePane;
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Border"), stylePane);
}
//趋势线
protected JPanel createTrendLinePane() {
trendLinePane = new VanChartTrendLinePane();
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Chart-Trend_Line"), trendLinePane);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Chart-Trend_Line"), trendLinePane);
}
//线
protected JPanel createLineTypePane() {
lineTypePane = getLineTypePane();
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Line"), lineTypePane);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Line"), lineTypePane);
}
protected VanChartLineTypePane getLineTypePane() {
@ -105,19 +114,19 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
//标记点类型
protected JPanel createMarkerPane() {
markerPane = new VanChartMarkerPane();
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Marker"), markerPane);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Marker"), markerPane);
}
//填充颜色
protected JPanel createAreaFillColorPane() {
areaSeriesFillColorPane = new VanChartAreaSeriesFillColorPane();
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_FillColor"), areaSeriesFillColorPane);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_FillColor"), areaSeriesFillColorPane);
}
//边框(默认没有圆角)
protected VanChartBorderPane createBorderPane() {
protected JPanel createBorderPane() {
borderPane = createDiffBorderPane();
return borderPane;
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Border"), borderPane);
}
//半径界面
@ -187,7 +196,7 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
}
protected JPanel createLargeDataModelPane(UIButtonGroup<DataProcessor> modelGroup) {
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Large_Model"), modelGroup);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Large_Model"), modelGroup);
}
protected UIButtonGroup<DataProcessor> createLargeDataModelGroup() {
@ -208,7 +217,7 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
//不透明度
protected JPanel createAlphaPane() {
transparent = new UINumberDragPane(0, 100);
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Alpha"), transparent);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Alpha"), transparent);
}
//堆积和坐标轴设置(自定义柱形图等用到)

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

@ -12,9 +12,9 @@ import com.fr.design.mainframe.chart.gui.style.series.UIColorPickerPane;
import com.fr.design.style.color.ColorSelectBox;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.plugin.chart.attr.GaugeDetailStyle;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.base.AttrLabel;
import com.fr.plugin.chart.attr.GaugeDetailStyle;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.style.series.VanChartAbstractPlotSeriesPane;
import com.fr.plugin.chart.pie.RadiusCardLayoutPane;
@ -57,9 +57,7 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane {
double[] rowSize = {p,p,p,p,p,p};
Component[][] components = new Component[][]{
new Component[]{createGaugeLayoutPane()},
new Component[]{new JSeparator()},
new Component[]{createGaugeStylePane(rowSize, new double[]{p,f})},
new Component[]{new JSeparator()},
new Component[]{createGaugeBandsPane()}
};
@ -74,7 +72,7 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane {
changeLabelPosition();
}
});
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("FR-Chart_Layout"), gaugeLayout);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Chart_Layout"), gaugeLayout);
}
private void changeLabelPosition() {
@ -106,7 +104,7 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane {
if(rotate != null){
panel.add(rotate, BorderLayout.NORTH);
}
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style"), panel);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style"), panel);
}
private Component[][] getDiffComponentsWithGaugeStyle() {
@ -183,7 +181,7 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane {
private JPanel createGaugeBandsPane() {
colorPickerPane = new ColorPickerPaneWithFormula("meterString");
return TableLayout4VanChartHelper.createTitlePane(Inter.getLocText("Plugin-ChartF_Range"), colorPickerPane, 16);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Range"), colorPickerPane);
}

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

@ -3,15 +3,14 @@ package com.fr.plugin.chart.pie;
import com.fr.chart.chartattr.Plot;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.general.Inter;
import com.fr.plugin.chart.type.RadiusType;
import com.fr.plugin.chart.base.VanChartRadius;
import com.fr.plugin.chart.attr.radius.VanChartRadiusPlot;
import com.fr.plugin.chart.base.VanChartRadius;
import com.fr.plugin.chart.layout.VanChartCardLayoutPane;
import com.fr.plugin.chart.type.RadiusType;
import javax.swing.*;
import java.awt.*;
@ -71,7 +70,7 @@ public class RadiusCardLayoutPane extends BasicBeanPane<Plot> {
double[] columnSize = {p, f};
double[] rowSize = {p,p};
Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Radius_Set")),radiusType},
new Component[]{radiusType,null},
new Component[]{cardPane, null},
};

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

@ -2,7 +2,7 @@ package com.fr.plugin.chart.pie;
import com.fr.chart.chartattr.Plot;
import com.fr.design.gui.ibutton.UIToggleButton;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.layout.TableLayout;
@ -28,7 +28,7 @@ public class VanChartPieSeriesPane extends VanChartAbstractPlotSeriesPane {
protected UISpinner startAngle;
protected UISpinner endAngle;
protected UISpinner innerRadius;
private UIToggleButton supportRotation;
private UIButtonGroup<Boolean> supportRotation;
public VanChartPieSeriesPane(ChartStylePane parent, Plot plot) {
super(parent, plot);
@ -41,9 +41,7 @@ public class VanChartPieSeriesPane extends VanChartAbstractPlotSeriesPane {
double[] rowSize = {p,p,p,p,p,p,p};
Component[][] components = new Component[][]{
new Component[]{createStylePane()},
new Component[]{stylePane == null ? null : new JSeparator()},
new Component[]{createSeriesStylePane(rowSize, new double[]{p,f})},
new Component[]{new JSeparator()},
new Component[]{createBorderPane()},
};
@ -55,19 +53,21 @@ public class VanChartPieSeriesPane extends VanChartAbstractPlotSeriesPane {
startAngle = new UISpinner(MIN_ANGLE, MAX_ANGLE, 1, 0);
endAngle = new UISpinner(MIN_ANGLE, MAX_ANGLE, 1, 0);
innerRadius = new UISpinner(0, 100, 1, 0);
supportRotation = new UIToggleButton(Inter.getLocText("Plugin-ChartF_Rotation"));
supportRotation = new UIButtonGroup<Boolean>(new String[]{Inter.getLocText("Plugin-ChartF_On"), Inter.getLocText("Plugin-ChartF_Off")}, new Boolean[]{true, false});
Component[][] components = new Component[][]{
new Component[]{null,null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_StartAngle")),startAngle},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_EndAngle")),endAngle},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_InnerRadius")),innerRadius},
new Component[]{createRadiusPane(), null},
new Component[]{supportRotation,null}
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Radius_Set")), createRadiusPane()},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Rotation")),supportRotation}
};
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, row, col);
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style"), panel);
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style"), panel);
}
//半径界面
@ -93,7 +93,7 @@ public class VanChartPieSeriesPane extends VanChartAbstractPlotSeriesPane {
startAngle.setValue(piePlot4VanChart.getStartAngle());
endAngle.setValue(piePlot4VanChart.getEndAngle());
innerRadius.setValue(piePlot4VanChart.getInnerRadiusPercent());
supportRotation.setSelected(piePlot4VanChart.isSupportRotation());
supportRotation.setSelectedIndex(piePlot4VanChart.isSupportRotation() == true ?0:1);
}
}
@ -114,7 +114,7 @@ public class VanChartPieSeriesPane extends VanChartAbstractPlotSeriesPane {
piePlot4VanChart.setStartAngle(startAngle.getValue());
piePlot4VanChart.setEndAngle(endAngle.getValue());
piePlot4VanChart.setInnerRadiusPercent(innerRadius.getValue());
piePlot4VanChart.setSupportRotation(supportRotation.isSelected());
piePlot4VanChart.setSupportRotation(supportRotation.getSelectedItem());
}
}
}
Loading…
Cancel
Save