Browse Source

修改代码质量

master
mengao 7 years ago
parent
commit
cc03fe5bc6
  1. 10
      designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java
  2. 10
      designer_base/src/com/fr/design/hyperlink/ReporletHyperNorthPane.java
  3. 3
      designer_base/src/com/fr/design/hyperlink/WebHyperlinkPane.java
  4. 2
      designer_base/src/com/fr/design/javascript/ParameterJavaScriptPane.java
  5. 6
      designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateCellLinkPane.java
  6. 4
      designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateFloatLinkPane.java
  7. 8
      designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/FormHyperlinkPane.java
  8. 4
      designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartDesignerInteractivePane.java

10
designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java

@ -252,7 +252,7 @@ public class ValueEditorPaneFactory {
new DateEditor(true, Inter.getLocText("FR-Designer_Date")),
new BooleanEditor(),
formulaEditor,
new WidgetNameEditor(Inter.getLocText("Widget"))
new WidgetNameEditor(Inter.getLocText("FR-Designer_Widget"))
};
}
@ -316,7 +316,7 @@ public class ValueEditorPaneFactory {
*/
public static Editor<?>[] URLEditors(String popupName, String textEditorValue) {
return new Editor[]{
new NoneEditor(textEditorValue, StringUtils.isEmpty(popupName) ? Inter.getLocText("None") : popupName),
new NoneEditor(textEditorValue, StringUtils.isEmpty(popupName) ? Inter.getLocText("FR-Designer_None") : popupName),
new TextEditor()
};
}
@ -330,7 +330,7 @@ public class ValueEditorPaneFactory {
*/
public static Editor<?>[] dateEditors(String popupName, String textEditorValue) {
return new Editor[]{
new NoneEditor(textEditorValue, StringUtils.isEmpty(popupName) ? Inter.getLocText("None") : popupName),
new NoneEditor(textEditorValue, StringUtils.isEmpty(popupName) ? Inter.getLocText("FR-Designer_None") : popupName),
new DateEditor(true, Inter.getLocText("FR-Designer_Date")),
new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula"))
};
@ -493,12 +493,12 @@ public class ValueEditorPaneFactory {
JPanel paneLeft = FRGUIPaneFactory.createBorderLayout_S_Pane();
pane.add(paneLeft);
paneLeft.add(new UILabel(" " + Inter.getLocText("Actual_Value") + ":"), BorderLayout.NORTH);
paneLeft.add(new UILabel(" " + Inter.getLocText("FR-Designer_Actual_Value") + ":"), BorderLayout.NORTH);
paneLeft.add(keyColumnPane, BorderLayout.CENTER);
JPanel paneRight = FRGUIPaneFactory.createBorderLayout_S_Pane();
pane.add(paneRight);
paneRight.add(new UILabel(" " + Inter.getLocText("Display_Value") + ":"), BorderLayout.NORTH);
paneRight.add(new UILabel(" " + Inter.getLocText("FR-Designer_Display_Value") + ":"), BorderLayout.NORTH);
paneRight.add(valueDictPane, BorderLayout.CENTER);

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

@ -86,13 +86,13 @@ public class ReporletHyperNorthPane extends AbstractHyperNorthPane<ReportletHype
Component[][] components;
if (!this.needRenamePane) {
components = new Component[][]{
{new UILabel(" " + Inter.getLocText("Reportlet") + ":"), reportletNamePane},
{new UILabel(" " + Inter.getLocText("FR-Hyperlink_Reportlet") + ":"), reportletNamePane},
};
} else {
itemNameTextField = new UITextField();
components = new Component[][]{
{new UILabel(" " + Inter.getLocText("Name") + ":"), itemNameTextField},
{new UILabel(" " + Inter.getLocText("Reportlet") + ":"), reportletNamePane},
{new UILabel(" " + Inter.getLocText("FR-Designer-Hyperlink_Name") + ":"), itemNameTextField},
{new UILabel(" " + Inter.getLocText("FR-Hyperlink_Reportlet") + ":"), reportletNamePane},
};
}
JPanel northPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
@ -134,7 +134,7 @@ public class ReporletHyperNorthPane extends AbstractHyperNorthPane<ReportletHype
}
public String getReportletName() {
return StringUtils.isBlank(this.reportPathTextField.getText()) ? "" : this.reportPathTextField.getText().substring(1);
return StringUtils.isBlank(this.reportPathTextField.getText()) ? StringUtils.EMPTY : this.reportPathTextField.getText().substring(1);
}
/**
@ -155,7 +155,7 @@ public class ReporletHyperNorthPane extends AbstractHyperNorthPane<ReportletHype
}
public void actionPerformed(ActionEvent e) {
//do nothing
}
}

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

@ -16,6 +16,7 @@ import java.util.HashMap;
import java.util.List;
public class WebHyperlinkPane extends AbstractHyperLinkPane<WebHyperlink> {
private final int BORDER_WIDTH = 4;
private WebHyperNorthPane northPane;
private UICheckBox useCJKCheckBox;
@ -34,7 +35,7 @@ public class WebHyperlinkPane extends AbstractHyperLinkPane<WebHyperlink> {
protected void initComponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));
this.setBorder(BorderFactory.createEmptyBorder(BORDER_WIDTH, BORDER_WIDTH, BORDER_WIDTH, BORDER_WIDTH));
northPane = new WebHyperNorthPane(needRenamePane());
this.add(northPane, BorderLayout.NORTH);

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

@ -29,7 +29,7 @@ public class ParameterJavaScriptPane extends AbstractHyperLinkPane<ParameterJava
this.add(parameterViewPane, BorderLayout.CENTER);
if (needRenamePane()) {
itemNameTextField = new UITextField();
this.add(GUICoreUtils.createNamedPane(itemNameTextField, Inter.getLocText("Name") + ":"), BorderLayout.NORTH);
this.add(GUICoreUtils.createNamedPane(itemNameTextField, Inter.getLocText("FR-Designer-Hyperlink_Name") + ":"), BorderLayout.NORTH);
}
}

6
designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateCellLinkPane.java

@ -42,19 +42,19 @@ public class ChartHyperRelateCellLinkPane extends AbstractHyperLinkPane<ChartHyp
this.setLayout(FRGUIPaneFactory.createM_BorderLayout());
if (needRenamePane()) {
itemNameTextField = new UITextField();
this.add(GUICoreUtils.createNamedPane(itemNameTextField, Inter.getLocText("Name") + ":"), BorderLayout.NORTH);
this.add(GUICoreUtils.createNamedPane(itemNameTextField, Inter.getLocText("FR-Designer_Name") + ":"), BorderLayout.NORTH);
}
JPanel centerPane = FRGUIPaneFactory.createBorderLayout_L_Pane();
this.add(centerPane, BorderLayout.CENTER);
centerPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText(new String[]{"Related", "Cell"})));
centerPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText(new String[]{"Related", "FR-Designer_Cell"})));
colRowPane = new ColumnRowVerticalPane();
centerPane.add(colRowPane, BorderLayout.NORTH);
parameterViewPane = new ReportletParameterViewPane(getChartParaType(), getValueEditorPane(), getValueEditorPane());
parameterViewPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("Parameters")));
parameterViewPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("FR-Designer_Parameter")));
parameterViewPane.setPreferredSize(new Dimension(500, 200));
this.add(parameterViewPane, BorderLayout.SOUTH);
}

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

@ -50,7 +50,7 @@ public class ChartHyperRelateFloatLinkPane extends AbstractHyperLinkPane<ChartHy
if (needRenamePane()) {
itemNameTextField = new UITextField();
this.add(GUICoreUtils.createNamedPane(itemNameTextField, Inter.getLocText("Name") + ":"), BorderLayout.NORTH);
this.add(GUICoreUtils.createNamedPane(itemNameTextField, Inter.getLocText("FR-Designer-Hyperlink_Name") + ":"), BorderLayout.NORTH);
}
this.add(centerPane, BorderLayout.CENTER);
@ -70,7 +70,7 @@ public class ChartHyperRelateFloatLinkPane extends AbstractHyperLinkPane<ChartHy
centerPane.add(pane, BorderLayout.NORTH);
parameterViewPane = new ReportletParameterViewPane(getChartParaType(), getValueEditorPane(), getValueEditorPane());
parameterViewPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("Parameters")));
parameterViewPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("FR-Designer_Parameter")));
parameterViewPane.setPreferredSize(new Dimension(500, 200));
this.add(parameterViewPane, BorderLayout.SOUTH);
}

8
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<FormHyperlinkProvider> {
private final int BORDER_WIDTH = 4;
private FormHyperlinkNorthPane northPane;
@ -33,7 +33,7 @@ public class FormHyperlinkPane extends AbstractHyperLinkPane<FormHyperlinkProvid
protected void initComponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));
this.setBorder(BorderFactory.createEmptyBorder(BORDER_WIDTH, BORDER_WIDTH, BORDER_WIDTH, BORDER_WIDTH));
northPane = new FormHyperlinkNorthPane(needRenamePane());
this.add(northPane, BorderLayout.NORTH);
@ -48,11 +48,9 @@ public class FormHyperlinkPane extends AbstractHyperLinkPane<FormHyperlinkProvid
}
protected int getHyperlinkType() {
if (northPane.getEditingEditor() != null) {
if (northPane.getEditingEditor().acceptType(ElementCaseEditorProvider.class)) {
if (northPane.getEditingEditor() != null && northPane.getEditingEditor().acceptType(ElementCaseEditorProvider.class)) {
return FormHyperlinkProvider.ELEMENTCASE;
}
}
return FormHyperlinkProvider.CHART;
}

4
designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartDesignerInteractivePane.java

@ -35,8 +35,8 @@ public class ChartDesignerInteractivePane extends ChartInteractivePane {
list.add(new ChartUIMenuNameableCreator(hyperLinkEditorMap, Inter.getLocText("Hyperlink-Web_link"),
new WebHyperlink(), getUseMap(map, WebHyperlink.class)));
list.add(new ChartUIMenuNameableCreator(hyperLinkEditorMap,"JavaScript", new JavaScriptImpl(), getUseMap(map, JavaScriptImpl.class)));
list.add(new ChartUIMenuNameableCreator(hyperLinkEditorMap, Inter.getLocText("RelatedChart"),null,null));
list.add(new ChartUIMenuNameableCreator(hyperLinkEditorMap, "FR-Designer_JavaScript", new JavaScriptImpl(), getUseMap(map, JavaScriptImpl.class)));
list.add(new ChartUIMenuNameableCreator(hyperLinkEditorMap, Inter.getLocText("FR-Engine_Interactive-chart"), null, null));
return list;
}

Loading…
Cancel
Save