Browse Source

Merge pull request #13 in CHART/design from ~MANGO/m_design:9.0 to 9.0

* commit 'e2604453af656a8e09d2fcf7b65d61a7a96dd71a':
  修改方法名称
  删掉部分代码
  修改继承关系
  修改继承关系
  增加chart用的基础面板抽象类
  9.0图表样式修改: 1、整体布局调整 2、属性切换图标换为文字 3、样式:标题面板调整 4、样式:图例面板调整
  9.0图表样式修改: 1、整体布局调整 2、属性切换图标换为文字 3、样式:标题面板调整 4、样式:图例面板调整
master
superman 7 years ago
parent
commit
7aa61188b3
  1. 30
      designer_base/src/com/fr/design/dialog/BasicScrollPane.java
  2. 2
      designer_base/src/com/fr/design/gui/frpane/AbstractAttrNoScrollPane.java
  3. 4
      designer_base/src/com/fr/design/layout/TableLayoutHelper.java
  4. 9
      designer_chart/src/com/fr/design/mainframe/chart/AbstractChartAttrPane.java
  5. 5
      designer_chart/src/com/fr/design/mainframe/chart/ChartEditPane.java
  6. 44
      designer_chart/src/com/fr/design/mainframe/chart/gui/ChangeConfigPane.java
  7. 38
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java
  8. 30
      designer_chart/src/com/fr/plugin/chart/designer/AbstractVanChartScrollPane.java
  9. 35
      designer_chart/src/com/fr/plugin/chart/designer/TableLayout4VanChartHelper.java
  10. 26
      designer_chart/src/com/fr/plugin/chart/designer/component/background/VanChartBackgroundPane.java
  11. 5
      designer_chart/src/com/fr/plugin/chart/designer/component/background/VanChartBackgroundPaneWithOutImageAndShadow.java
  12. 5
      designer_chart/src/com/fr/plugin/chart/designer/component/background/VanChartBackgroundWithOutShadowWithRadiusPane.java
  13. 6
      designer_chart/src/com/fr/plugin/chart/designer/component/background/VanChartMarkerBackgroundPane.java
  14. 11
      designer_chart/src/com/fr/plugin/chart/designer/component/border/VanChartBorderPane.java
  15. 7
      designer_chart/src/com/fr/plugin/chart/designer/component/border/VanChartBorderWithRadiusPane.java
  16. 4
      designer_chart/src/com/fr/plugin/chart/designer/style/VanChartLegendPane.java
  17. 78
      designer_chart/src/com/fr/plugin/chart/designer/style/VanChartPlotLegendPane.java
  18. 5
      designer_chart/src/com/fr/plugin/chart/designer/style/VanChartRangeLegendPane.java
  19. 79
      designer_chart/src/com/fr/plugin/chart/designer/style/VanChartTitlePane.java
  20. 2
      designer_chart/src/com/fr/plugin/chart/range/component/GradualIntervalConfigPane.java
  21. 5
      designer_chart/src/com/fr/plugin/chart/range/component/GradualLegendPane.java
  22. 19
      designer_chart/src/com/fr/plugin/chart/range/component/LegendLabelFormatPane.java
  23. 10
      designer_chart/src/com/fr/plugin/chart/range/component/SectionIntervalConfigPane.java
  24. 5
      designer_chart/src/com/fr/plugin/chart/range/component/SectionLegendPane.java

30
designer_base/src/com/fr/design/dialog/BasicScrollPane.java

