Browse Source

Merge pull request #1163 in BA/design from ~MANGO/m_design:release/9.0 to release/9.0

* commit '8ae2cb4c7c41fcadb1eec23251cfe3b7c578f0cd':
  使用前有限条记录默认不显示
  修改区域段颜色配置面板
master
superman 7 years ago
parent
commit
2658b9f190
  1. 4
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java
  2. 41
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java
  3. 1
      designer_chart/src/com/fr/plugin/chart/range/component/SectionIntervalConfigPaneWithOutNum.java

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

@ -243,6 +243,8 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
preDataNumPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); preDataNumPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize);
preDataNumPane.setBorder(BorderFactory.createEmptyBorder(0,15,0,0)); preDataNumPane.setBorder(BorderFactory.createEmptyBorder(0,15,0,0));
//默认不显示
preDataNumPane.setVisible(false);
panel1.add(preDataNumPane, BorderLayout.CENTER); panel1.add(preDataNumPane, BorderLayout.CENTER);
notShowNull = new UICheckBox(Inter.getLocText("FR-Chart-Data_NotShowCate")); notShowNull = new UICheckBox(Inter.getLocText("FR-Chart-Data_NotShowCate"));
panel2.add(notShowNull, BorderLayout.NORTH); panel2.add(notShowNull, BorderLayout.NORTH);
@ -416,6 +418,8 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
preDataNumPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); preDataNumPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize);
preDataNumPane.setBorder(BorderFactory.createEmptyBorder(0,15,0,0)); preDataNumPane.setBorder(BorderFactory.createEmptyBorder(0,15,0,0));
//默认不显示
preDataNumPane.setVisible(false);
panel1.add(preDataNumPane, BorderLayout.CENTER); panel1.add(preDataNumPane, BorderLayout.CENTER);
notShowNull = new UICheckBox(Inter.getLocText("FR-Chart-Data_NotShowSeries")); notShowNull = new UICheckBox(Inter.getLocText("FR-Chart-Data_NotShowSeries"));
panel2.add(notShowNull, BorderLayout.NORTH); panel2.add(notShowNull, BorderLayout.NORTH);

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

