Browse Source

9.0图表样式修改:

1、整体布局调整
2、属性切换图标换为文字
3、样式:标题面板调整
4、样式:图例面板调整
master
mengao 7 years ago
parent
commit
3cfd2716c5
  1. 26
      designer_chart/src/com/fr/plugin/chart/designer/component/background/VanChartBackgroundPane.java
  2. 5
      designer_chart/src/com/fr/plugin/chart/designer/component/background/VanChartBackgroundPaneWithOutImageAndShadow.java
  3. 5
      designer_chart/src/com/fr/plugin/chart/designer/component/background/VanChartBackgroundWithOutShadowWithRadiusPane.java
  4. 6
      designer_chart/src/com/fr/plugin/chart/designer/component/background/VanChartMarkerBackgroundPane.java
  5. 11
      designer_chart/src/com/fr/plugin/chart/designer/component/border/VanChartBorderPane.java
  6. 7
      designer_chart/src/com/fr/plugin/chart/designer/component/border/VanChartBorderWithRadiusPane.java

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}
} ;
}

Loading…
Cancel
Save