diff --git a/designer-base/src/main/java/com/fr/design/formula/JavaEditorPane.java b/designer-base/src/main/java/com/fr/design/formula/JavaEditorPane.java index a34762a1fd..c5902c3cdc 100644 --- a/designer-base/src/main/java/com/fr/design/formula/JavaEditorPane.java +++ b/designer-base/src/main/java/com/fr/design/formula/JavaEditorPane.java @@ -32,6 +32,9 @@ import java.io.InputStream; import java.util.ArrayList; import java.util.concurrent.ExecutionException; +import static com.fine.swing.ui.layout.Layouts.cell; +import static com.fine.swing.ui.layout.Layouts.row; + public class JavaEditorPane extends BasicPane { private RSyntaxTextArea javaText; @@ -83,13 +86,12 @@ public class JavaEditorPane extends BasicPane { } UIScrollPane jt = new UIScrollPane(javaText); - JPanel toolbarPane = new JPanel(new FlowLayout(FlowLayout.LEFT)); + JPanel toolbarPane = new JPanel(new BorderLayout()); UIButton saveButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Save")); saveButton.setAction(new SaveAction()); UIButton compileButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Compile")); compileButton.setAction(new CompilerAction()); - toolbarPane.add(saveButton); - toolbarPane.add(compileButton); + toolbarPane.add(row(8, cell(saveButton), cell(compileButton)).getComponent()); this.add(toolbarPane, BorderLayout.NORTH); this.add(jt, BorderLayout.CENTER); @@ -155,7 +157,7 @@ public class JavaEditorPane extends BasicPane { private void saveTextToFile(String text) { if (StringUtils.isEmpty(text)) { - return; + return; } if (StringUtils.isEmpty(className)) { return; @@ -180,7 +182,7 @@ public class JavaEditorPane extends BasicPane { @Override protected JavaCompileInfo doInBackground() throws Exception { - + return FRContext.getCommonOperator().compile(javaText.getText()); } diff --git a/designer-realize/src/main/java/com/fr/design/report/ReportEnginePane.java b/designer-realize/src/main/java/com/fr/design/report/ReportEnginePane.java index dfbab0e02e..56e2398b35 100644 --- a/designer-realize/src/main/java/com/fr/design/report/ReportEnginePane.java +++ b/designer-realize/src/main/java/com/fr/design/report/ReportEnginePane.java @@ -93,12 +93,11 @@ public class ReportEnginePane extends BasicBeanPane { outReportEnginePane.add(createReportEnginePane()); JPanel outAdvicePane = new JPanel(); outAdvicePane.setLayout(FRGUIPaneFactory.createBorderLayout()); - outAdvicePane.setPreferredSize(new Dimension(FineUIScale.scale(600), FineUIScale.scale(160))); outAdvicePane.add(createAdvicePane()); this.add(column(20, cell(wrapComponentWithTitle(outReportEnginePane, Toolkit.i18nText("Fine-Design_Report_Report_Engine_Attribute"))), - cell(wrapComponentWithTitle(outPagingEngineSelectPane, Toolkit.i18nText("Fine-Design_Report_Paging_Engine_Select"))).weight(1.0), + cell(wrapComponentWithTitle(outPagingEngineSelectPane, Toolkit.i18nText("Fine-Design_Report_Paging_Engine_Select"))), cell(wrapComponentWithTitle(outAdvicePane, Toolkit.i18nText("Fine-Design_Report_Advice")))) .getComponent()); } @@ -123,8 +122,6 @@ public class ReportEnginePane extends BasicBeanPane { createEngineXSettingPane(); createLineEngineSettingPane(); outLineEngineSettingPane.setVisible(false); - outEngineXSettingPane.setPreferredSize(new Dimension(scale(625), scale(220))); - outLineEngineSettingPane.setPreferredSize(new Dimension(scale(625), scale(220))); engineSettingPane.add(box(cell(outEngineXSettingPane), cell(outLineEngineSettingPane)).getComponent() , BorderLayout.WEST); @@ -157,18 +154,18 @@ public class ReportEnginePane extends BasicBeanPane { rowCountPanel.add(rowCountBox); JPanel tip = createTipPane(Toolkit.i18nText("Fine-Design_Report_Engine_X_tip")); engineXSettingPane.add(row(20, - column(10, - column(fix(6), cell(title)), - cell(new UILabel()), - cell(new UILabel()), - cell(new UILabel()) + column( + column(fix(6), cell(title)), + cell(new UILabel()), + cell(new UILabel()), + cell(new UILabel()) ), - column(10, - cell(pageQueryBoxPanel), - cell(engineXPageQueryPane), - cell(rowCountPanel), - cell(tip))) + column( + cell(pageQueryBoxPanel), + cell(engineXPageQueryPane), + cell(rowCountPanel), + cell(tip))) .getComponent()); outEngineXSettingPane.add(engineXSettingPane); } @@ -189,14 +186,14 @@ public class ReportEnginePane extends BasicBeanPane { lineEnginePageQueryBox.addActionListener(new SelectActionListener(lineEnginePageQueryBox, lineEnginePageQueryPane)); JPanel tipPane = createTipPane(Toolkit.i18nText("Fine-Design_Report_Line_Engine_tip")); lineEngineSettingPane.add(row(20, - column(10, - column(fix(6), cell(title)), - cell(new UILabel()), - cell(new UILabel())), - column(10, - cell(pageQueryBoxPanel), - cell(lineEnginePageQueryPane), - cell(tipPane))) + column( + column(fix(6), cell(title)), + cell(new UILabel()), + cell(new UILabel())), + column( + cell(pageQueryBoxPanel), + cell(lineEnginePageQueryPane), + cell(tipPane))) .getComponent()); outLineEngineSettingPane.add(lineEngineSettingPane); } diff --git a/designer-realize/src/main/java/com/fr/design/report/WriteShortCutsPane.java b/designer-realize/src/main/java/com/fr/design/report/WriteShortCutsPane.java index 232ebc2e1d..84348b9309 100644 --- a/designer-realize/src/main/java/com/fr/design/report/WriteShortCutsPane.java +++ b/designer-realize/src/main/java/com/fr/design/report/WriteShortCutsPane.java @@ -37,11 +37,11 @@ public class WriteShortCutsPane extends JPanel{ private UILabel nextRowHK; private UILabel preCol; private UILabel preRow; - + public WriteShortCutsPane(){ this.setLayout(new BorderLayout()); this.add(createContentPane(), BorderLayout.NORTH); - + if(!ServerPreferenceConfig.getInstance().isWriteShortCuts()){ nextColString = "Enter"; nextRowString = "Tab"; @@ -60,10 +60,10 @@ public class WriteShortCutsPane extends JPanel{ return contentPane; } - + private JPanel getFeatureNamePane(){ JPanel featureNamePane = new JPanel(new BorderLayout()); - featureNamePane.setBorder(BorderFactory.createEmptyBorder(16, 0, 0, 0)); + featureNamePane.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); UILabel name = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Feature_Name"), SwingConstants.RIGHT); UILabel nextCol = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cursor_To_Next_Column"), SwingConstants.CENTER); UILabel nextRow = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cursor_To_Next_Row"), SwingConstants.CENTER); @@ -75,13 +75,13 @@ public class WriteShortCutsPane extends JPanel{ JPanel centerPane = new JPanel(new BorderLayout()); centerPane.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0)); - centerPane.add(column(24, + centerPane.add(column(10, row(10, cell(name).weight(0.13), cell(nextCol).weight(0.15), cell(new JPanel()).weight(0.12), cell(nextRow).weight(0.15), flex(0.45)), row(10, cell(shortName).weight(0.13), cell(nextColHK).weight(0.15), cell(switchBtnPane).weight(0.12), cell(nextRowHK).weight(0.15), flex(0.45)) ).getComponent()); featureNamePane.add(centerPane, BorderLayout.CENTER); - + return featureNamePane; } @@ -96,7 +96,7 @@ public class WriteShortCutsPane extends JPanel{ private JPanel getHintsPane(){ JPanel hintsPane = new JPanel(new BorderLayout()); - hintsPane.setBorder(BorderFactory.createEmptyBorder(16, 0, 0, 0)); + hintsPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); UILabel systemDefault = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_System_Default"), SwingConstants.RIGHT); UILabel preColText = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cursor_To_Previous_Column"), SwingConstants.CENTER); @@ -107,19 +107,19 @@ public class WriteShortCutsPane extends JPanel{ JPanel centerPane = new JPanel(new BorderLayout()); centerPane.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0)); - centerPane.add(column(24, + centerPane.add(column(10, row(10, cell(systemDefault).weight(0.13), cell(preColText).weight(0.24), cell(preCol).weight(0.14), flex(0.64)), row(10, cell(new JPanel()).weight(0.13), cell(preRowText).weight(0.24), cell(preRow).weight(0.14), flex(0.64)) ).getComponent()); hintsPane.add(centerPane, BorderLayout.CENTER); - + return hintsPane; } - + public ActionListener getListener(){ ActionListener actionListener = new ActionListener() { - + @Override public void actionPerformed(ActionEvent e) { String temp= nextColString; @@ -136,10 +136,10 @@ public class WriteShortCutsPane extends JPanel{ }); } }; - + return actionListener; } - + private void switchColRow(){ nextColHK.setText(nextColString); nextRowHK.setText(nextRowString);