diff --git a/designer_base/src/com/fr/design/hyperlink/ReporletHyperNorthPane.java b/designer_base/src/com/fr/design/hyperlink/ReporletHyperNorthPane.java index b02c9dfaeb..d88294bfdb 100644 --- a/designer_base/src/com/fr/design/hyperlink/ReporletHyperNorthPane.java +++ b/designer_base/src/com/fr/design/hyperlink/ReporletHyperNorthPane.java @@ -65,7 +65,7 @@ public class ReporletHyperNorthPane extends AbstractHyperNorthPane { - private final int BORDER_WIDTH = 4; + private final int borderWidth = 4; private WebHyperNorthPane northPane; private UICheckBox useCJKCheckBox; @@ -35,7 +35,7 @@ public class WebHyperlinkPane extends AbstractHyperLinkPane { protected void initComponents() { 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()); this.add(northPane, BorderLayout.NORTH); @@ -92,7 +92,7 @@ public class WebHyperlinkPane extends AbstractHyperLinkPane { webHyperlink.setExtendParameters(this.extendParametersCheckBox.isSelected()); } - public static class CHART_NO_RENAME extends WebHyperlinkPane { + public static class chartNoRename extends WebHyperlinkPane { protected boolean needRenamePane() { return false; } diff --git a/designer_base/src/com/fr/design/javascript/JavaScriptImplPane.java b/designer_base/src/com/fr/design/javascript/JavaScriptImplPane.java index 2e0b1ce4af..3a700c9d7c 100644 --- a/designer_base/src/com/fr/design/javascript/JavaScriptImplPane.java +++ b/designer_base/src/com/fr/design/javascript/JavaScriptImplPane.java @@ -25,6 +25,7 @@ import java.util.HashSet; import java.util.List; public class JavaScriptImplPane extends AbstractHyperLinkPane { + private final int bottomBorder = 12; private UITextField itemNameTextField; private JSContentPane jsPane; private UITableEditorPane importedJsPane; @@ -94,7 +95,7 @@ public class JavaScriptImplPane extends AbstractHyperLinkPane { parameterPane, BorderLayout.EAST ); 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.add(topPane, BorderLayout.NORTH); @@ -208,7 +209,7 @@ public class JavaScriptImplPane extends AbstractHyperLinkPane { } } - public static class CHART_NO_RENAME extends JavaScriptImplPane { + public static class chartNoRename extends JavaScriptImplPane { protected int getChartParaType() { return ParameterTableModel.CHART_NORMAL_USE; } diff --git a/designer_base/src/com/fr/design/javascript/ParameterJavaScriptPane.java b/designer_base/src/com/fr/design/javascript/ParameterJavaScriptPane.java index 0a6774507f..3a7957e00e 100644 --- a/designer_base/src/com/fr/design/javascript/ParameterJavaScriptPane.java +++ b/designer_base/src/com/fr/design/javascript/ParameterJavaScriptPane.java @@ -70,7 +70,7 @@ public class ParameterJavaScriptPane extends AbstractHyperLinkPane[] apps = apps4TemplateOpener(); - for (App app : apps) { - DesignerFrame.registApp(app); - } + public static final String LOCALE_FILE_PATH = "com/fr/design/locale/designer"; + + public void start() { + super.start(); + App[] apps = apps4TemplateOpener(); + for (App app : apps) { + DesignerFrame.registApp(app); + } ModuleContext.registerStartedModule(DesignModule.class.getName(), this); - StableFactory.registerMarkedClass(ExtraDesignClassManagerProvider.XML_TAG, ExtraDesignClassManager.class); - ActionFactory.registerCellInsertActionClass(actionsForInsertCellElement()); - ActionFactory.registerFloatInsertActionClass(actionsForInsertFloatElement()); - DesignModuleFactory.registerCreators4Hyperlink(hyperlinkTypes()); - } + StableFactory.registerMarkedClass(ExtraDesignClassManagerProvider.XML_TAG, ExtraDesignClassManager.class); + ActionFactory.registerCellInsertActionClass(actionsForInsertCellElement()); + ActionFactory.registerFloatInsertActionClass(actionsForInsertFloatElement()); + DesignModuleFactory.registerCreators4Hyperlink(hyperlinkTypes()); + } public boolean isStarted() { return ModuleContext.isModuleStarted(DesignModule.class.getName()); } - /** - * 返回设计器能打开的模板类型的一个数组列表 - * - * @return 可以打开的模板类型的数组 - */ - public abstract App[] apps4TemplateOpener(); + /** + * 返回设计器能打开的模板类型的一个数组列表 + * + * @return 可以打开的模板类型的数组 + */ + public abstract App[] apps4TemplateOpener(); - /** - * 国际化文件路径 - * @return 国际化文件路径 - */ - public String[] getLocaleFile() { - return new String[]{LOCALE_FILE_PATH}; - } + /** + * 国际化文件路径 + * + * @return 国际化文件路径 + */ + public String[] getLocaleFile() { + return new String[]{LOCALE_FILE_PATH}; + } - public Class[] actionsForInsertCellElement() { - List> classes = new ArrayList<>(); - Set providers = ExtraDesignClassManager.getInstance().getArray(ElementUIProvider.MARK_STRING); - for (ElementUIProvider provider : providers) { - classes.add(provider.actionForInsertCellElement()); - } - return classes.toArray(new Class[classes.size()]); - } + public Class[] actionsForInsertCellElement() { + List> classes = new ArrayList<>(); + Set providers = ExtraDesignClassManager.getInstance().getArray(ElementUIProvider.MARK_STRING); + for (ElementUIProvider provider : providers) { + classes.add(provider.actionForInsertCellElement()); + } + return classes.toArray(new Class[classes.size()]); + } - public Class[] actionsForInsertFloatElement() { - List> classes = new ArrayList<>(); - Set providers = ExtraDesignClassManager.getInstance().getArray(ElementUIProvider.MARK_STRING); - for (ElementUIProvider provider : providers) { - classes.add(provider.actionForInsertFloatElement()); - } - return classes.toArray(new Class[classes.size()]); - } + public Class[] actionsForInsertFloatElement() { + List> classes = new ArrayList<>(); + Set providers = ExtraDesignClassManager.getInstance().getArray(ElementUIProvider.MARK_STRING); + for (ElementUIProvider provider : providers) { + classes.add(provider.actionForInsertFloatElement()); + } + return classes.toArray(new Class[classes.size()]); + } - public NameableCreator[] hyperlinkTypes() { - return new NameableCreator[]{ - new NameObjectCreator(Inter.getLocText("FR-Hyperlink_Reportlet"), ReportletHyperlink.class, ReportletHyperlinkPane.CHART_NO_RENAME.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("JavaScript-Dynamic_Parameters"), ParameterJavaScript.class, ParameterJavaScriptPane.CHART_NO_RENAME.class), - new NameObjectCreator("JavaScript", JavaScriptImpl.class, JavaScriptImplPane.CHART_NO_RENAME.class) - }; - } + public NameableCreator[] hyperlinkTypes() { + return new NameableCreator[]{ + 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("Hyperlink-Web_link"), WebHyperlink.class, WebHyperlinkPane.chartNoRename.class), + new NameObjectCreator(Inter.getLocText("JavaScript-Dynamic_Parameters"), ParameterJavaScript.class, ParameterJavaScriptPane.chartNoRename.class), + new NameObjectCreator("FR-Designer_JavaScript", JavaScriptImpl.class, JavaScriptImplPane.chartNoRename.class) + }; + } } \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/FormHyperlinkPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/FormHyperlinkPane.java index b83a7bcc1c..10ea529765 100644 --- a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/FormHyperlinkPane.java +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/FormHyperlinkPane.java @@ -17,7 +17,7 @@ import java.awt.*; import java.util.HashMap; public class FormHyperlinkPane extends AbstractHyperLinkPane { - private final int BORDER_WIDTH = 4; + private final int borderWidth = 4; private FormHyperlinkNorthPane northPane; @@ -33,7 +33,7 @@ public class FormHyperlinkPane extends AbstractHyperLinkPane