Browse Source

REPORT-2897 9.0设计器修改

去掉空格,放个空的uilabel做对齐
master
MoMeak 7 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());
insertFloatMenu = createInsertToolBar();
topToolBar.add(createButtonUI());
UILabel emptyLabel = new UILabel();
emptyLabel.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0));
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p, f};
double[] columnSize = {p, p, f};
double[] rowSize = {p};
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);
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.general.Inter;
public class WaterMarkDictPane extends JPanel{
private UITextField waterMarkTextField;
public WaterMarkDictPane() {
this.setLayout(new BorderLayout());
public class WaterMarkDictPane extends JPanel {
private UITextField waterMarkTextField;
public WaterMarkDictPane() {
this.setLayout(new BorderLayout());
// this.setBorder(BorderFactory.createEmptyBorder(2,2,2,2));
// this.add(new UILabel(Inter.getLocText("WaterMark") + ":"));
waterMarkTextField = new UITextField(13);
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;
Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("FR-Designer_WaterMark") + " "), waterMarkTextField },
};
double[] rowSize = {p, p};
double[] columnSize = {p,f};
int[][] rowCount = {{1, 1},{1, 1}};
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_LARGE, LayoutConstants.VGAP_MEDIUM);
panel.setBorder(BorderFactory.createEmptyBorder(10,0,5,0));
this.add(panel , BorderLayout.CENTER);
}
public void populate(WaterMark waterMark) {
this.waterMarkTextField.setText(waterMark.getWaterMark());
}
public void addInputKeyListener(KeyListener kl) {
this.waterMarkTextField.addKeyListener(kl);
}
public void removeInputKeyListener(KeyListener kl) {
this.waterMarkTextField.removeKeyListener(kl);
}
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();
}
waterMarkTextField = new UITextField(13);
UILabel emptyLabel = new UILabel();
emptyLabel.setBorder(BorderFactory.createEmptyBorder(0, 33, 0, 0));
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;
Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("FR-Designer_WaterMark")), emptyLabel, waterMarkTextField},
};
double[] rowSize = {p};
double[] columnSize = {p, p, f};
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);
panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 5, 0));
this.add(panel, BorderLayout.CENTER);
}
public void populate(WaterMark waterMark) {
this.waterMarkTextField.setText(waterMark.getWaterMark());
}
public void addInputKeyListener(KeyListener kl) {
this.waterMarkTextField.addKeyListener(kl);
}
public void removeInputKeyListener(KeyListener kl) {
this.waterMarkTextField.removeKeyListener(kl);
}
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