Browse Source

REPORT-2897 9.0设计器修改

去掉空格,放个空的uilabel做对齐
master
MoMeak 8 years ago
parent
commit
9ef203c6a6
  1. 6
      designer/src/com/fr/design/mainframe/ReportFloatPane.java
  2. 89
      designer/src/com/fr/design/widget/ui/WaterMarkDictPane.java

6
designer/src/com/fr/design/mainframe/ReportFloatPane.java

@ -43,13 +43,15 @@ public class ReportFloatPane extends JPanel {
topToolBar.setLayout(new BorderLayout()); topToolBar.setLayout(new BorderLayout());
insertFloatMenu = createInsertToolBar(); insertFloatMenu = createInsertToolBar();
topToolBar.add(createButtonUI()); topToolBar.add(createButtonUI());
UILabel emptyLabel = new UILabel();
emptyLabel.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0));
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = {p, f}; double[] columnSize = {p, p, f};
double[] rowSize = {p}; double[] rowSize = {p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(" " + Inter.getLocText("FR-Designer_Add_FloatElement") + " "), topToolBar}, new Component[]{new UILabel(" " + Inter.getLocText("FR-Designer_Add_FloatElement")), emptyLabel, topToolBar},
}; };
JPanel leftTopPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); JPanel leftTopPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
leftTopPane.setBorder(BorderFactory.createEmptyBorder(10, 4, 0, 15)); leftTopPane.setBorder(BorderFactory.createEmptyBorder(10, 4, 0, 15));

89
designer/src/com/fr/design/widget/ui/WaterMarkDictPane.java

@ -15,47 +15,56 @@ import com.fr.design.layout.TableLayoutHelper;
import com.fr.form.ui.WaterMark; import com.fr.form.ui.WaterMark;
import com.fr.general.Inter; import com.fr.general.Inter;
public class WaterMarkDictPane extends JPanel{ public class WaterMarkDictPane extends JPanel {
private UITextField waterMarkTextField; private UITextField waterMarkTextField;
public WaterMarkDictPane() { public WaterMarkDictPane() {
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
// this.setBorder(BorderFactory.createEmptyBorder(2,2,2,2)); // this.setBorder(BorderFactory.createEmptyBorder(2,2,2,2));
// this.add(new UILabel(Inter.getLocText("WaterMark") + ":")); // this.add(new UILabel(Inter.getLocText("WaterMark") + ":"));
waterMarkTextField = new UITextField(13); waterMarkTextField = new UITextField(13);
double f = TableLayout.FILL; UILabel emptyLabel = new UILabel();
double p = TableLayout.PREFERRED; emptyLabel.setBorder(BorderFactory.createEmptyBorder(0, 33, 0, 0));
Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("FR-Designer_WaterMark") + " "), waterMarkTextField }, double f = TableLayout.FILL;
}; double p = TableLayout.PREFERRED;
double[] rowSize = {p, p}; Component[][] components = new Component[][]{
double[] columnSize = {p,f}; new Component[]{new UILabel(Inter.getLocText("FR-Designer_WaterMark")), emptyLabel, waterMarkTextField},
int[][] rowCount = {{1, 1},{1, 1}}; };
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_LARGE, LayoutConstants.VGAP_MEDIUM); double[] rowSize = {p};
panel.setBorder(BorderFactory.createEmptyBorder(10,0,5,0)); double[] columnSize = {p, p, f};
this.add(panel , BorderLayout.CENTER); int[][] rowCount = {{1, 1}};
} JPanel panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
// JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_LARGE, LayoutConstants.VGAP_MEDIUM);
public void populate(WaterMark waterMark) { panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 5, 0));
this.waterMarkTextField.setText(waterMark.getWaterMark()); this.add(panel, BorderLayout.CENTER);
} }
public void addInputKeyListener(KeyListener kl) {
this.waterMarkTextField.addKeyListener(kl); public void populate(WaterMark waterMark) {
} this.waterMarkTextField.setText(waterMark.getWaterMark());
public void removeInputKeyListener(KeyListener kl) { }
this.waterMarkTextField.removeKeyListener(kl);
} public void addInputKeyListener(KeyListener kl) {
public void update(WaterMark waterMark) { this.waterMarkTextField.addKeyListener(kl);
waterMark.setWaterMark(this.waterMarkTextField.getText()); }
}
public void setWaterMark(String waterMark) { public void removeInputKeyListener(KeyListener kl) {
this.waterMarkTextField.setText(waterMark); this.waterMarkTextField.removeKeyListener(kl);
} }
public String getWaterMark() {
return this.waterMarkTextField.getText(); public void update(WaterMark waterMark) {
} waterMark.setWaterMark(this.waterMarkTextField.getText());
}
public void setWaterMark(String waterMark) {
this.waterMarkTextField.setText(waterMark);
}
public String getWaterMark() {
return this.waterMarkTextField.getText();
}
} }
Loading…
Cancel
Save