@ -1,23 +1,15 @@
package com.fr.design.dialog;
import java.awt.AWTEvent;
import java.awt.Color;
import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.LayoutManager;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.iscrollbar.UIScrollBar;
import javax.swing.*;
import java.awt.*;
import java.awt.event.AdjustmentEvent;
import java.awt.event.AdjustmentListener;
import java.awt.event.MouseWheelEvent;
import java.awt.event.MouseWheelListener;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.JScrollBar;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.iscrollbar.UIScrollBar;
public abstract class BasicScrollPane<T> extends BasicBeanPane<T>{
private static final long serialVersionUID = -4293765343535336275L;
private static final int MAXVALUE = 100;
@ -119,7 +111,7 @@ public abstract class BasicScrollPane<T> extends BasicBeanPane<T>{
/**
* august:不容易啊 还要用笔画图立个方程才计算出来
*
* @param e
* @param
*/
protected void ajustValues() {
doLayout();
@ -170,6 +162,13 @@ public abstract class BasicScrollPane<T> extends BasicBeanPane<T>{
beginY = value * (preferheight - maxheight) / (MAXVALUE - scrollBar.getVisibleAmount());
}
}
setLeftContentPaneBounds(parent, scrollBar, beginY, maxheight);
leftcontentPane.validate();
}
}
protected void setLeftContentPaneBounds(Container parent, UIScrollBar scrollBar, int beginY, int maxheight) {
int width = parent.getWidth();
int height = parent.getHeight();
if (leftcontentPane.getPreferredSize().height > maxheight) {
@ -178,9 +177,6 @@ public abstract class BasicScrollPane<T> extends BasicBeanPane<T>{
} else {
leftcontentPane.setBounds(0, 0, width - DET_WIDTH, height);
}
leftcontentPane.validate();
}
}
protected boolean isShowScrollBar() {

2
designer_base/src/com/fr/design/gui/frpane/AbstractAttrNoScrollPane.java

@ -1,10 +1,10 @@
package com.fr.design.gui.frpane;
import com.fr.design.dialog.BasicPane;
import com.fr.design.event.GlobalNameListener;
import com.fr.design.event.GlobalNameObserver;
import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener;
import com.fr.design.dialog.BasicPane;
import javax.swing.*;
import java.awt.*;

4
designer_base/src/com/fr/design/layout/TableLayoutHelper.java

@ -4,11 +4,10 @@ package com.fr.design.layout;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel;
import com.fr.general.Inter;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter;
import javax.swing.*;
import java.awt.*;
@ -19,6 +18,7 @@ public class TableLayoutHelper {
public static final int FILL_LASTCOL_AND_ROW = 3;
private static final int FIVE = 5;
private static final int TEN = 10;
private TableLayoutHelper() {
}

9
designer_chart/src/com/fr/design/mainframe/chart/AbstractChartAttrPane.java

@ -4,6 +4,9 @@ package com.fr.design.mainframe.chart;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.gui.frpane.AbstractAttrNoScrollPane;
import javax.swing.*;
import java.awt.*;
public abstract class AbstractChartAttrPane extends AbstractAttrNoScrollPane {
public abstract void populate(ChartCollection collection);
@ -25,6 +28,12 @@ public abstract class AbstractChartAttrPane extends AbstractAttrNoScrollPane {
}
protected void initContentPane() {
leftContentPane = createContentPane();
leftContentPane.setBorder(BorderFactory.createMatteBorder(10, 0, 0, 0, original));
this.add(leftContentPane, BorderLayout.CENTER);
}
/**
* 刷新图表数据界面
* @param collection 图表收集器

5
designer_chart/src/com/fr/design/mainframe/chart/ChartEditPane.java

@ -1,7 +1,6 @@
package com.fr.design.mainframe.chart;
import com.fr.base.BaseUtils;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.ChartTypeInterfaceManager;
@ -74,12 +73,12 @@ public class ChartEditPane extends BasicPane implements AttributeChange,Prepare4
//构建主面板
protected void createTabsPane() {
Icon[] iconArray = new Icon[paneList.size()];
String[] iconArray = new String[paneList.size()];
card = new CardLayout();
center = new JPanel(card);
for (int i = 0; i < paneList.size(); i++) {
AbstractChartAttrPane pane = paneList.get(i);
iconArray[i] = BaseUtils.readIcon(pane.getIconPath());
iconArray[i] = pane.title4PopupWindow();
center.add(pane, pane.title4PopupWindow());
}

44
designer_chart/src/com/fr/design/mainframe/chart/gui/ChangeConfigPane.java

@ -4,9 +4,9 @@ package com.fr.design.mainframe.chart.gui;
* Created by hufan on 2016/10/20.
*/
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.base.AttrChangeConfig;
import com.fr.chart.base.AttrChangeType;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel;
@ -15,6 +15,7 @@ import com.fr.design.layout.TableLayout;
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 javax.swing.*;
import java.awt.*;
@ -55,11 +56,9 @@ public class ChangeConfigPane extends BasicBeanPane<ChartCollection> {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p, f};
double[] rowSize = {p,p,p,p};
double[] rowSize = {p,p};
Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Change_Style") + ":"),configStyleButton},
new Component[]{null, null},
new Component[]{new JSeparator(), null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Change_Style")),configStyleButton},
new Component[]{configPane, null},
};
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
@ -84,6 +83,8 @@ public class ChangeConfigPane extends BasicBeanPane<ChartCollection> {
panel.add(buttonConfigPane, "button");
panel.add(carouselConfigPane, "carousel");
panel.setBorder(BorderFactory.createEmptyBorder(0,10,0,0));
return panel;
}
@ -92,35 +93,33 @@ public class ChangeConfigPane extends BasicBeanPane<ChartCollection> {
double f = TableLayout.FILL;
double[] columnSize = {p, f};
double[] rowSize = {p,p,p};
timeInterval = new UISpinner(MIN_TIME, MAX_TIME, 1, 0);
colorSelectBox4carousel = new ColorSelectBoxWithOutTransparent(WIDTH);
Component[][] components = new Component[][]{
new Component[]{createTimeIntervalPane(),null},
new Component[]{new JSeparator(),null},
new Component[]{createCarouseBackgroundColorPane(),null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Time_Interval")), timeInterval},
new Component[]{new UILabel(Inter.getLocText("Background")),colorSelectBox4carousel},
};
return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize);
}
private Component createTimeIntervalPane() {
timeInterval = new UISpinner(MIN_TIME, MAX_TIME, 1, 0);
return TableLayoutHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Time_Interval") + ":", timeInterval);
}
private JPanel createCarouseBackgroundColorPane() {
colorSelectBox4carousel = new ColorSelectBoxWithOutTransparent(WIDTH);
return TableLayoutHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Background") + ":", colorSelectBox4carousel);
return TableLayout4VanChartHelper.createGapTableLayoutPane(components,rowSize,columnSize);
}
private JPanel createTitleStylePane(){
styleAttrPane = new ChartTextAttrPane();
styleAttrPane = new ChartTextAttrPane(){
protected Component[][] getComponents(JPanel buttonPane) {
return new Component[][]{
new Component[]{fontNameComboBox, null},
new Component[]{buttonPane, null}
};
}
};
styleAttrPane.setPreferredSize(new Dimension(WIDTH, (int) styleAttrPane.getPreferredSize().getHeight()));
return TableLayoutHelper.createTableLayoutPaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style")+":", styleAttrPane);
return TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-Chart_Character")+":", styleAttrPane);
}
private JPanel createButtonBackgroundColorPane(){
colorSelectBox4button = new ColorSelectBoxWithOutTransparent(WIDTH);
return TableLayoutHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Background") + ":", colorSelectBox4button);
return TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Background") + ":", colorSelectBox4button);
}
private JPanel createButtonConfigPane() {
@ -130,7 +129,6 @@ public class ChangeConfigPane extends BasicBeanPane<ChartCollection> {
double[] rowSize = {p,p,p};
Component[][] components = new Component[][]{
new Component[]{createTitleStylePane(),null},
new Component[]{new JSeparator(),null},
new Component[]{createButtonBackgroundColorPane(),null},
};

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

@ -1,25 +1,23 @@
package com.fr.design.mainframe.chart.gui.style;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.FlowLayout;
import java.awt.Font;
import javax.swing.JPanel;
import com.fr.base.BaseUtils;
import com.fr.base.Utils;
import com.fr.chart.base.TextAttr;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.dialog.BasicPane;
import com.fr.design.event.UIObserverListener;
import com.fr.design.gui.ibutton.UIColorButton;
import com.fr.design.gui.ibutton.UIToggleButton;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.dialog.BasicPane;
import com.fr.general.FRFont;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.FRFont;
import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import javax.swing.*;
import java.awt.*;
public class ChartTextAttrPane extends BasicPane {
private static final long serialVersionUID = 6731679928019436869L;
@ -147,17 +145,23 @@ public class ChartTextAttrPane extends BasicPane {
buttonPane.add(GUICoreUtils.createFlowPane(components1, FlowLayout.LEFT, LayoutConstants.HGAP_LARGE), BorderLayout.EAST);
double[] columnSize = {f};
double[] rowSize = {p, p};
Component[][] components = new Component[][]{
new Component[]{fontNameComboBox},
new Component[]{buttonPane}
};
double[] columnSize = {p,f};
double[] rowSize = {p, p, p};
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(getComponents(buttonPane), rowSize, columnSize);
this.setLayout(new BorderLayout());
this.add(panel, BorderLayout.CENTER);
populate(FRFont.getInstance());
}
protected Component[][] getComponents(JPanel buttonPane) {
UILabel text = new UILabel(Inter.getLocText("Plugin-Chart_Character"), SwingConstants.LEFT);
return new Component[][]{
new Component[]{null, null},
new Component[]{text, fontNameComboBox},
new Component[]{null, buttonPane}
};
}
}

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

@ -0,0 +1,30 @@
package com.fr.plugin.chart.designer;
import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.gui.iscrollbar.UIScrollBar;
import javax.swing.*;
import java.awt.*;
/**
* Created by mengao on 2017/8/11.
*/
public abstract class AbstractVanChartScrollPane<T> extends BasicScrollPane<T> {
protected void layoutContentPane() {
leftcontentPane = createContentPane();
leftcontentPane.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 0, original));
this.add(leftcontentPane);
}
protected void setLeftContentPaneBounds(Container parent, UIScrollBar scrollBar, int beginY, int maxheight) {
int width = parent.getWidth();
int height = parent.getHeight();
if (leftcontentPane.getPreferredSize().height > maxheight) {
leftcontentPane.setBounds(0, -beginY, width - scrollBar.getWidth(), height + beginY);
scrollBar.setBounds(width - scrollBar.getWidth() - 1, 0, scrollBar.getWidth(), height);
} else {
leftcontentPane.setBounds(0, 0, width, height);
}
}
}

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

@ -1,9 +1,11 @@
package com.fr.plugin.chart.designer;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.general.Inter;
import javax.swing.*;
import java.awt.*;
@ -14,6 +16,39 @@ import java.awt.*;
public class TableLayout4VanChartHelper {
private static final int SMALL_GAP = 20;
public static final int EXPANDABLE_PANE_WIDTH =290;
public static final int EXPANDABLE_PANE_HIGHT =24;
public static JPanel createExpandablePaneWithTitle(String title, JPanel panel) {
return new UIExpandablePane(title, EXPANDABLE_PANE_WIDTH, EXPANDABLE_PANE_HIGHT, panel);
}
public static JPanel createGapTableLayoutPane(String title, Component component) {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p, f};
double[] rowSize = {p, p};
Component[][] components = new Component[][]{
new Component[]{null, null},
new Component[]{new UILabel(Inter.getLocText(title)), component},
};
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, SMALL_GAP, LayoutConstants.VGAP_LARGE);
}
public static JPanel createGapTableLayoutPane(Component[][] components,
double[] rowSize, double[] columnSize) {
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, SMALL_GAP, LayoutConstants.VGAP_LARGE);
}
public static JPanel createGapTableLayoutPane(Component[][] components,
double[] rowSize, double[] columnSize, int[][] rowCount) {
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount,
SMALL_GAP, LayoutConstants.VGAP_LARGE);
}
/**
* 标题布局(二级菜单距左边框46)
* @param title 标题

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

@ -4,17 +4,17 @@ import com.fr.base.background.ImageBackground;
import com.fr.chart.chartglyph.GeneralInfo;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.frpane.UINumberDragPane;
import com.fr.design.gui.ibutton.UIToggleButton;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.backgroundpane.BackgroundQuickPane;
import com.fr.design.mainframe.backgroundpane.ColorBackgroundQuickPane;
import com.fr.design.mainframe.backgroundpane.ImageBackgroundQuickPane;
import com.fr.design.mainframe.backgroundpane.NullBackgroundQuickPane;
import com.fr.general.Background;
import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.stable.Constants;
import javax.swing.*;
@ -37,7 +37,7 @@ public class VanChartBackgroundPane extends BasicPane {
protected UIComboBox typeComboBox;
protected UINumberDragPane transparent;
protected UIToggleButton shadow;
protected UIButtonGroup<Boolean> shadow;
protected JPanel centerPane;
@ -48,12 +48,10 @@ public class VanChartBackgroundPane extends BasicPane {
double f = TableLayout.FILL;
double[] columnSize = {p, f};
double[] rowSize = { p,p,p,p,p};
JPanel panel = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Background"}, getPaneComponents(), rowSize, columnSize);
double[] rowSize = { p,p,p,p,p,p};
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(getPaneComponents(), rowSize, columnSize);
this.setLayout(new BorderLayout());
this.add(panel,BorderLayout.CENTER);
this.add(new JSeparator(), BorderLayout.SOUTH);
}
protected void initComponents() {
@ -90,12 +88,14 @@ public class VanChartBackgroundPane extends BasicPane {
}
protected Component[][] getPaneComponents() {
shadow = new UIToggleButton(Inter.getLocText("plugin-ChartF_OpenShadow"));
shadow = new UIButtonGroup<Boolean>(new String[]{Inter.getLocText("Plugin-ChartF_On"), Inter.getLocText("Plugin-ChartF_Off")}, new Boolean[]{true, false});
return new Component[][]{
new Component[]{typeComboBox, null},
new Component[]{centerPane, null},
new Component[]{null, null},
new Component[]{new UILabel(Inter.getLocText("FR-Chart-Shape_Fill")), typeComboBox},
new Component[]{null, centerPane},
new Component[]{new UILabel(Inter.getLocText("Plugin-Chart_Alpha")), transparent},
new Component[]{shadow, null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Shadow")), shadow},
};
}
@ -137,7 +137,7 @@ public class VanChartBackgroundPane extends BasicPane {
double alpha = attr.getAlpha() * ALPHA_V;
transparent.populateBean(alpha);
if(shadow != null){
shadow.setSelected(attr.isShadow());
shadow.setSelectedIndex(attr.isShadow() == true ? 0 : 1);
}
for (int i = 0; i < paneList.size(); i++) {
BackgroundQuickPane pane = paneList.get(i);
@ -159,7 +159,7 @@ public class VanChartBackgroundPane extends BasicPane {
}
attr.setAlpha((float) (transparent.updateBean() / ALPHA_V));
if(shadow != null){
attr.setShadow(shadow.isSelected());
attr.setShadow(shadow.getSelectedIndex() == 0);
}
}
}

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

@ -49,8 +49,9 @@ public class VanChartBackgroundPaneWithOutImageAndShadow extends VanChartBackgro
@Override
protected Component[][] getPaneComponents() {
return new Component[][]{
new Component[]{typeComboBox, null},
new Component[]{centerPane, null},
new Component[]{null, null},
new Component[]{new UILabel(Inter.getLocText("FR-Chart-Shape_Fill")), typeComboBox},
new Component[]{null, centerPane},
new Component[]{new UILabel(Inter.getLocText("Plugin-Chart_Alpha")), transparent},
};
}

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

@ -22,8 +22,9 @@ public class VanChartBackgroundWithOutShadowWithRadiusPane extends VanChartBackg
protected Component[][] getPaneComponents() {
radius = new UISpinner(0,1000,1,0);
return new Component[][]{
new Component[]{typeComboBox, null},
new Component[]{centerPane, null},
new Component[]{null, null},
new Component[]{new UILabel(Inter.getLocText("FR-Chart-Shape_Fill")), typeComboBox},
new Component[]{null, centerPane},
new Component[]{new UILabel(Inter.getLocText("Plugin-Chart_Alpha")), transparent},
new Component[]{new UILabel(Inter.getLocText("plugin-ChartF_Radius")+":"),radius}
};

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

@ -1,6 +1,7 @@
package com.fr.plugin.chart.designer.component.background;
import com.fr.base.background.ColorBackground;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.backgroundpane.BackgroundQuickPane;
@ -33,8 +34,9 @@ public class VanChartMarkerBackgroundPane extends VanChartBackgroundPane {
protected Component[][] getPaneComponents() {
return new Component[][]{
new Component[]{typeComboBox, null},
new Component[]{centerPane, null}
new Component[]{null, null},
new Component[]{new UILabel(Inter.getLocText("FR-Chart-Shape_Fill")), typeComboBox},
new Component[]{null, centerPane},
};
}

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

@ -7,9 +7,9 @@ import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.icombobox.LineComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.style.color.ColorSelectBox;
import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.stable.CoreConstants;
import javax.swing.*;
@ -31,17 +31,18 @@ public class VanChartBorderPane extends BasicPane {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = { p,f };
double[] rowSize = {p, p, p};
double[] rowSize = {p, p, p, p};
Component[][] components = getUseComponent();
JPanel panel = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Border"}, components, rowSize, columnSize);
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize);
this.setLayout(new BorderLayout());
this.add(panel,BorderLayout.CENTER);
}
protected Component[][] getUseComponent() {
return new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_LineStyle")+":"),currentLineCombo},
new Component[]{new UILabel(Inter.getLocText("FR-Chart-Color_Color")+":"),currentLineColorPane},
new Component[]{null,null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_LineStyle")),currentLineCombo},
new Component[]{new UILabel(Inter.getLocText("FR-Chart-Color_Color")),currentLineColorPane},
};
}

7
designer_chart/src/com/fr/plugin/chart/designer/component/border/VanChartBorderWithRadiusPane.java

@ -26,9 +26,10 @@ public class VanChartBorderWithRadiusPane extends VanChartBorderPane {
@Override
protected Component[][] getUseComponent() {
return new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_LineStyle")+":"),currentLineCombo},
new Component[]{new UILabel(Inter.getLocText("FR-Chart-Color_Color")+":"),currentLineColorPane},
new Component[]{new UILabel(Inter.getLocText("plugin-ChartF_Radius")+":"),radius}
new Component[]{null,null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_LineStyle")),currentLineCombo},
new Component[]{new UILabel(Inter.getLocText("FR-Chart-Color_Color")),currentLineColorPane},
new Component[]{new UILabel(Inter.getLocText("plugin-ChartF_Radius")),radius}
} ;
}

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

@ -3,8 +3,8 @@ package com.fr.plugin.chart.designer.style;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot;
import com.fr.design.mainframe.chart.PaneTitleConstants;
import com.fr.design.dialog.BasicScrollPane;
import com.fr.plugin.chart.attr.VanChartLegend;
import com.fr.plugin.chart.designer.AbstractVanChartScrollPane;
import com.fr.plugin.chart.designer.PlotFactory;
import com.fr.plugin.chart.vanchart.VanChart;
@ -14,7 +14,7 @@ import java.awt.*;
/**
* 属性表, 图表样式-图例 界面.
*/
public class VanChartLegendPane extends BasicScrollPane<VanChart> {
public class VanChartLegendPane extends AbstractVanChartScrollPane<VanChart> {
private static final long serialVersionUID = 7553135492053931171L;
private VanChartPlotLegendPane legendContent;

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

@ -12,12 +12,12 @@ import com.fr.design.gui.ispinner.UISpinner;
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.*;
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane;
import com.fr.general.Inter;
import com.fr.plugin.chart.attr.VanChartLegend;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.component.background.VanChartBackgroundWithOutImagePane;
import com.fr.plugin.chart.designer.component.VanChartFloatPositionPane;
import com.fr.plugin.chart.designer.component.background.VanChartBackgroundWithOutImagePane;
import com.fr.plugin.chart.designer.component.border.VanChartBorderWithRadiusPane;
import com.fr.stable.Constants;
@ -52,6 +52,8 @@ public class VanChartPlotLegendPane extends BasicPane {
protected VanChartFloatPositionPane customFloatPositionPane;
protected UIButtonGroup<Integer> limitSize;
protected UISpinner maxProportion;
private UILabel limitSizeTitle;
//高亮显示的按钮
protected UIButtonGroup<Boolean> highlightButton;
@ -77,10 +79,9 @@ public class VanChartPlotLegendPane extends BasicPane {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] col = {f};
double[] row = {p, p, p};
double[] row = {p, p};
Component[][] components = new Component[][]{
new Component[]{isLegendVisible},
new Component[]{new JSeparator()},
new Component[]{legendPane},
};
@ -109,13 +110,11 @@ public class VanChartPlotLegendPane extends BasicPane {
double[] rowSize = { p,p,p,p,p,p,p};
Component[][] components = new Component[][]{
new Component[]{createTitlePositionPane(new double[]{p,p},columnSize),null},
new Component[]{new JSeparator(),null},
new Component[]{createTitlePositionPane(new double[]{p,p,p},columnSize),null},
new Component[]{createTitleStylePane(),null} ,
new Component[]{new JSeparator(),null},
new Component[]{borderPane,null},
new Component[]{backgroundPane,null},
new Component[]{createDisplayStrategy(),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[]{TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_DisplayStrategy"), createDisplayStrategy()),null}
};
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
}
@ -124,6 +123,10 @@ public class VanChartPlotLegendPane extends BasicPane {
borderPane = new VanChartBorderWithRadiusPane();
backgroundPane = new VanChartBackgroundWithOutImagePane();
highlightPane = createHighlightPane();
JPanel panel = new JPanel();
panel.setLayout(new BorderLayout());
panel.add(createDisplayStrategy(), BorderLayout.CENTER);
panel.add(highlightPane, BorderLayout.SOUTH);
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
@ -131,14 +134,11 @@ public class VanChartPlotLegendPane extends BasicPane {
double[] rowSize = { p,p,p,p,p,p,p,p};
Component[][] components = new Component[][]{
new Component[]{createTitlePositionPane(new double[]{p,p},columnSize),null},
new Component[]{new JSeparator(),null},
new Component[]{createTitlePositionPane(new double[]{p,p,p},columnSize),null},
new Component[]{createTitleStylePane(),null} ,
new Component[]{new JSeparator(),null},
new Component[]{borderPane,null},
new Component[]{backgroundPane,null},
new Component[]{createDisplayStrategy(),null},
new Component[]{highlightPane, 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[]{TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_DisplayStrategy"), panel),null},
};
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
}
@ -161,16 +161,17 @@ public class VanChartPlotLegendPane extends BasicPane {
customFloatPositionButton.setEventBannded(true);
Component[][] components = new Component[][]{
new Component[]{location,null},
new Component[]{customFloatPositionButton,null}
new Component[]{null,null},
new Component[]{new UILabel(Inter.getLocText("Chart-Layout_Position")),location},
new Component[]{null,customFloatPositionButton}
};
customFloatPositionPane = new VanChartFloatPositionPane();
initPositionListener();
JPanel panel = TableLayoutHelper.createTableLayoutPane(components,row,col);
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Chart-Layout_Position"), panel);
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components,row,col);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Chart_Layout"), panel);
}
private void initPositionListener(){
@ -218,21 +219,26 @@ public class VanChartPlotLegendPane extends BasicPane {
protected JPanel createTitleStylePane(){
textAttrPane = new ChartTextAttrPane();
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style"), textAttrPane);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style"), textAttrPane);
}
protected JPanel createDisplayStrategy(){
maxProportion = new UISpinner(0,100,1,30);
limitSize = new UIButtonGroup<Integer>(new String[]{Inter.getLocText("Plugin-ChartF_LimitAreaSize"),Inter.getLocText("Plugin-ChartF_NotLimitAreaSize")});
limitSize = new UIButtonGroup<Integer>(new String[]{Inter.getLocText("Plugin-ChartF_Limit"),Inter.getLocText("Plugin-ChartF_NotLimit")});
limitSizeTitle = new UILabel(Inter.getLocText("Plugin-ChartF_MaxProportion"));
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {f,p};
double[] rowSize = {p,p};
double[] columnSize = {p,f};
double[] rowSize = {p,p,p};
Component[][] components = new Component[][]{
new Component[]{limitSize,null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_LegendMaxProportion")+":"),maxProportion},
new Component[]{null,null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_AreaSize"), SwingConstants.LEFT), limitSize},
new Component[]{limitSizeTitle,maxProportion},
};
JPanel panel = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize);
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components,rowSize,columnSize);
limitSize.addActionListener(new ActionListener() {
@Override
@ -240,23 +246,21 @@ public class VanChartPlotLegendPane extends BasicPane {
checkMaxProPortionUse();
}
});
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_DisplayStrategy"), panel);
return panel;
}
private JPanel createHighlightPane(){
highlightButton = new UIButtonGroup<Boolean>(new String[]{Inter.getLocText("Plugin-ChartF_On"), Inter.getLocText("Plugin-ChartF_Off")}, new Boolean[]{true, false});
JPanel highlightPane = TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Highlight"), highlightButton);
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {f};
double[] columnSize = {p,f};
double[] rowSize = {p,p};
Component[][] components = new Component[][]{
new Component[]{new JSeparator()},
new Component[]{highlightPane}
new Component[]{null,null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Highlight")),highlightButton}
};
return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize);
return TableLayout4VanChartHelper.createGapTableLayoutPane(components,rowSize,columnSize);
}
protected void checkAllUse() {
@ -273,7 +277,9 @@ public class VanChartPlotLegendPane extends BasicPane {
//检查最大显示占比是否可用
private void checkMaxProPortionUse() {
maxProportion.setEnabled(limitSize.getSelectedIndex() == 0 && limitSize.isEnabled());
maxProportion.setVisible(limitSize.getSelectedIndex() == 0 && limitSize.isEnabled());
limitSizeTitle.setVisible(limitSize.getSelectedIndex() == 0 && limitSize.isEnabled());
}
protected void checkBoxUse() {

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

@ -7,10 +7,10 @@ import com.fr.design.layout.TableLayoutHelper;
import com.fr.general.Inter;
import com.fr.plugin.chart.attr.VanChartLegend;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.type.LegendType;
import com.fr.plugin.chart.range.VanChartRangeLegend;
import com.fr.plugin.chart.range.component.GradualLegendPane;
import com.fr.plugin.chart.range.component.SectionLegendPane;
import com.fr.plugin.chart.type.LegendType;
import javax.swing.*;
import java.awt.*;
@ -80,7 +80,7 @@ public class VanChartRangeLegendPane extends VanChartPlotLegendPane {
}
private JPanel createTableLayoutPaneWithTitle(String title, Component component) {
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(title, component);
return TableLayout4VanChartHelper.createGapTableLayoutPane(title, component);
}
protected UIButtonGroup<LegendType> createLegendTypeButton(){
@ -114,7 +114,6 @@ public class VanChartRangeLegendPane extends VanChartPlotLegendPane {
double[] row = {p, p, p, p};
Component[][] components = new Component[][]{
new Component[]{legendTypeButtonWithTilePane},
new Component[]{new JSeparator()},
new Component[]{rangeLegendPane},
new Component[]{commonLegendPane}
};

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

@ -1,17 +1,5 @@
package com.fr.plugin.chart.designer.style;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.Icon;
import javax.swing.JPanel;
import javax.swing.JSeparator;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import com.fr.base.BaseUtils;
import com.fr.base.Formula;
import com.fr.base.Style;
@ -28,19 +16,28 @@ 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.ChartTextAttrPane;
import com.fr.design.dialog.BasicScrollPane;
import com.fr.general.Inter;
import com.fr.plugin.chart.attr.VanChartTitle;
import com.fr.plugin.chart.designer.AbstractVanChartScrollPane;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.component.background.VanChartBackgroundWithOutShadowWithRadiusPane;
import com.fr.plugin.chart.designer.component.VanChartFloatPositionPane;
import com.fr.plugin.chart.designer.component.background.VanChartBackgroundWithOutShadowWithRadiusPane;
import com.fr.plugin.chart.vanchart.VanChart;
import com.fr.stable.Constants;
import com.fr.stable.StableUtils;
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.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
// 属性表-样式 标题界面
public class VanChartTitlePane extends BasicScrollPane<VanChart> {
public class VanChartTitlePane extends AbstractVanChartScrollPane<VanChart> {
private static final long serialVersionUID = -2438898431228882682L;
private static final int WIDTH = 165;
@ -59,6 +56,7 @@ public class VanChartTitlePane extends BasicScrollPane<VanChart> {
private VanChartFloatPositionPane customFloatPositionPane;
private UIButtonGroup<Integer> limitSize;
private UISpinner maxProportion;
private UILabel limitSizeTitle;
protected VanChartStylePane parent;
@ -87,7 +85,6 @@ public class VanChartTitlePane extends BasicScrollPane<VanChart> {
double[] rowSize = {p, p, p};
Component[][] components = new Component[][]{
new Component[]{isTitleVisible},
new Component[]{new JSeparator()},
new Component[]{titlePane}
};
@ -106,18 +103,16 @@ public class VanChartTitlePane extends BasicScrollPane<VanChart> {
private JPanel createTitlePane(){
backgroundPane = new VanChartBackgroundWithOutShadowWithRadiusPane();
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p, f};
double[] rowSize = {p,p,p,p,p,p,p,p};
Component[][] components = new Component[][]{
new Component[]{createTitleContentPane(new double[]{p,p},columnSize),null},
new Component[]{new JSeparator(),null},
new Component[]{createTitlePositionPane(new double[]{p,p},columnSize),null},
new Component[]{new JSeparator(),null},
new Component[]{createTitleContentPane(new double[]{p,p,p},columnSize),null},
new Component[]{createTitlePositionPane(new double[]{p,p,p},columnSize),null},
new Component[]{createTitleStylePane(),null},
new Component[]{new JSeparator(),null},
new Component[]{backgroundPane,null},
new Component[]{TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Background"), backgroundPane),null},
new Component[]{createDisplayStrategy(),null}
};
@ -128,12 +123,12 @@ public class VanChartTitlePane extends BasicScrollPane<VanChart> {
titleContent = new TinyFormulaPane();
useHtml = new UIToggleButton(Inter.getLocText("Plugin-ChartF_Html"));
Component[][] components = new Component[][]{
new Component[]{titleContent,null},
new Component[]{useHtml,null},
new Component[]{null ,null},
new Component[]{new UILabel(Inter.getLocText("FR-Designer_Text"), SwingConstants.LEFT), titleContent},
new Component[]{null ,useHtml},
};
JPanel panel = TableLayoutHelper.createTableLayoutPane(components,row,col);
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Content"), panel);
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components,row,col);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Content"), panel);
}
private JPanel createTitlePositionPane(double[] row, double[] col){
@ -147,35 +142,38 @@ public class VanChartTitlePane extends BasicScrollPane<VanChart> {
customFloatPositionButton.setEventBannded(true);
Component[][] components = new Component[][]{
new Component[]{alignmentPane,null},
new Component[]{customFloatPositionButton,null}
new Component[]{null,null},
new Component[]{new UILabel(Inter.getLocText("BorderLayout-Constraints"), SwingConstants.LEFT),alignmentPane},
new Component[]{null,customFloatPositionButton}
};
customFloatPositionPane = new VanChartFloatPositionPane();
initPositionListener();
JPanel panel = TableLayoutHelper.createTableLayoutPane(components,row,col);
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Chart-Layout_Position"), panel);
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components,row,col);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Chart_Layout"), panel);
}
private JPanel createTitleStylePane(){
textAttrPane = new ChartTextAttrPane();
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style"), textAttrPane);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style"), textAttrPane);
}
private JPanel createDisplayStrategy(){
maxProportion = new UISpinner(0,100,1,30);
limitSize = new UIButtonGroup<Integer>(new String[]{Inter.getLocText("Plugin-ChartF_LimitAreaSize"),Inter.getLocText("Plugin-ChartF_NotLimitAreaSize")});
limitSize = new UIButtonGroup<Integer>(new String[]{Inter.getLocText("Plugin-ChartF_Limit"),Inter.getLocText("Plugin-ChartF_NotLimit")});
limitSizeTitle = new UILabel(Inter.getLocText("Plugin-ChartF_MaxProportion"));
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {f,p};
double[] rowSize = {p,p};
double[] columnSize = {p,f};
double[] rowSize = {p,p,p};
Component[][] components = new Component[][]{
new Component[]{limitSize,null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_TitleMaxProportion")+":"),maxProportion},
new Component[]{null,null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_AreaSize"), SwingConstants.LEFT), limitSize},
new Component[]{limitSizeTitle,maxProportion},
};
JPanel panel = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize);
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components,rowSize,columnSize);
limitSize.addActionListener(new ActionListener() {
@Override
@ -184,7 +182,7 @@ public class VanChartTitlePane extends BasicScrollPane<VanChart> {
}
});
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_DisplayStrategy"), panel);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_DisplayStrategy"), panel);
}
private void initPositionListener(){
@ -252,7 +250,8 @@ public class VanChartTitlePane extends BasicScrollPane<VanChart> {
//检查最大显示占比是否可用
private void checkMaxProPortionUse() {
maxProportion.setEnabled(limitSize.getSelectedIndex() == 0 && limitSize.isEnabled());
maxProportion.setVisible(limitSize.getSelectedIndex() == 0 && limitSize.isEnabled());
limitSizeTitle.setVisible(limitSize.getSelectedIndex() == 0 && limitSize.isEnabled());
}
/**

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

@ -69,7 +69,7 @@ public class GradualIntervalConfigPane extends JPanel{
new Component[]{minMaxValuePane, null},
new Component[]{new BoldFontTextLabel(Inter.getLocText(new String[]{"FR-Chart-Color_Subject", "FR-Chart-Color_Color"})), colorSelectBox},
new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Value_Divided_stage")), numberDragPane},
new Component[]{legendGradientBar, null},
new Component[]{null, legendGradientBar},
};
}

5
designer_chart/src/com/fr/plugin/chart/range/component/GradualLegendPane.java

@ -26,7 +26,7 @@ public class GradualLegendPane extends JPanel{
}
private void initComponents() {
intervalConfigPane = createGradualIntervalConfigPane();
JPanel intervalConfigPaneWithTitle = TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Section_Config"),intervalConfigPane);
JPanel intervalConfigPaneWithTitle = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Section_Config"),intervalConfigPane);
labelFormPane = new LegendLabelFormatPane();
double p = TableLayout.PREFERRED;
@ -34,10 +34,9 @@ public class GradualLegendPane extends JPanel{
double[] col = {f};
double[] row = {p, p, p, p};
Component[][] components = new Component[][]{
new Component[]{null},
new Component[]{intervalConfigPaneWithTitle},
new Component[]{new JSeparator()},
new Component[]{labelFormPane},
new Component[]{new JSeparator()}
};
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, row, col);

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

@ -1,12 +1,14 @@
package com.fr.plugin.chart.range.component;
import com.fr.chart.base.LegendLabelFormat;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel;
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 com.fr.plugin.chart.designer.component.VanChartHtmlLabelPaneWithOutWidthAndHeight;
import com.fr.plugin.chart.designer.style.VanChartStylePane;
import com.fr.chart.base.LegendLabelFormat;
import javax.swing.*;
import java.awt.*;
@ -44,10 +46,17 @@ public class LegendLabelFormatPane extends JPanel{
centerPane.add(labelFormat,Inter.getLocText("Plugin-ChartF_Common"));
centerPane.add(htmlLabelPane, Inter.getLocText("Plugin-ChartF_Custom"));
JPanel contentPane = new JPanel(new BorderLayout(0, 4));
contentPane.add(labelFormatStyle, 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_Label_Format"), SwingConstants.LEFT), labelFormatStyle},
new Component[]{centerPane,null},
};
JPanel contentPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components,rowSize,columnSize);
labelFormatStyle.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@ -56,7 +65,7 @@ public class LegendLabelFormatPane extends JPanel{
});
labelFormatStyle.setSelectedIndex(0);
JPanel panel = TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Label_Format"), contentPane);
JPanel panel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Chart-Use_Format"), contentPane);
this.setLayout(new BorderLayout());
this.add(panel,BorderLayout.CENTER);
}

10
designer_chart/src/com/fr/plugin/chart/range/component/SectionIntervalConfigPane.java

@ -1,6 +1,7 @@
package com.fr.plugin.chart.range.component;
import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.mainframe.chart.gui.style.series.MapColorPickerPaneWithFormula;
import com.fr.general.Inter;
@ -13,12 +14,19 @@ import java.awt.*;
*/
public class SectionIntervalConfigPane extends MapColorPickerPaneWithFormula {
protected double[] getRowSIze () {
double p = TableLayout.PREFERRED;
return new double[]{p, p, p, p};
}
@Override
protected Component[][] createComponents(){
return new Component[][]{
new Component[]{new BoldFontTextLabel(""),getDesignTypeButtonGroup()},
new Component[]{null,null},
new Component[]{new BoldFontTextLabel(Inter.getLocText(new String[]{"FR-Chart-Color_Subject", "FR-Chart-Color_Color"})), getFillStyleCombox()},
new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Value_Divided_stage")), getRegionNumPane()},
new Component[]{new BoldFontTextLabel("Plugin-ChartF_RangeNum"),getDesignTypeButtonGroup()},
};
}
}

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

@ -22,7 +22,7 @@ public class SectionLegendPane extends JPanel{
private void initComponents() {
intervalConfigPane = createSectionIntervalConfigPane();
JPanel intervalConfigPaneWithTitle = TableLayout4VanChartHelper.createTitlePane(Inter.getLocText("Plugin-ChartF_Section_Config"), intervalConfigPane, 16);
JPanel intervalConfigPaneWithTitle = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Section_Config"), intervalConfigPane);
labelFormPane = new LegendLabelFormatPane(){
@Override
protected void checkCustomLabelText() {
@ -35,10 +35,9 @@ public class SectionLegendPane extends JPanel{
double[] col = {f};
double[] row = {p, p, p, p};
Component[][] components = new Component[][]{
new Component[]{null},
new Component[]{intervalConfigPaneWithTitle},
new Component[]{new JSeparator()},
new Component[]{labelFormPane},
new Component[]{new JSeparator()}
};
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, row, col);

Loading…
Cancel
Save