diff --git a/designer/src/com/fr/design/mainframe/ReportFloatPane.java b/designer/src/com/fr/design/mainframe/ReportFloatPane.java index 51145d69fd..56c55a4b3d 100644 --- a/designer/src/com/fr/design/mainframe/ReportFloatPane.java +++ b/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)); diff --git a/designer/src/com/fr/design/widget/ui/WaterMarkDictPane.java b/designer/src/com/fr/design/widget/ui/WaterMarkDictPane.java index 0f2f0b9c70..e95d5cee1f 100644 --- a/designer/src/com/fr/design/widget/ui/WaterMarkDictPane.java +++ b/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(); + } + } \ No newline at end of file