@ -19,6 +19,7 @@ import com.fr.design.style.color.ColorControlWindow;
import com.fr.design.style.color.ColorSelectBox; import com.fr.design.style.color.ColorSelectBox;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.*;
@ -32,11 +33,14 @@ import java.util.List;
public class UIColorPickerPane extends BasicPane implements UIObserver { public class UIColorPickerPane extends BasicPane implements UIObserver {
private static final int MARGIN_TOP = 10; private static final int MARGIN_TOP = 10;
private static final int MARGIN_LEFT = 5;
private static final int COLORGROUP_MARGIN_LEFT = 40;
private static final int OFF_HEIGHT = 6; private static final int OFF_HEIGHT = 6;
private static final int COLOR_REC_HEIGHT = 40; private static final int COLOR_REC_HEIGHT = 40;
private static final int COLOR_REC_WIDTH = 30; private static final int COLOR_REC_WIDTH = 30;
protected static final int TEXTFIELD_HEIGHT = 20; protected static final int TEXTFIELD_HEIGHT = 20;
protected static final int TEXTFIELD_WIDTH = 120; protected static final int TEXTFIELD_WIDTH = 120;
protected static final int UPCONTROLPANE_WIDTH = 230;
private static final int LAYOUR_DET = 6; private static final int LAYOUR_DET = 6;
private static final double VALUE = 100; private static final double VALUE = 100;
@ -182,17 +186,18 @@ public class UIColorPickerPane extends BasicPane implements UIObserver {
}; };
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {p, f}; double d = TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH;
double[] columnSize = {d, e};
double[] rowSize = {p}; double[] rowSize = {p};
Component[][] tmpComp = new Component[][]{new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Value_Divided_stage")), regionNumPane}}; Component[][] tmpComp = new Component[][]{new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Value_Divided_stage")), regionNumPane}};
stagePanel = TableLayoutHelper.createTableLayoutPane(tmpComp, rowSize, columnSize); stagePanel = TableLayout4VanChartHelper.createGapTableLayoutPane(tmpComp, rowSize, columnSize);
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Value_Tick_And_Color")), designTypeButtonGroup}, new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Value_Tick_And_Color")), designTypeButtonGroup},
}; };
upControlPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); upControlPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize);
this.textGroup = new TextFieldGroupPane(); this.textGroup = new TextFieldGroupPane();
this.colorGroup = new ColorGroupPane(); this.colorGroup = new ColorGroupPane();
@ -249,7 +254,7 @@ public class UIColorPickerPane extends BasicPane implements UIObserver {
*/ */
public Dimension getPreferredSize() { public Dimension getPreferredSize() {
if (designTypeButtonGroup.getSelectedIndex() == 0) { if (designTypeButtonGroup.getSelectedIndex() == 0) {
return new Dimension(colorGroup.getPreferredSize().width + textGroup.getPreferredSize().width, upControlPane.getPreferredSize().height); return new Dimension(colorGroup.getPreferredSize().width + textGroup.getPreferredSize().width, upControlPane.getPreferredSize().height + MARGIN_TOP);
} else { } else {
int extra = stagePanel == null ? 0 : stagePanel.getPreferredSize().height + this.MARGIN_TOP; int extra = stagePanel == null ? 0 : stagePanel.getPreferredSize().height + this.MARGIN_TOP;
return new Dimension(colorGroup.getPreferredSize().width + textGroup.getPreferredSize().width, return new Dimension(colorGroup.getPreferredSize().width + textGroup.getPreferredSize().width,
@ -571,13 +576,13 @@ public class UIColorPickerPane extends BasicPane implements UIObserver {
return null; return null;
} }
@Override @Override
public void layoutContainer(Container parent) { public void layoutContainer(Container parent) {
upControlPane.setBounds(0, 0, parent.getPreferredSize().width, upControlPane.getPreferredSize().height); upControlPane.setBounds(MARGIN_LEFT, MARGIN_TOP, UPCONTROLPANE_WIDTH, upControlPane.getPreferredSize().height + MARGIN_TOP);
stagePanel.setBounds(0,upControlPane.getPreferredSize().height + LAYOUR_DET, parent.getPreferredSize().width, stagePanel.getPreferredSize().height); stagePanel.setBounds(MARGIN_LEFT, upControlPane.getPreferredSize().height + LAYOUR_DET + MARGIN_TOP, UPCONTROLPANE_WIDTH, stagePanel.getPreferredSize().height);
colorGroup.setBounds(0, MARGIN_TOP + upControlPane.getPreferredSize().height + stagePanel.getPreferredSize().height + 2 * LAYOUR_DET, colorGroup.getPreferredSize().width, colorGroup.getPreferredSize().height + upControlPane.getPreferredSize().height); colorGroup.setBounds(COLORGROUP_MARGIN_LEFT, 2 * MARGIN_TOP + upControlPane.getPreferredSize().height + stagePanel.getPreferredSize().height + 2 * LAYOUR_DET, colorGroup.getPreferredSize().width, colorGroup.getPreferredSize().height + upControlPane.getPreferredSize().height);
textGroup.setBounds(colorGroup.getPreferredSize().width, upControlPane.getPreferredSize().height+ stagePanel.getPreferredSize().height + 2 * LAYOUR_DET, textGroup.getPreferredSize().width, textGroup.getPreferredSize().height); textGroup.setBounds(colorGroup.getPreferredSize().width + COLORGROUP_MARGIN_LEFT, upControlPane.getPreferredSize().height + stagePanel.getPreferredSize().height + 2 * LAYOUR_DET + MARGIN_TOP, textGroup.getPreferredSize().width, textGroup.getPreferredSize().height);
} }
@Override @Override
public void addLayoutComponent(String name, Component comp) { public void addLayoutComponent(String name, Component comp) {
@ -601,12 +606,12 @@ public class UIColorPickerPane extends BasicPane implements UIObserver {
return null; return null;
} }
@Override @Override
public void layoutContainer(Container parent) { public void layoutContainer(Container parent) {
upControlPane.setBounds(0, 0, parent.getPreferredSize().width, upControlPane.getPreferredSize().height); upControlPane.setBounds(MARGIN_LEFT, MARGIN_TOP, UPCONTROLPANE_WIDTH, upControlPane.getPreferredSize().height);
colorGroup.setBounds(0, MARGIN_TOP + upControlPane.getPreferredSize().height + LAYOUR_DET, colorGroup.getPreferredSize().width, colorGroup.getPreferredSize().height + upControlPane.getPreferredSize().height); colorGroup.setBounds(COLORGROUP_MARGIN_LEFT, MARGIN_TOP + upControlPane.getPreferredSize().height + LAYOUR_DET, colorGroup.getPreferredSize().width, colorGroup.getPreferredSize().height + upControlPane.getPreferredSize().height);
textGroup.setBounds(colorGroup.getPreferredSize().width, upControlPane.getPreferredSize().height + LAYOUR_DET, textGroup.getPreferredSize().width, textGroup.getPreferredSize().height); textGroup.setBounds(colorGroup.getPreferredSize().width + COLORGROUP_MARGIN_LEFT, upControlPane.getPreferredSize().height + LAYOUR_DET, textGroup.getPreferredSize().width, textGroup.getPreferredSize().height);
} }
@Override @Override
public void addLayoutComponent(String name, Component comp) { public void addLayoutComponent(String name, Component comp) {

1
designer_chart/src/com/fr/plugin/chart/range/component/SectionIntervalConfigPaneWithOutNum.java

@ -35,7 +35,6 @@ public class SectionIntervalConfigPaneWithOutNum extends MapColorPickerPaneWithF
double d = TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH; double d = TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH;
double[] columnSize = {d, e}; double[] columnSize = {d, e};
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, getRowSIze (), columnSize); JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, getRowSIze (), columnSize);
panel.setPreferredSize(new Dimension(230, (int)panel.getPreferredSize().getHeight()));
return panel; return panel;
} }

Loading…
Cancel
Save