Browse Source

修改代码质量

master
mengao 7 years ago
parent
commit
f580d8f3dc
  1. 2
      designer_base/src/com/fr/design/hyperlink/ReporletHyperNorthPane.java
  2. 2
      designer_base/src/com/fr/design/hyperlink/ReportletHyperlinkPane.java
  3. 6
      designer_base/src/com/fr/design/hyperlink/WebHyperlinkPane.java
  4. 5
      designer_base/src/com/fr/design/javascript/JavaScriptImplPane.java
  5. 2
      designer_base/src/com/fr/design/javascript/ParameterJavaScriptPane.java
  6. 16
      designer_base/src/com/fr/design/module/DesignModule.java
  7. 4
      designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/FormHyperlinkPane.java

2
designer_base/src/com/fr/design/hyperlink/ReporletHyperNorthPane.java

@ -65,7 +65,7 @@ public class ReporletHyperNorthPane extends AbstractHyperNorthPane<ReportletHype
reportPathTextField = new UITextField(20); reportPathTextField = new UITextField(20);
reportletNamePane.add(reportPathTextField, BorderLayout.CENTER); reportletNamePane.add(reportPathTextField, BorderLayout.CENTER);
browserButton = new UIButton(Inter.getLocText("Select")); browserButton = new UIButton(Inter.getLocText("FR-Designer_Select"));
browserButton.setPreferredSize(new Dimension(browserButton.getPreferredSize().width, 20)); browserButton.setPreferredSize(new Dimension(browserButton.getPreferredSize().width, 20));
reportletNamePane.add(browserButton, BorderLayout.EAST); reportletNamePane.add(browserButton, BorderLayout.EAST);
browserButton.addActionListener(new ActionListener() { browserButton.addActionListener(new ActionListener() {

2
designer_base/src/com/fr/design/hyperlink/ReportletHyperlinkPane.java

@ -128,7 +128,7 @@ public class ReportletHyperlinkPane extends AbstractHyperLinkPane<ReportletHyper
} }
} }
public static class CHART_NO_RENAME extends ReportletHyperlinkPane { public static class chartNoRename extends ReportletHyperlinkPane {
protected int getChartParaType() { protected int getChartParaType() {
return ParameterTableModel.CHART_NORMAL_USE; return ParameterTableModel.CHART_NORMAL_USE;
} }

6
designer_base/src/com/fr/design/hyperlink/WebHyperlinkPane.java

@ -16,7 +16,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
public class WebHyperlinkPane extends AbstractHyperLinkPane<WebHyperlink> { public class WebHyperlinkPane extends AbstractHyperLinkPane<WebHyperlink> {
private final int BORDER_WIDTH = 4; private final int borderWidth = 4;
private WebHyperNorthPane northPane; private WebHyperNorthPane northPane;
private UICheckBox useCJKCheckBox; private UICheckBox useCJKCheckBox;
@ -35,7 +35,7 @@ public class WebHyperlinkPane extends AbstractHyperLinkPane<WebHyperlink> {
protected void initComponents() { protected void initComponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(BORDER_WIDTH, BORDER_WIDTH, BORDER_WIDTH, BORDER_WIDTH)); this.setBorder(BorderFactory.createEmptyBorder(borderWidth, borderWidth, borderWidth, borderWidth));
northPane = new WebHyperNorthPane(needRenamePane()); northPane = new WebHyperNorthPane(needRenamePane());
this.add(northPane, BorderLayout.NORTH); this.add(northPane, BorderLayout.NORTH);
@ -92,7 +92,7 @@ public class WebHyperlinkPane extends AbstractHyperLinkPane<WebHyperlink> {
webHyperlink.setExtendParameters(this.extendParametersCheckBox.isSelected()); webHyperlink.setExtendParameters(this.extendParametersCheckBox.isSelected());
} }
public static class CHART_NO_RENAME extends WebHyperlinkPane { public static class chartNoRename extends WebHyperlinkPane {
protected boolean needRenamePane() { protected boolean needRenamePane() {
return false; return false;
} }

5
designer_base/src/com/fr/design/javascript/JavaScriptImplPane.java

@ -25,6 +25,7 @@ import java.util.HashSet;
import java.util.List; import java.util.List;
public class JavaScriptImplPane extends AbstractHyperLinkPane<JavaScriptImpl> { public class JavaScriptImplPane extends AbstractHyperLinkPane<JavaScriptImpl> {
private final int bottomBorder = 12;
private UITextField itemNameTextField; private UITextField itemNameTextField;
private JSContentPane jsPane; private JSContentPane jsPane;
private UITableEditorPane<String> importedJsPane; private UITableEditorPane<String> importedJsPane;
@ -94,7 +95,7 @@ public class JavaScriptImplPane extends AbstractHyperLinkPane<JavaScriptImpl> {
parameterPane, BorderLayout.EAST parameterPane, BorderLayout.EAST
); );
topPane.setPreferredSize(new Dimension(300, 150)); topPane.setPreferredSize(new Dimension(300, 150));
topPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 12, 0)); topPane.setBorder(BorderFactory.createEmptyBorder(0, 0, bottomBorder, 0));
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
this.add(topPane, BorderLayout.NORTH); this.add(topPane, BorderLayout.NORTH);
@ -208,7 +209,7 @@ public class JavaScriptImplPane extends AbstractHyperLinkPane<JavaScriptImpl> {
} }
} }
public static class CHART_NO_RENAME extends JavaScriptImplPane { public static class chartNoRename extends JavaScriptImplPane {
protected int getChartParaType() { protected int getChartParaType() {
return ParameterTableModel.CHART_NORMAL_USE; return ParameterTableModel.CHART_NORMAL_USE;
} }

2
designer_base/src/com/fr/design/javascript/ParameterJavaScriptPane.java

@ -70,7 +70,7 @@ public class ParameterJavaScriptPane extends AbstractHyperLinkPane<ParameterJava
} }
} }
public static class CHART_NO_RENAME extends ParameterJavaScriptPane { public static class chartNoRename extends ParameterJavaScriptPane {
protected int getChartParaType() { protected int getChartParaType() {
return ParameterTableModel.CHART_NORMAL_USE; return ParameterTableModel.CHART_NORMAL_USE;
} }

16
designer_base/src/com/fr/design/module/DesignModule.java

@ -14,7 +14,11 @@ import com.fr.design.mainframe.App;
import com.fr.design.mainframe.DesignerFrame; import com.fr.design.mainframe.DesignerFrame;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.general.ModuleContext; import com.fr.general.ModuleContext;
import com.fr.js.*; import com.fr.js.EmailJavaScript;
import com.fr.js.JavaScriptImpl;
import com.fr.js.ParameterJavaScript;
import com.fr.js.ReportletHyperlink;
import com.fr.js.WebHyperlink;
import com.fr.module.TopModule; import com.fr.module.TopModule;
import com.fr.stable.bridge.StableFactory; import com.fr.stable.bridge.StableFactory;
import com.fr.stable.plugin.ExtraDesignClassManagerProvider; import com.fr.stable.plugin.ExtraDesignClassManagerProvider;
@ -33,6 +37,7 @@ import java.util.Set;
*/ */
public abstract class DesignModule extends TopModule { public abstract class DesignModule extends TopModule {
public static final String LOCALE_FILE_PATH = "com/fr/design/locale/designer"; public static final String LOCALE_FILE_PATH = "com/fr/design/locale/designer";
public void start() { public void start() {
super.start(); super.start();
App<?>[] apps = apps4TemplateOpener(); App<?>[] apps = apps4TemplateOpener();
@ -59,6 +64,7 @@ public abstract class DesignModule extends TopModule {
/** /**
* 国际化文件路径 * 国际化文件路径
*
* @return 国际化文件路径 * @return 国际化文件路径
*/ */
public String[] getLocaleFile() { public String[] getLocaleFile() {
@ -85,11 +91,11 @@ public abstract class DesignModule extends TopModule {
public NameableCreator[] hyperlinkTypes() { public NameableCreator[] hyperlinkTypes() {
return new NameableCreator[]{ return new NameableCreator[]{
new NameObjectCreator(Inter.getLocText("FR-Hyperlink_Reportlet"), ReportletHyperlink.class, ReportletHyperlinkPane.CHART_NO_RENAME.class), new NameObjectCreator(Inter.getLocText("FR-Hyperlink_Reportlet"), ReportletHyperlink.class, ReportletHyperlinkPane.chartNoRename.class),
new NameObjectCreator(Inter.getLocText("FR-Designer_Email"), EmailJavaScript.class, EmailPane.class), new NameObjectCreator(Inter.getLocText("FR-Designer_Email"), EmailJavaScript.class, EmailPane.class),
new NameObjectCreator(Inter.getLocText("Hyperlink-Web_link"), WebHyperlink.class, WebHyperlinkPane.CHART_NO_RENAME.class), new NameObjectCreator(Inter.getLocText("Hyperlink-Web_link"), WebHyperlink.class, WebHyperlinkPane.chartNoRename.class),
new NameObjectCreator(Inter.getLocText("JavaScript-Dynamic_Parameters"), ParameterJavaScript.class, ParameterJavaScriptPane.CHART_NO_RENAME.class), new NameObjectCreator(Inter.getLocText("JavaScript-Dynamic_Parameters"), ParameterJavaScript.class, ParameterJavaScriptPane.chartNoRename.class),
new NameObjectCreator("JavaScript", JavaScriptImpl.class, JavaScriptImplPane.CHART_NO_RENAME.class) new NameObjectCreator("FR-Designer_JavaScript", JavaScriptImpl.class, JavaScriptImplPane.chartNoRename.class)
}; };
} }

4
designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/FormHyperlinkPane.java

@ -17,7 +17,7 @@ import java.awt.*;
import java.util.HashMap; import java.util.HashMap;
public class FormHyperlinkPane extends AbstractHyperLinkPane<FormHyperlinkProvider> { public class FormHyperlinkPane extends AbstractHyperLinkPane<FormHyperlinkProvider> {
private final int BORDER_WIDTH = 4; private final int borderWidth = 4;
private FormHyperlinkNorthPane northPane; private FormHyperlinkNorthPane northPane;
@ -33,7 +33,7 @@ public class FormHyperlinkPane extends AbstractHyperLinkPane<FormHyperlinkProvid
protected void initComponents() { protected void initComponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(BORDER_WIDTH, BORDER_WIDTH, BORDER_WIDTH, BORDER_WIDTH)); this.setBorder(BorderFactory.createEmptyBorder(borderWidth, borderWidth, borderWidth, borderWidth));
northPane = new FormHyperlinkNorthPane(needRenamePane()); northPane = new FormHyperlinkNorthPane(needRenamePane());
this.add(northPane, BorderLayout.NORTH); this.add(northPane, BorderLayout.NORTH);

Loading…
Cancel
Save