Browse Source

Merge pull request #776 in BA/design from ~MANGO/design:release to release

* commit 'e53ae9b10785e226cca6c59b59df01f9cded3b22':
  调整布局
  还原代码
  调整布局
  还原代码
master
superman 8 years ago
parent
commit
e14b66efaf
  1. 18
      designer_chart/src/com/fr/design/chart/axis/MinMaxValuePane.java
  2. 5
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java

18
designer_chart/src/com/fr/design/chart/axis/MinMaxValuePane.java

@ -42,14 +42,14 @@ public class MinMaxValuePane extends JPanel {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = { p, f };
double[] rowSize = { p, p, p, p, p, p, p, p};
double[] rowSize = { p, p, p, p};
Component[][] components = getPanelComponents();
JPanel panel = TableLayoutHelper.createTableLayoutPane(components ,rowSize,columnSize);
this.setLayout(new BorderLayout());
this.add(panel,BorderLayout.CENTER);
for(int i = 0; i < components.length; i+=2) {
for(int i = 0; i < components.length; i++) {
((UICheckBox)components[i][0]).addActionListener(new ActionListener() {
@Override
@ -57,19 +57,15 @@ public class MinMaxValuePane extends JPanel {
checkBoxUse();
}
});
ChartSwingUtils.addListener((UICheckBox)components[i][0], (UITextField)components[i+1][0]);
ChartSwingUtils.addListener((UICheckBox)components[i][0], (UITextField)components[i][1]);
}
}
protected Component[][] getPanelComponents() {
return new Component[][]{
new Component[]{minCheckBox},
new Component[]{minValueField},
new Component[]{maxCheckBox},
new Component[]{maxValueField},
new Component[]{isCustomMainUnitBox},
new Component[]{mainUnitField},
new Component[]{isCustomSecUnitBox},
new Component[]{secUnitField},
new Component[]{minCheckBox, minValueField},
new Component[]{maxCheckBox, maxValueField},
new Component[]{isCustomMainUnitBox, mainUnitField},
new Component[]{isCustomSecUnitBox, secUnitField},
};
}

5
designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java

@ -151,11 +151,10 @@ public class ChartValuePane extends ChartAxisUsePane<Axis>{
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = { LayoutConstants.CHART_ATTR_TOMARGIN,p,f};
double[] rowSize = { p, p, p};
double[] rowSize = {p, p};
Component[][] component = new Component[][]{
new Component[]{null,initMinMaxValue(),null},
new Component[]{null, addLogarithmicPane2ValuePane(), null},
new Component[]{null, null, addLogText()},
new Component[]{null, addLogarithmicPane2ValuePane(), addLogText()},
};
return TableLayoutHelper.createTableLayoutPane(component, rowSize, columnSize);
}

Loading…
Cancel
Save