From 06daf19ed6e9faaf3772b7ec378087839dda0010 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Wed, 11 Oct 2017 11:54:22 +0800 Subject: [PATCH 1/9] =?UTF-8?q?8.0=E4=B8=AD=E5=9B=BE=E8=A1=A8=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=B9=B3=E5=8F=B0=E5=86=85=E6=89=93=E5=BC=80=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=E7=9B=B8=E5=85=B3=E4=BB=A3=E7=A0=81=E6=89=8B=E5=8A=A8?= =?UTF-8?q?=E5=90=88=E5=B9=B6=E8=BF=87=E6=9D=A5=20=E6=95=B4=E7=90=86?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=B0=E8=80=81=E5=9B=BE=E8=A1=A8=E8=B6=85?= =?UTF-8?q?=E9=93=BE=E5=8F=82=E6=95=B0=E4=B8=8B=E6=8B=89=E6=A1=86=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E7=9B=B8=E5=85=B3=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/editor/ValueEditorPaneFactory.java | 218 +--- .../controlpane/AbstractNameableCreator.java | 6 + .../gui/controlpane/NameableCreator.java | 6 +- .../gui/frpane/UICorrelationComboBoxPane.java | 8 +- .../fr/design/gui/imenutable/UIMenuTable.java | 38 +- .../itableeditorpane/ParameterTableModel.java | 1 + .../hyperlink/ReportletHyperlinkPane.java | 79 +- .../fr/design/hyperlink/WebHyperlinkPane.java | 77 +- .../design/javascript/JavaScriptImplPane.java | 95 +- .../javascript/ParameterJavaScriptPane.java | 84 +- .../impl/ChartHyperPoplinkPane.java | 81 +- .../impl/ChartHyperRelateCellLinkPane.java | 80 +- .../impl/ChartHyperRelateFloatLinkPane.java | 77 +- .../impl/FormHyperlinkPane.java | 75 +- .../other/ChartDesignerInteractivePane.java | 15 +- .../chart/gui/other/ChartInteractivePane.java | 235 +--- .../component/VanChartHyperLinkPane.java | 59 +- ...r.java => ChartUIMenuNameableCreator.java} | 15 +- .../designer/other/HyperlinkMapFactory.java | 1096 ----------------- .../other/VanChartCatalogHyperLinkPane.java | 6 - .../other/VanChartMapHyperLinkPane.java | 9 +- 21 files changed, 331 insertions(+), 2029 deletions(-) rename designer_chart/src/com/fr/plugin/chart/designer/component/{ConditionUIMenuNameableCreator.java => ChartUIMenuNameableCreator.java} (60%) delete mode 100644 designer_chart/src/com/fr/plugin/chart/designer/other/HyperlinkMapFactory.java diff --git a/designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java b/designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java index 29ee9e60a..885109215 100644 --- a/designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java +++ b/designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java @@ -1,17 +1,35 @@ package com.fr.design.editor; import com.fr.base.Formula; +import com.fr.chart.chartattr.Plot; +import com.fr.design.editor.editor.BooleanEditor; +import com.fr.design.editor.editor.ColumnRowEditor; +import com.fr.design.editor.editor.ColumnRowGroupEditor; +import com.fr.design.editor.editor.ColumnSelectedEditor; +import com.fr.design.editor.editor.ConstantsEditor; +import com.fr.design.editor.editor.CursorEditor; +import com.fr.design.editor.editor.DateEditor; +import com.fr.design.editor.editor.DoubleEditor; +import com.fr.design.editor.editor.Editor; +import com.fr.design.editor.editor.FormulaEditor; +import com.fr.design.editor.editor.IntegerEditor; +import com.fr.design.editor.editor.NoneEditor; +import com.fr.design.editor.editor.ParameterEditor; +import com.fr.design.editor.editor.TextEditor; +import com.fr.design.editor.editor.WidgetNameEditor; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itableeditorpane.ParameterTableModel; import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.design.editor.editor.*; import com.fr.general.Inter; import com.fr.stable.StringUtils; import javax.swing.*; import java.awt.*; import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; import java.util.List; +import java.util.Map; public class ValueEditorPaneFactory { @@ -174,23 +192,27 @@ public class ValueEditorPaneFactory { * @return 值编辑器 */ public static ValueEditorPane createVallueEditorPaneWithUseType(int paraUseType) { + return createVallueEditorPaneWithUseType(paraUseType, null); + } + + public static ValueEditorPane createVallueEditorPaneWithUseType(int paraUseType, Plot plot) { if (paraUseType == ParameterTableModel.NO_CHART_USE) { return createBasicValueEditorPane(); } else if (paraUseType == ParameterTableModel.FORM_NORMAL_USE) { return createFormEditorPane(); } else { - return createChartHotValueEditorPane(paraUseType); + return createChartHotValueEditorPane(plot); } } /** * 图表用的参数编辑器的ValueEditorPane * - * @param paraUseType 参数类型 + * @param plot plot类型 * @return 值编辑器 */ - public static ValueEditorPane createChartHotValueEditorPane(int paraUseType) { - return createValueEditorPane(chartHotEditors(paraUseType), StringUtils.EMPTY, StringUtils.EMPTY); + public static ValueEditorPane createChartHotValueEditorPane(Plot plot) { + return createValueEditorPane(chartHotEditors(plot), StringUtils.EMPTY, StringUtils.EMPTY); } /** @@ -410,11 +432,10 @@ public class ValueEditorPaneFactory { /** * 图表热点的一些编辑器 * - * @param paraUseType 参数类型 * @return 值编辑器 */ - public static Editor[] chartHotEditors(int paraUseType) { - List list = createEditors4Chart(paraUseType); + public static Editor[] chartHotEditors(Plot plot) { + List list = createEditors4Chart(plot); list.add(new TextEditor()); list.add(new IntegerEditor()); @@ -432,179 +453,22 @@ public class ValueEditorPaneFactory { /** * 为图表创建编辑器. * - * @param paraUseType 参数类型 * @return 值编辑器 */ - private static List createEditors4Chart(int paraUseType) { - if(paraUseType == ParameterTableModel.CHART_PIE_USE) { - return getPieEditor(); - } else if(paraUseType == ParameterTableModel.CHART_MAP_USE) { - return getMapEditor(); - } else if(paraUseType == ParameterTableModel.CHART_GIS_USE) { - return getGisEditor(); - } else if(paraUseType == ParameterTableModel.CHART__XY_USE) { - return getXYEditor(); - } else if(paraUseType == ParameterTableModel.CHART_BUBBLE_USE) { - return getBubbbleEdtor(); - } else if(paraUseType == ParameterTableModel.CHART_NO_USE) { - return getChartNoUseEditor(); - } else if(paraUseType == ParameterTableModel.CHART_METER_USE) { - return getMeterEditor(); - } else if(paraUseType == ParameterTableModel.CHART_STOCK_USE) { - return getStockEditor(); - } else if(paraUseType == ParameterTableModel.CHART_GANTT_USE) { - return getGanttEditor(); - } else if(paraUseType == ParameterTableModel.FORM_ELEMENTCASE_USE) { - return getFormElementCaseEditor(); - } else if(paraUseType == ParameterTableModel.FORM_CHART_USE) { - return getFormChartEditor(); + private static List createEditors4Chart(Plot plot) { + List lists = new ArrayList(); + if (plot == null) { + return lists; } - else { - return getChartEditor(); + HashMap map = plot.getHyperLinkEditorMap(); + + Iterator> entries = map.entrySet().iterator(); + while (entries.hasNext()) { + Map.Entry entry = entries.next(); + ConstantsEditor editor = new ConstantsEditor(entry.getKey(), entry.getValue()); + editor.setEnabled(false); + lists.add(editor); } - } - - private static List getMeterEditor() { - ConstantsEditor cate = new ConstantsEditor(Inter.getLocText("CategoryName"), new Formula("CATEGORY")); - cate.setEnabled(false); - ConstantsEditor value = new ConstantsEditor(Inter.getLocText("Chart-Series_Value"), new Formula("VALUE")); - value.setEnabled(false); - - List lists = new ArrayList(); - lists.add(cate); - lists.add(value); - - return lists; - } - - private static List getPieEditor() { - ConstantsEditor series = new ConstantsEditor(Inter.getLocText("ChartF-Series_Name"), new Formula("SERIES")); - series.setEnabled(false); - ConstantsEditor value = new ConstantsEditor(Inter.getLocText("Chart-Series_Value"), new Formula("VALUE")); - value.setEnabled(false); - - List lists = new ArrayList(); - lists.add(series); - lists.add(value); - return lists; - } - - private static List getGisEditor() { - ConstantsEditor areaValue = new ConstantsEditor(Inter.getLocText("Area_Value"), new Formula("AREA_VALUE")); - areaValue.setEnabled(false); - ConstantsEditor chartAddress = new ConstantsEditor(Inter.getLocText("Chart-Address"), new Formula("ADDRESS")); - chartAddress.setEnabled(false); - ConstantsEditor addressName = new ConstantsEditor(Inter.getLocText("Chart-Address-Name"), new Formula("ADDRESS_NAME")); - addressName.setEnabled(false); - - List lists = new ArrayList(); - lists.add(chartAddress); - lists.add(addressName); - lists.add(areaValue); - - return lists; - } - - private static List getGanttEditor() { - ConstantsEditor projectid = new ConstantsEditor(Inter.getLocText("Chart_ProjectID"), new Formula("PROJECTID")); - projectid.setEnabled(false); - ConstantsEditor step = new ConstantsEditor(Inter.getLocText("Chart_Step_Name"), new Formula("STEP")); - step.setEnabled(false); - - List lists = new ArrayList(); - lists.add(projectid); - lists.add(step); - - return lists; - } - - private static List getXYEditor() { - ConstantsEditor series = new ConstantsEditor(Inter.getLocText("ChartF-Series_Name"), new Formula("SERIES")); - series.setEnabled(false); - ConstantsEditor value = new ConstantsEditor(Inter.getLocText("Chart-Series_Value"), new Formula("VALUE")); - value.setEnabled(false); - - List lists = new ArrayList(); - lists.add(series); - lists.add(value); - - return lists; - } - - private static List getStockEditor() { - List lists = new ArrayList(); - - return lists; - } - - private static List getBubbbleEdtor() { - ConstantsEditor series = new ConstantsEditor(Inter.getLocText("ChartF-Series_Name"), new Formula("SERIES")); - series.setEnabled(false); - ConstantsEditor value = new ConstantsEditor(Inter.getLocText("Chart-Series_Value"), new Formula("VALUE")); - value.setEnabled(false); - - List lists = new ArrayList(); - lists.add(series); - lists.add(value); - - return lists; - } - - private static List getChartNoUseEditor() { - List lists = new ArrayList(); - - return lists; - } - - private static List getMapEditor() { - ConstantsEditor areaValue = new ConstantsEditor(Inter.getLocText("Area_Value"), new Formula("AREA_VALUE")); - areaValue.setEnabled(false); - ConstantsEditor areaName = new ConstantsEditor(Inter.getLocText("Area_Name"), new Formula("AREA_NAME")); - areaName.setEnabled(false); - - List lists = new ArrayList(); - lists.add(areaName); - lists.add(areaValue); - - return lists; - } - - private static List getChartEditor() { - ConstantsEditor cate = new ConstantsEditor(Inter.getLocText("CategoryName"), new Formula("CATEGORY")); - cate.setEnabled(false); - ConstantsEditor series = new ConstantsEditor(Inter.getLocText("ChartF-Series_Name"), new Formula("SERIES")); - series.setEnabled(false); - ConstantsEditor value = new ConstantsEditor(Inter.getLocText("Chart-Series_Value"), new Formula("VALUE")); - value.setEnabled(false); - - List lists = new ArrayList(); - lists.add(cate); - lists.add(series); - lists.add(value); - - return lists; - } - - private static List getFormElementCaseEditor() { - - List lists = new ArrayList(); - - return lists; - } - - private static List getFormChartEditor() { - ConstantsEditor cate = new ConstantsEditor(Inter.getLocText("CategoryName"), new Formula("CATEGORY")); - cate.setEnabled(false); - ConstantsEditor series = new ConstantsEditor(Inter.getLocText("ChartF-Series_Name"), new Formula("SERIES")); - series.setEnabled(false); - ConstantsEditor value = new ConstantsEditor(Inter.getLocText("Chart-Series_Value"), new Formula("VALUE")); - value.setEnabled(false); - - List lists = new ArrayList(); - lists.add(cate); - lists.add(series); - lists.add(value); - return lists; } diff --git a/designer_base/src/com/fr/design/gui/controlpane/AbstractNameableCreator.java b/designer_base/src/com/fr/design/gui/controlpane/AbstractNameableCreator.java index 36a760b5b..c38758997 100644 --- a/designer_base/src/com/fr/design/gui/controlpane/AbstractNameableCreator.java +++ b/designer_base/src/com/fr/design/gui/controlpane/AbstractNameableCreator.java @@ -4,6 +4,7 @@ import com.fr.base.BaseUtils; import com.fr.design.beans.BasicBeanPane; import com.fr.general.ComparatorUtils; import com.fr.general.NameObject; +import com.fr.js.JavaScript; import javax.swing.*; @@ -62,6 +63,11 @@ public abstract class AbstractNameableCreator implements NameableCreator { return this.menuIcon; } + @Override + public Class getHyperlink() { + return this.clazzOfObject; + } + /** * get clazzOfEditor * @return diff --git a/designer_base/src/com/fr/design/gui/controlpane/NameableCreator.java b/designer_base/src/com/fr/design/gui/controlpane/NameableCreator.java index f497be1e6..1a5e7d35d 100644 --- a/designer_base/src/com/fr/design/gui/controlpane/NameableCreator.java +++ b/designer_base/src/com/fr/design/gui/controlpane/NameableCreator.java @@ -2,6 +2,7 @@ package com.fr.design.gui.controlpane; import com.fr.design.beans.BasicBeanPane; import com.fr.design.gui.ilist.ListModelElement; +import com.fr.js.JavaScript; import com.fr.stable.Nameable; import javax.swing.*; @@ -21,5 +22,8 @@ public interface NameableCreator { public void saveUpdatedBean(ListModelElement wrapper, Object bean); - public boolean isNeedParameterWhenPopulateJControlPane(); + public Class getHyperlink(); + + + public boolean isNeedParameterWhenPopulateJControlPane(); } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/gui/frpane/UICorrelationComboBoxPane.java b/designer_base/src/com/fr/design/gui/frpane/UICorrelationComboBoxPane.java index 3ed7994b9..1cc79f373 100644 --- a/designer_base/src/com/fr/design/gui/frpane/UICorrelationComboBoxPane.java +++ b/designer_base/src/com/fr/design/gui/frpane/UICorrelationComboBoxPane.java @@ -40,7 +40,7 @@ public class UICorrelationComboBoxPane extends JPanel implements UIObserver { private JPopupMenu popMenu; private UIMenuTable tablePane; private UIButton addButton; - private List values; + private List values; private UIObserverListener uiObserverListener; public UICorrelationComboBoxPane() { @@ -78,7 +78,7 @@ public class UICorrelationComboBoxPane extends JPanel implements UIObserver { * 刷新下拉列表和按钮 * @param values 下拉列表里的值 */ - public void refreshMenuAndAddMenuAction(List values) { + public void refreshMenuAndAddMenuAction(List values) { if (values == null || values.isEmpty()) { return; } @@ -378,13 +378,13 @@ public class UICorrelationComboBoxPane extends JPanel implements UIObserver { content.setLayout(new BorderLayout()); List data = new ArrayList(); UIMenuNameableCreator reportlet = new UIMenuNameableCreator(Inter.getLocText("FR-Hyperlink_Reportlet"), - new ReportletHyperlink(), true ? ReportletHyperlinkPane.CHART.class : ReportletHyperlinkPane.class); + new ReportletHyperlink(), ReportletHyperlinkPane.class); UIMenuNameableCreator email = new UIMenuNameableCreator(Inter.getLocText("FR-Designer_Email"), new EmailJavaScript(), EmailPane.class); UIMenuNameableCreator web = new UIMenuNameableCreator(Inter.getLocText("Hyperlink-Web_link"), - new WebHyperlink(), true ? WebHyperlinkPane.CHART.class : WebHyperlinkPane.class); + new WebHyperlink(), WebHyperlinkPane.class); data.add(reportlet); data.add(email); data.add(web); diff --git a/designer_base/src/com/fr/design/gui/imenutable/UIMenuTable.java b/designer_base/src/com/fr/design/gui/imenutable/UIMenuTable.java index caf95a40d..3500623a0 100644 --- a/designer_base/src/com/fr/design/gui/imenutable/UIMenuTable.java +++ b/designer_base/src/com/fr/design/gui/imenutable/UIMenuTable.java @@ -1,36 +1,28 @@ package com.fr.design.gui.imenutable; -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.Component; -import java.util.ArrayList; -import java.util.List; - -import javax.swing.JComponent; -import javax.swing.JFrame; - +import com.fr.design.beans.BasicBeanPane; import com.fr.design.constants.UIConstants; +import com.fr.design.dialog.DialogActionAdapter; +import com.fr.design.dialog.UIDialog; import com.fr.design.gui.ilable.UILabel; -import javax.swing.JPanel; -import javax.swing.JTable; -import javax.swing.SwingUtilities; -import javax.swing.event.ChangeEvent; -import javax.swing.event.ChangeListener; -import javax.swing.plaf.TableUI; -import javax.swing.table.TableCellRenderer; - -import com.fr.design.beans.BasicBeanPane; import com.fr.design.gui.itable.UITable; import com.fr.design.hyperlink.ReportletHyperlinkPane; import com.fr.design.hyperlink.WebHyperlinkPane; import com.fr.design.javascript.EmailPane; -import com.fr.design.dialog.DialogActionAdapter; -import com.fr.design.dialog.UIDialog; +import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.Inter; import com.fr.js.EmailJavaScript; import com.fr.js.ReportletHyperlink; import com.fr.js.WebHyperlink; -import com.fr.design.utils.gui.GUICoreUtils; + +import javax.swing.*; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import javax.swing.plaf.TableUI; +import javax.swing.table.TableCellRenderer; +import java.awt.*; +import java.util.ArrayList; +import java.util.List; public class UIMenuTable extends JTable { protected int selectedRowIndex = -1; @@ -220,13 +212,13 @@ public class UIMenuTable extends JTable { content.setLayout(new BorderLayout()); List data = new ArrayList(); UIMenuNameableCreator reportlet = new UIMenuNameableCreator(Inter.getLocText("Reportlet"), - new ReportletHyperlink(), true ? ReportletHyperlinkPane.CHART.class : ReportletHyperlinkPane.class); + new ReportletHyperlink(), ReportletHyperlinkPane.class); UIMenuNameableCreator email = new UIMenuNameableCreator(Inter.getLocText("Email"), new EmailJavaScript(), EmailPane.class); UIMenuNameableCreator web = new UIMenuNameableCreator(Inter.getLocText("Hyperlink-Web_link"), - new WebHyperlink(), true ? WebHyperlinkPane.CHART.class : WebHyperlinkPane.class ); + new WebHyperlink(), WebHyperlinkPane.class ); data.add(reportlet); data.add(email); data.add(web); diff --git a/designer_base/src/com/fr/design/gui/itableeditorpane/ParameterTableModel.java b/designer_base/src/com/fr/design/gui/itableeditorpane/ParameterTableModel.java index 9b46977da..488c5ee66 100644 --- a/designer_base/src/com/fr/design/gui/itableeditorpane/ParameterTableModel.java +++ b/designer_base/src/com/fr/design/gui/itableeditorpane/ParameterTableModel.java @@ -38,6 +38,7 @@ public class ParameterTableModel extends UITableModelAdapter public static final int FORM_NORMAL_USE = -1; public static final int FORM_ELEMENTCASE_USE = 11; public static final int FORM_CHART_USE = 12; + public static final int VAN_CHART_USE = 20; private static final long serialVersionUID = 1L; protected Component component = null; //指定确认对话框的父窗口,bug40340 diff --git a/designer_base/src/com/fr/design/hyperlink/ReportletHyperlinkPane.java b/designer_base/src/com/fr/design/hyperlink/ReportletHyperlinkPane.java index 2664a746c..b893dad71 100644 --- a/designer_base/src/com/fr/design/hyperlink/ReportletHyperlinkPane.java +++ b/designer_base/src/com/fr/design/hyperlink/ReportletHyperlinkPane.java @@ -2,6 +2,7 @@ package com.fr.design.hyperlink; import com.fr.base.BaseUtils; import com.fr.base.Parameter; +import com.fr.chart.chartattr.Plot; import com.fr.design.beans.BasicBeanPane; import com.fr.design.editor.ValueEditorPane; import com.fr.design.editor.ValueEditorPaneFactory; @@ -24,10 +25,21 @@ import java.awt.event.ActionEvent; import java.util.List; public class ReportletHyperlinkPane extends BasicBeanPane { + private Plot plot; private ReporletHyperNorthPane northPane; private ReportletParameterViewPane parameterViewPane = null; private UICheckBox extendParametersCheckBox; + protected Plot getPlot() { + return plot; + } + + public ReportletHyperlinkPane(Plot plot) { + super(); + this.plot = plot; + this.initComponents(); + } + public ReportletHyperlinkPane() { super(); this.initComponents(); @@ -55,15 +67,15 @@ public class ReportletHyperlinkPane extends BasicBeanPane { } protected int getChartParaType() { - return ParameterTableModel.NO_CHART_USE; + return plot != null ? plot.getHyperLinkParaType() : ParameterTableModel.NO_CHART_USE; } protected ValueEditorPane getValueEditorPane() { - return ValueEditorPaneFactory.createVallueEditorPaneWithUseType(getChartParaType()); + return ValueEditorPaneFactory.createVallueEditorPaneWithUseType(getChartParaType(), plot); } - protected boolean needRenamePane() { - return getChartParaType() != ParameterTableModel.NO_CHART_USE; + protected boolean needRenamePane(){ + return getChartParaType() != ParameterTableModel.NO_CHART_USE && getChartParaType() != ParameterTableModel.VAN_CHART_USE ; } @Override @@ -148,65 +160,6 @@ public class ReportletHyperlinkPane extends BasicBeanPane { } } - public static class CHART extends ReportletHyperlinkPane { - - @Override - protected int getChartParaType() { - return ParameterTableModel.CHART_NORMAL_USE; - } - } - - public static class CHART_MAP extends ReportletHyperlinkPane { - @Override - protected int getChartParaType() { - return ParameterTableModel.CHART_MAP_USE; - } - } - - public static class CHART_GIS extends ReportletHyperlinkPane { - protected int getChartParaType() { - return ParameterTableModel.CHART_GIS_USE; - } - } - - public static class CHART_PIE extends ReportletHyperlinkPane { - protected int getChartParaType() { - return ParameterTableModel.CHART_PIE_USE; - } - } - - ; - - public static class CHART_XY extends ReportletHyperlinkPane { - protected int getChartParaType() { - return ParameterTableModel.CHART__XY_USE; - } - } - - public static class CHART_BUBBLE extends ReportletHyperlinkPane { - protected int getChartParaType() { - return ParameterTableModel.CHART_BUBBLE_USE; - } - } - - public static class CHART_STOCK extends ReportletHyperlinkPane { - protected int getChartParaType() { - return ParameterTableModel.CHART_STOCK_USE; - } - } - - public static class CHART_GANTT extends ReportletHyperlinkPane { - protected int getChartParaType() { - return ParameterTableModel.CHART_GANTT_USE; - } - } - - public static class CHART_METER extends ReportletHyperlinkPane { - protected int getChartParaType() { - return ParameterTableModel.CHART_METER_USE; - } - } - public ReporletHyperNorthPane getNorthPane() { return northPane; } diff --git a/designer_base/src/com/fr/design/hyperlink/WebHyperlinkPane.java b/designer_base/src/com/fr/design/hyperlink/WebHyperlinkPane.java index fda40217b..055ec23a1 100644 --- a/designer_base/src/com/fr/design/hyperlink/WebHyperlinkPane.java +++ b/designer_base/src/com/fr/design/hyperlink/WebHyperlinkPane.java @@ -1,6 +1,7 @@ package com.fr.design.hyperlink; import com.fr.base.Parameter; +import com.fr.chart.chartattr.Plot; import com.fr.design.beans.BasicBeanPane; import com.fr.design.editor.ValueEditorPane; import com.fr.design.editor.ValueEditorPaneFactory; @@ -18,6 +19,7 @@ import java.awt.*; import java.util.List; public class WebHyperlinkPane extends BasicBeanPane { + private Plot plot; private WebHyperNorthPane northPane; private ReportletParameterViewPane parameterViewPane; @@ -25,11 +27,21 @@ public class WebHyperlinkPane extends BasicBeanPane { private UICheckBox useCJKCheckBox; private UICheckBox extendParametersCheckBox; - + + protected Plot getPlot() { + return plot; + } + public WebHyperlinkPane() { super(); this.initComponents(); } + + public WebHyperlinkPane(Plot plot) { + super(); + this.plot = plot; + this.initComponents(); + } protected void initComponents() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); @@ -53,15 +65,15 @@ public class WebHyperlinkPane extends BasicBeanPane { } protected int getChartParaType() { - return ParameterTableModel.NO_CHART_USE; + return plot != null ? plot.getHyperLinkParaType() : ParameterTableModel.NO_CHART_USE; } protected ValueEditorPane getValueEditorPane() { - return ValueEditorPaneFactory.createVallueEditorPaneWithUseType(getChartParaType()); + return ValueEditorPaneFactory.createVallueEditorPaneWithUseType(getChartParaType(), plot); } protected boolean needRenamePane(){ - return getChartParaType() != ParameterTableModel.NO_CHART_USE; + return getChartParaType() != ParameterTableModel.NO_CHART_USE && getChartParaType() != ParameterTableModel.VAN_CHART_USE ; } @Override @@ -111,63 +123,6 @@ public class WebHyperlinkPane extends BasicBeanPane { } } - public static class CHART extends WebHyperlinkPane { - @Override - protected int getChartParaType() { - return ParameterTableModel.CHART_NORMAL_USE; - } - } - - public static class CHART_MAP extends WebHyperlinkPane { - @Override - protected int getChartParaType() { - return ParameterTableModel.CHART_MAP_USE; - } - } - - public static class CHART_GIS extends WebHyperlinkPane{ - protected int getChartParaType() { - return ParameterTableModel.CHART_GIS_USE; - } - } - - public static class CHART_PIE extends WebHyperlinkPane { - @Override - protected int getChartParaType() { - return ParameterTableModel.CHART_PIE_USE; - } - }; - - public static class CHART_XY extends WebHyperlinkPane { - protected int getChartParaType() { - return ParameterTableModel.CHART__XY_USE; - } - } - - public static class CHART_BUBBLE extends WebHyperlinkPane { - protected int getChartParaType() { - return ParameterTableModel.CHART_BUBBLE_USE; - } - } - - public static class CHART_STOCK extends WebHyperlinkPane { - protected int getChartParaType() { - return ParameterTableModel.CHART_STOCK_USE; - } - } - - public static class CHART_GANTT extends WebHyperlinkPane { - protected int getChartParaType() { - return ParameterTableModel.CHART_GANTT_USE; - } - } - - public static class CHART_METER extends WebHyperlinkPane { - protected int getChartParaType() { - return ParameterTableModel.CHART_METER_USE; - } - } - public WebHyperNorthPane getNorthPane() { return northPane; } diff --git a/designer_base/src/com/fr/design/javascript/JavaScriptImplPane.java b/designer_base/src/com/fr/design/javascript/JavaScriptImplPane.java index f362170be..dcdb4e6b5 100644 --- a/designer_base/src/com/fr/design/javascript/JavaScriptImplPane.java +++ b/designer_base/src/com/fr/design/javascript/JavaScriptImplPane.java @@ -1,6 +1,7 @@ package com.fr.design.javascript; import com.fr.base.Parameter; +import com.fr.chart.chartattr.Plot; import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.data.tabledata.tabledatapane.OneListTableModel; import com.fr.design.editor.ValueEditorPane; @@ -26,18 +27,34 @@ import java.util.HashSet; import java.util.List; public class JavaScriptImplPane extends FurtherBasicBeanPane { + private Plot plot; private UITextField itemNameTextField; private JSContentPane jsPane; private UITableEditorPane importedJsPane; private ReportletParameterViewPane parameterPane; private String[] defaultArgs; + protected Plot getPlot() { + return plot; + } + public JavaScriptImplPane() { this(new String[0]); } + public JavaScriptImplPane(Plot plot) { + this.plot = plot; + this.defaultArgs = new String[0]; + initComponents(); + } + + public JavaScriptImplPane(String[] args) { this.defaultArgs = args; + initComponents(); + } + + protected void initComponents() { parameterPane = new ReportletParameterViewPane(getChartParaType(), getValueEditorPane(), getValueEditorPane()); parameterPane.setBorder(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), Inter.getLocText("FR-Designer_Parameter"))); parameterPane.addTableEditorListener(new TableModelListener() { @@ -61,7 +78,7 @@ public class JavaScriptImplPane extends FurtherBasicBeanPane { }); OneListTableModel model = new OneListTableModel(Inter.getLocText("ReportServerP-Import_JavaScript"), this) { - + public UITableEditAction[] createAction() { return new UITableEditAction[] { getAddAction(),new DeleteAction(this.component), new MoveUpAction(), new MoveDownAction() }; } @@ -74,7 +91,7 @@ public class JavaScriptImplPane extends FurtherBasicBeanPane { importedJsPane = new UITableEditorPane(model); importedJsPane.setBorder(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), Inter.getLocText("ReportServerP-Import_JavaScript"))); importedJsPane.setPreferredSize(new Dimension(265, 150)); - jsPane = new JSContentPane(args); + jsPane = new JSContentPane(defaultArgs); jsPane.setBorder(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), Inter.getLocText("FR-Designer_JavaScript"))); parameterPane.setPreferredSize(new Dimension(265, 150)); @@ -85,24 +102,24 @@ public class JavaScriptImplPane extends FurtherBasicBeanPane { topPane.setPreferredSize(new Dimension(300, 150)); topPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 12, 0)); - this.setLayout(new BorderLayout()); - this.add(topPane,BorderLayout.NORTH) ; - this.add(jsPane,BorderLayout.CENTER); + this.setLayout(new BorderLayout()); + this.add(topPane,BorderLayout.NORTH) ; + this.add(jsPane,BorderLayout.CENTER); - this.reLayoutForChart(); + this.reLayoutForChart(); } protected int getChartParaType() { - return ParameterTableModel.NO_CHART_USE; + return plot != null ? plot.getHyperLinkParaType() : ParameterTableModel.NO_CHART_USE; } protected ValueEditorPane getValueEditorPane() { - return ValueEditorPaneFactory.createVallueEditorPaneWithUseType(getChartParaType()); + return ValueEditorPaneFactory.createVallueEditorPaneWithUseType(getChartParaType(), plot); } - protected boolean needRenamePane(){ - return getChartParaType() != ParameterTableModel.NO_CHART_USE; - } + protected boolean needRenamePane(){ + return getChartParaType() != ParameterTableModel.NO_CHART_USE && getChartParaType() != ParameterTableModel.VAN_CHART_USE ; + } /** *参数改变 @@ -216,62 +233,6 @@ public class JavaScriptImplPane extends FurtherBasicBeanPane { } } - public static class CHART extends JavaScriptImplPane { - protected int getChartParaType() { - return ParameterTableModel.CHART_NORMAL_USE; - } - } - - public static class CHART_MAP extends JavaScriptImplPane { - protected int getChartParaType() { - return ParameterTableModel.CHART_MAP_USE; - } - } - - public static class CHART_GIS extends JavaScriptImplPane{ - protected int getChartParaType() { - return ParameterTableModel.CHART_GIS_USE; - } - } - - - public static class CHART_PIE extends JavaScriptImplPane { - @Override - protected int getChartParaType() { - return ParameterTableModel.CHART_PIE_USE; - } - }; - - public static class CHART_XY extends JavaScriptImplPane { - protected int getChartParaType() { - return ParameterTableModel.CHART__XY_USE; - } - } - - public static class CHART_BUBBLE extends JavaScriptImplPane { - protected int getChartParaType() { - return ParameterTableModel.CHART_BUBBLE_USE; - } - } - - public static class CHART_STOCK extends JavaScriptImplPane { - protected int getChartParaType() { - return ParameterTableModel.CHART_STOCK_USE; - } - } - - public static class CHART_GANTT extends JavaScriptImplPane { - protected int getChartParaType() { - return ParameterTableModel.CHART_GANTT_USE; - } - } - - public static class CHART_METER extends JavaScriptImplPane { - protected int getChartParaType() { - return ParameterTableModel.CHART_METER_USE; - } - } - /** * 判断类型 * @param ob 判断目标 diff --git a/designer_base/src/com/fr/design/javascript/ParameterJavaScriptPane.java b/designer_base/src/com/fr/design/javascript/ParameterJavaScriptPane.java index 14e8000de..5a5067b10 100644 --- a/designer_base/src/com/fr/design/javascript/ParameterJavaScriptPane.java +++ b/designer_base/src/com/fr/design/javascript/ParameterJavaScriptPane.java @@ -1,6 +1,7 @@ package com.fr.design.javascript; import com.fr.base.Parameter; +import com.fr.chart.chartattr.Plot; import com.fr.design.beans.BasicBeanPane; import com.fr.design.editor.ValueEditorPane; import com.fr.design.editor.ValueEditorPaneFactory; @@ -16,10 +17,20 @@ import java.awt.*; import java.util.List; public class ParameterJavaScriptPane extends BasicBeanPane { + private Plot plot; private UITextField itemNameTextField; private ReportletParameterViewPane parameterViewPane; - - public ParameterJavaScriptPane(){ + + protected Plot getPlot() { + return plot; + } + + public ParameterJavaScriptPane(){ + this(null); + } + + public ParameterJavaScriptPane(Plot plot){ + this.plot = plot; this.setLayout(new BorderLayout()); parameterViewPane = new ReportletParameterViewPane(getChartParaType(), getValueEditorPane(), getValueEditorPane()); this.add(parameterViewPane, BorderLayout.CENTER); @@ -28,17 +39,17 @@ public class ParameterJavaScriptPane extends BasicBeanPane this.add(GUICoreUtils.createNamedPane(itemNameTextField, Inter.getLocText("Name") + ":"), BorderLayout.NORTH); } } - - protected int getChartParaType() { - return ParameterTableModel.NO_CHART_USE; - } + + protected int getChartParaType() { + return plot != null ? plot.getHyperLinkParaType() : ParameterTableModel.NO_CHART_USE; + } protected ValueEditorPane getValueEditorPane() { - return ValueEditorPaneFactory.createVallueEditorPaneWithUseType(getChartParaType()); + return ValueEditorPaneFactory.createVallueEditorPaneWithUseType(getChartParaType(), plot); } protected boolean needRenamePane(){ - return getChartParaType() != ParameterTableModel.NO_CHART_USE; + return getChartParaType() != ParameterTableModel.NO_CHART_USE && getChartParaType() != ParameterTableModel.VAN_CHART_USE ; } @Override @@ -86,61 +97,4 @@ public class ParameterJavaScriptPane extends BasicBeanPane return false; } } - - public static class CHART extends ParameterJavaScriptPane { - @Override - protected int getChartParaType() { - return ParameterTableModel.CHART_NORMAL_USE; - } - } - - public static class CHART_MAP extends ParameterJavaScriptPane { - protected int getChartParaType() { - return ParameterTableModel.CHART_MAP_USE; - } - } - - public static class CHART_GIS extends ParameterJavaScriptPane{ - protected int getChartParaType() { - return ParameterTableModel.CHART_GIS_USE; - } - } - - public static class CHART_PIE extends ParameterJavaScriptPane { - @Override - protected int getChartParaType() { - return ParameterTableModel.CHART_PIE_USE; - } - }; - - public static class CHART_XY extends ParameterJavaScriptPane { - protected int getChartParaType() { - return ParameterTableModel.CHART__XY_USE; - } - } - - public static class CHART_BUBBLE extends ParameterJavaScriptPane { - protected int getChartParaType() { - return ParameterTableModel.CHART_BUBBLE_USE; - } - } - - public static class CHART_STOCK extends ParameterJavaScriptPane { - protected int getChartParaType() { - return ParameterTableModel.CHART_STOCK_USE; - } - } - - public static class CHART_GANTT extends ParameterJavaScriptPane { - protected int getChartParaType() { - return ParameterTableModel.CHART_GANTT_USE; - } - } - - public static class CHART_METER extends ParameterJavaScriptPane { - protected int getChartParaType() { - return ParameterTableModel.CHART_METER_USE; - } - } - } \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java index 3d9e0026d..e49b9e1bb 100644 --- a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java @@ -4,6 +4,7 @@ import com.fr.base.chart.BaseChartCollection; import com.fr.chart.chartattr.Bar2DPlot; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.chartattr.Plot; import com.fr.chart.charttypes.ChartTypeManager; import com.fr.chart.web.ChartHyperPoplink; import com.fr.design.beans.BasicBeanPane; @@ -32,8 +33,19 @@ public class ChartHyperPoplinkPane extends BasicBeanPane { private UITextField itemNameTextField; private ChartHyperEditPane hyperEditPane; private ChartComponent chartComponent; - + + private Plot plot; + + protected Plot getPlot() { + return plot; + } + public ChartHyperPoplinkPane() { + this(null); + } + + public ChartHyperPoplinkPane(Plot plot) { + this.plot = plot; this.setLayout(FRGUIPaneFactory.createM_BorderLayout()); if(this.needRenamePane()){ @@ -75,21 +87,17 @@ public class ChartHyperPoplinkPane extends BasicBeanPane { return cc; } - protected int getChartParaType() { - return ParameterTableModel.CHART_NORMAL_USE; + protected int getChartParaType() { + return plot != null ? plot.getHyperLinkParaType() : ParameterTableModel.NO_CHART_USE; } protected ValueEditorPane getValueEditorPane() { - return ValueEditorPaneFactory.createVallueEditorPaneWithUseType(getChartParaType()); + return ValueEditorPaneFactory.createVallueEditorPaneWithUseType(getChartParaType(), plot); } - /** - * 是否需要加载重命名的空间 - * @return 默认需要加载 - */ - protected boolean needRenamePane(){ - return true; - } + protected boolean needRenamePane(){ + return getChartParaType() != ParameterTableModel.NO_CHART_USE && getChartParaType() != ParameterTableModel.VAN_CHART_USE ; + } @Override protected String title4PopupWindow() { @@ -143,55 +151,4 @@ public class ChartHyperPoplinkPane extends BasicBeanPane { return false; } } - - public static class CHART_MAP extends ChartHyperPoplinkPane { - - protected int getChartParaType() { - return ParameterTableModel.CHART_MAP_USE; - } - } - - public static class CHART_GIS extends ChartHyperPoplinkPane { - - protected int getChartParaType() { - return ParameterTableModel.CHART_GIS_USE; - } - } - - public static class CHART_PIE extends ChartHyperPoplinkPane { - @Override - protected int getChartParaType() { - return ParameterTableModel.CHART_PIE_USE; - } - } - - public static class CHART_XY extends ChartHyperPoplinkPane { - protected int getChartParaType() { - return ParameterTableModel.CHART__XY_USE; - } - } - - public static class CHART_BUBBLE extends ChartHyperPoplinkPane { - protected int getChartParaType() { - return ParameterTableModel.CHART_BUBBLE_USE; - } - } - - public static class CHART_STOCK extends ChartHyperPoplinkPane { - protected int getChartParaType() { - return ParameterTableModel.CHART_STOCK_USE; - } - } - - public static class CHART_GANTT extends ChartHyperPoplinkPane { - protected int getChartParaType() { - return ParameterTableModel.CHART_GANTT_USE; - } - } - - public static class CHART_METER extends ChartHyperPoplinkPane { - protected int getChartParaType() { - return ParameterTableModel.CHART_METER_USE; - } - } } \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateCellLinkPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateCellLinkPane.java index b1477c434..0b6a91a06 100644 --- a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateCellLinkPane.java +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateCellLinkPane.java @@ -1,6 +1,7 @@ package com.fr.design.chart.series.SeriesCondition.impl; import com.fr.base.Utils; +import com.fr.chart.chartattr.Plot; import com.fr.chart.web.ChartHyperRelateCellLink; import com.fr.design.beans.BasicBeanPane; import com.fr.design.editor.ValueEditorPane; @@ -30,11 +31,22 @@ public class ChartHyperRelateCellLinkPane extends BasicBeanPane { + private Plot plot; private ReportletParameterViewPane parameterViewPane; private FormHyperlinkNorthPane northPane; + protected Plot getPlot() { + return plot; + } + + public FormHyperlinkPane(Plot plot) { + super(); + this.plot = plot; + this.initComponents(); + } + public FormHyperlinkPane() { super(); this.initComponents(); @@ -44,15 +56,15 @@ public class FormHyperlinkPane extends BasicBeanPane { } protected int getChartParaType() { - return ParameterTableModel.NO_CHART_USE; + return plot != null ? plot.getHyperLinkParaType() : ParameterTableModel.NO_CHART_USE; } protected ValueEditorPane getValueEditorPane() { - return ValueEditorPaneFactory.createVallueEditorPaneWithUseType(getChartParaType()); + return ValueEditorPaneFactory.createVallueEditorPaneWithUseType(getChartParaType(), plot); } protected boolean needRenamePane(){ - return getChartParaType() != ParameterTableModel.NO_CHART_USE; + return getChartParaType() != ParameterTableModel.NO_CHART_USE && getChartParaType() != ParameterTableModel.VAN_CHART_USE ; } protected int getHyperlinkType() { @@ -108,61 +120,4 @@ public class FormHyperlinkPane extends BasicBeanPane { return ParameterTableModel.CHART_NORMAL_USE; } } - - public static class CHART extends FormHyperlinkPane { - @Override - protected int getChartParaType() { - return ParameterTableModel.CHART_NORMAL_USE; - } - } - - public static class CHART_MAP extends FormHyperlinkPane { - @Override - protected int getChartParaType() { - return ParameterTableModel.CHART_MAP_USE; - } - } - - public static class CHART_GIS extends FormHyperlinkPane{ - protected int getChartParaType() { - return ParameterTableModel.CHART_GIS_USE; - } - } - - public static class CHART_PIE extends FormHyperlinkPane { - @Override - protected int getChartParaType() { - return ParameterTableModel.CHART_PIE_USE; - } - }; - - public static class CHART_XY extends FormHyperlinkPane { - protected int getChartParaType() { - return ParameterTableModel.CHART__XY_USE; - } - } - - public static class CHART_BUBBLE extends FormHyperlinkPane { - protected int getChartParaType() { - return ParameterTableModel.CHART_BUBBLE_USE; - } - } - - public static class CHART_STOCK extends FormHyperlinkPane { - protected int getChartParaType() { - return ParameterTableModel.CHART_STOCK_USE; - } - } - - public static class CHART_GANTT extends FormHyperlinkPane { - protected int getChartParaType() { - return ParameterTableModel.CHART_GANTT_USE; - } - } - - public static class CHART_METER extends FormHyperlinkPane { - protected int getChartParaType() { - return ParameterTableModel.CHART_METER_USE; - } - } } \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartDesignerInteractivePane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartDesignerInteractivePane.java index c655e0800..416a70238 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartDesignerInteractivePane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartDesignerInteractivePane.java @@ -6,10 +6,11 @@ package com.fr.design.mainframe.chart.gui.other; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartdata.TopDefinition; -import com.fr.design.gui.imenutable.UIMenuNameableCreator; import com.fr.design.mainframe.chart.gui.ChartOtherPane; import com.fr.general.Inter; -import com.fr.js.*; +import com.fr.js.JavaScriptImpl; +import com.fr.js.WebHyperlink; +import com.fr.plugin.chart.designer.component.ChartUIMenuNameableCreator; import com.fr.third.org.hsqldb.lib.HashMap; import java.util.ArrayList; @@ -27,13 +28,13 @@ public class ChartDesignerInteractivePane extends ChartInteractivePane { super(parent); } - protected List refreshList(HashMap map) { - List list = new ArrayList(); + protected List refreshList(HashMap map) { + List list = new ArrayList(); - list.add(new UIMenuNameableCreator(Inter.getLocText("Hyperlink-Web_link"), + list.add(new ChartUIMenuNameableCreator(plot, Inter.getLocText("Hyperlink-Web_link"), new WebHyperlink(), getUseMap(map, WebHyperlink.class))); - list.add(new UIMenuNameableCreator("JavaScript", new JavaScriptImpl(), getUseMap(map, JavaScriptImpl.class))); - list.add(new UIMenuNameableCreator(Inter.getLocText("RelatedChart"),null,null)); + list.add(new ChartUIMenuNameableCreator(plot,"JavaScript", new JavaScriptImpl(), getUseMap(map, JavaScriptImpl.class))); + list.add(new ChartUIMenuNameableCreator(plot, Inter.getLocText("RelatedChart"),null,null)); return list; } diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartInteractivePane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartInteractivePane.java index e0f4fa311..66efccb84 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartInteractivePane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartInteractivePane.java @@ -6,21 +6,14 @@ import com.fr.base.chart.chartdata.TopDefinitionProvider; import com.fr.chart.base.AttrContents; import com.fr.chart.base.ChartConstants; import com.fr.chart.base.TimeSwitchAttr; -import com.fr.chart.chartattr.BubblePlot; import com.fr.chart.chartattr.Chart; -import com.fr.chart.chartattr.GanttPlot; -import com.fr.chart.chartattr.GisMapPlot; -import com.fr.chart.chartattr.MapPlot; -import com.fr.chart.chartattr.MeterPlot; -import com.fr.chart.chartattr.PiePlot; import com.fr.chart.chartattr.Plot; -import com.fr.chart.chartattr.StockPlot; -import com.fr.chart.chartattr.XYScatterPlot; import com.fr.chart.chartdata.GisMapReportDefinition; import com.fr.chart.chartdata.GisMapTableDefinition; import com.fr.chart.web.ChartHyperPoplink; import com.fr.chart.web.ChartHyperRelateCellLink; import com.fr.chart.web.ChartHyperRelateFloatLink; +import com.fr.design.ExtraDesignClassManager; import com.fr.design.beans.BasicBeanPane; import com.fr.design.chart.javascript.ChartEmailPane; import com.fr.design.chart.series.SeriesCondition.impl.ChartHyperPoplinkPane; @@ -30,6 +23,8 @@ import com.fr.design.chart.series.SeriesCondition.impl.FormHyperlinkPane; import com.fr.design.dialog.BasicScrollPane; import com.fr.design.event.UIObserver; import com.fr.design.event.UIObserverListener; +import com.fr.design.fun.HyperlinkProvider; +import com.fr.design.gui.controlpane.NameableCreator; import com.fr.design.gui.frpane.UIBubbleFloatPane; import com.fr.design.gui.frpane.UICorrelationComboBoxPane; import com.fr.design.gui.ibutton.UIButton; @@ -57,6 +52,7 @@ import com.fr.js.NameJavaScriptGroup; import com.fr.js.ParameterJavaScript; import com.fr.js.ReportletHyperlink; import com.fr.js.WebHyperlink; +import com.fr.plugin.chart.designer.component.ChartUIMenuNameableCreator; import com.fr.plugin.chart.designer.component.format.FormatPaneWithOutFont; import com.fr.stable.Constants; import com.fr.stable.StringUtils; @@ -76,19 +72,11 @@ import java.text.DecimalFormat; import java.text.Format; import java.util.ArrayList; import java.util.List; +import java.util.Set; public class ChartInteractivePane extends BasicScrollPane implements UIObserver{ private static final long serialVersionUID = 3477409806918835992L; private static HashMap normalMap = new HashMap(); - private static HashMap gisMap = new HashMap(); - private static HashMap mapMap = new HashMap(); - private static HashMap pieMap = new HashMap(); - - private static HashMap xyMap = new HashMap(); - private static HashMap bubbleMap = new HashMap(); - private static HashMap stockMap = new HashMap(); - private static HashMap ganttMap = new HashMap(); - private static HashMap meterMap = new HashMap(); private static final int TIME_SWITCH_GAP = 40; @@ -137,6 +125,8 @@ public class ChartInteractivePane extends BasicScrollPane implements UIOb private JPanel timeSwitchContainer; private TimeSwitchPane timeSwitchPane; + protected Plot plot; + private static final int SIZEX = 258; private static final int SIZEY = 209; private static final int DET = 20; @@ -553,6 +543,7 @@ public class ChartInteractivePane extends BasicScrollPane implements UIOb } Plot plot = chart.getPlot(); + this.plot =plot; relayoutWithGis(chart, plot); relayoutWithPlot(plot); @@ -676,18 +667,25 @@ public class ChartInteractivePane extends BasicScrollPane implements UIOb } private void populateHyperlink(Plot plot) { - HashMap paneMap = renewMapWithPlot(plot); + HashMap paneMap = getPlotHyperMap(); + //安装平台内打开插件时,添加相应按钮 + Set providers = ExtraDesignClassManager.getInstance().getArray(HyperlinkProvider.XML_TAG); + for (HyperlinkProvider provider : providers) { + NameableCreator nc = provider.createHyperlinkCreator(); + paneMap.put(nc.getHyperlink(), nc.getUpdatePane()); + } - List list = refreshList(paneMap); + + List list = refreshList(paneMap); superLink.refreshMenuAndAddMenuAction(list); - List hyperList = new ArrayList(); + List hyperList = new ArrayList(); NameJavaScriptGroup nameGroup = plot.getHotHyperLink(); for(int i = 0; nameGroup != null && i < nameGroup.size(); i++) { NameJavaScript javaScript = nameGroup.getNameHyperlink(i); if(javaScript != null && javaScript.getJavaScript() != null) { JavaScript script = javaScript.getJavaScript(); - hyperList.add(new UIMenuNameableCreator(javaScript.getName(), script, getUseMap(paneMap, script.getClass()))); + hyperList.add(new ChartUIMenuNameableCreator(plot, javaScript.getName(), script, getUseMap(paneMap, script.getClass()))); } } @@ -857,209 +855,50 @@ public class ChartInteractivePane extends BasicScrollPane implements UIOb return null; } - protected List refreshList(HashMap map) { - List list = new ArrayList(); + protected List refreshList(HashMap map) { + List list = new ArrayList(); - list.add(new UIMenuNameableCreator(Inter.getLocText("Chart-Link_Reportlet"), + list.add(new ChartUIMenuNameableCreator(plot, Inter.getLocText("Chart-Link_Reportlet"), new ReportletHyperlink(), getUseMap(map, ReportletHyperlink.class))); - list.add(new UIMenuNameableCreator(Inter.getLocText("Chart-Link_Mail"), new EmailJavaScript(), ChartEmailPane.class)); - list.add(new UIMenuNameableCreator(Inter.getLocText("Chart-Link_Web"), + list.add(new ChartUIMenuNameableCreator(plot, Inter.getLocText("Chart-Link_Mail"), new EmailJavaScript(), ChartEmailPane.class)); + list.add(new ChartUIMenuNameableCreator(plot, Inter.getLocText("Chart-Link_Web"), new WebHyperlink(), getUseMap(map, WebHyperlink.class))); - list.add(new UIMenuNameableCreator(Inter.getLocText("Chart-Link_Dynamic_Parameters"), + list.add(new ChartUIMenuNameableCreator(plot, Inter.getLocText("Chart-Link_Dynamic_Parameters"), new ParameterJavaScript(), getUseMap(map, ParameterJavaScript.class))); - list.add(new UIMenuNameableCreator("JavaScript", new JavaScriptImpl(), getUseMap(map, JavaScriptImpl.class))); + list.add(new ChartUIMenuNameableCreator(plot, "JavaScript", new JavaScriptImpl(), getUseMap(map, JavaScriptImpl.class))); - list.add(new UIMenuNameableCreator(Inter.getLocText("Chart-Float_Chart"), + list.add(new ChartUIMenuNameableCreator(plot, Inter.getLocText("Chart-Float_Chart"), new ChartHyperPoplink(), getUseMap(map, ChartHyperPoplink.class))); - list.add(new UIMenuNameableCreator(Inter.getLocText("Chart-Link_Cell"), + list.add(new ChartUIMenuNameableCreator(plot, Inter.getLocText("Chart-Link_Cell"), new ChartHyperRelateCellLink(), getUseMap(map, ChartHyperRelateCellLink.class))); - list.add(new UIMenuNameableCreator(Inter.getLocText("Chart-Link_Float"), + list.add(new ChartUIMenuNameableCreator(plot, Inter.getLocText("Chart-Link_Float"), new ChartHyperRelateFloatLink(), getUseMap(map, ChartHyperRelateFloatLink.class))); FormHyperlinkProvider hyperlink = StableFactory.getMarkedInstanceObjectFromClass(FormHyperlinkProvider.XML_TAG, FormHyperlinkProvider.class); - list.add(new UIMenuNameableCreator(Inter.getLocText("Chart-Link_Form"), + list.add(new ChartUIMenuNameableCreator(plot, Inter.getLocText("Chart-Link_Form"), hyperlink, getUseMap(map, FormHyperlinkProvider.class))); return list; } - private HashMap renewMapWithPlot(Plot plot) { - if(plot instanceof PiePlot) { - return getPiePlotHyperMap(); - } else if(plot instanceof MapPlot) { - return getMapPlotHyperMap(); - } else if(plot instanceof GisMapPlot) { - return getGisPlotHyperMap(); - } else if(plot instanceof XYScatterPlot) { - return getXYHyperMap(); - } else if(plot instanceof BubblePlot) { - return getBubbleHyperMap(); - } else if(plot instanceof StockPlot) { - return getStockHyperMap(); - } else if(plot instanceof GanttPlot) { - return getGanttHyperMap(); - } else if(plot instanceof MeterPlot) { - return getMeterHyperMap(); - } - - else { - return getNormalPlotHyperMap(); - } - } - - private HashMap getXYHyperMap() { - if(xyMap.isEmpty()) { - xyMap.put(ReportletHyperlink.class, ReportletHyperlinkPane.CHART_XY.class); - xyMap.put(EmailJavaScript.class, ChartEmailPane.class); - xyMap.put(WebHyperlink.class, WebHyperlinkPane.CHART_XY.class); - xyMap.put(ParameterJavaScript.class, ParameterJavaScriptPane.CHART_XY.class); - - xyMap.put(JavaScriptImpl.class, JavaScriptImplPane.CHART_XY.class); - xyMap.put(ChartHyperPoplink.class, ChartHyperPoplinkPane.CHART_XY.class); - xyMap.put(ChartHyperRelateCellLink.class, ChartHyperRelateCellLinkPane.CHART_XY.class); - xyMap.put(ChartHyperRelateFloatLink.class, ChartHyperRelateFloatLinkPane.CHART_XY.class); - - xyMap.put(FormHyperlinkProvider.class, FormHyperlinkPane.CHART_XY.class); - } - return xyMap; - } - - private HashMap getBubbleHyperMap() { - if(bubbleMap.isEmpty()) { - bubbleMap.put(ReportletHyperlink.class, ReportletHyperlinkPane.CHART_BUBBLE.class); - bubbleMap.put(EmailJavaScript.class, ChartEmailPane.class); - bubbleMap.put(WebHyperlink.class, WebHyperlinkPane.CHART_BUBBLE.class); - bubbleMap.put(ParameterJavaScript.class, ParameterJavaScriptPane.CHART_BUBBLE.class); - - bubbleMap.put(JavaScriptImpl.class, JavaScriptImplPane.CHART_BUBBLE.class); - bubbleMap.put(ChartHyperPoplink.class, ChartHyperPoplinkPane.CHART_BUBBLE.class); - bubbleMap.put(ChartHyperRelateCellLink.class, ChartHyperRelateCellLinkPane.CHART_BUBBLE.class); - bubbleMap.put(ChartHyperRelateFloatLink.class, ChartHyperRelateFloatLinkPane.CHART_BUBBLE.class); - bubbleMap.put(FormHyperlinkProvider.class, FormHyperlinkPane.CHART_BUBBLE.class); - } - return bubbleMap; - } - - private HashMap getStockHyperMap() { - if(stockMap.isEmpty()) { - stockMap.put(ReportletHyperlink.class, ReportletHyperlinkPane.CHART_STOCK.class); - stockMap.put(EmailJavaScript.class, ChartEmailPane.class); - stockMap.put(WebHyperlink.class, WebHyperlinkPane.CHART_STOCK.class); - stockMap.put(ParameterJavaScript.class, ParameterJavaScriptPane.CHART_STOCK.class); - - stockMap.put(JavaScriptImpl.class, JavaScriptImplPane.CHART_STOCK.class); - stockMap.put(ChartHyperPoplink.class, ChartHyperPoplinkPane.CHART_STOCK.class); - stockMap.put(ChartHyperRelateCellLink.class, ChartHyperRelateCellLinkPane.CHART_STOCK.class); - stockMap.put(ChartHyperRelateFloatLink.class, ChartHyperRelateFloatLinkPane.CHART_STOCK.class); - - stockMap.put(FormHyperlinkProvider.class, FormHyperlinkPane.CHART_STOCK.class); - } - return stockMap; - } - - private HashMap getGanttHyperMap() { - if(ganttMap.isEmpty()) { - ganttMap.put(ReportletHyperlink.class, ReportletHyperlinkPane.CHART_GANTT.class); - ganttMap.put(EmailJavaScript.class, ChartEmailPane.class); - ganttMap.put(WebHyperlink.class, WebHyperlinkPane.CHART_GANTT.class); - ganttMap.put(ParameterJavaScript.class, ParameterJavaScriptPane.CHART_GANTT.class); - - ganttMap.put(JavaScriptImpl.class, JavaScriptImplPane.CHART_GANTT.class); - ganttMap.put(ChartHyperPoplink.class, ChartHyperPoplinkPane.CHART_GANTT.class); - ganttMap.put(ChartHyperRelateCellLink.class, ChartHyperRelateCellLinkPane.CHART_GANTT.class); - ganttMap.put(ChartHyperRelateFloatLink.class, ChartHyperRelateFloatLinkPane.CHART_GANTT.class); - - ganttMap.put(FormHyperlinkProvider.class, FormHyperlinkPane.CHART_GANTT.class); - } - return ganttMap; - } - - private HashMap getMeterHyperMap() { - if(meterMap.isEmpty()) { - meterMap.put(ReportletHyperlink.class, ReportletHyperlinkPane.CHART_METER.class); - meterMap.put(EmailJavaScript.class, ChartEmailPane.class); - meterMap.put(WebHyperlink.class, WebHyperlinkPane.CHART_METER.class); - meterMap.put(ParameterJavaScript.class, ParameterJavaScriptPane.CHART_METER.class); - - meterMap.put(JavaScriptImpl.class, JavaScriptImplPane.CHART_METER.class); - meterMap.put(ChartHyperPoplink.class, ChartHyperPoplinkPane.CHART_METER.class); - meterMap.put(ChartHyperRelateCellLink.class, ChartHyperRelateCellLinkPane.CHART_METER.class); - meterMap.put(ChartHyperRelateFloatLink.class, ChartHyperRelateFloatLinkPane.CHART_METER.class); - - meterMap.put(FormHyperlinkProvider.class, FormHyperlinkPane.CHART_METER.class); - } - return meterMap; - } - - private HashMap getMapPlotHyperMap() { - if(mapMap.isEmpty()) { - mapMap.put(ReportletHyperlink.class, ReportletHyperlinkPane.CHART_MAP.class); - mapMap.put(EmailJavaScript.class, ChartEmailPane.class); - mapMap.put(WebHyperlink.class, WebHyperlinkPane.CHART_MAP.class); - mapMap.put(ParameterJavaScript.class, ParameterJavaScriptPane.CHART_MAP.class); - - mapMap.put(JavaScriptImpl.class, JavaScriptImplPane.CHART_MAP.class); - mapMap.put(ChartHyperPoplink.class, ChartHyperPoplinkPane.CHART_MAP.class); - mapMap.put(ChartHyperRelateCellLink.class, ChartHyperRelateCellLinkPane.CHART_MAP.class); - mapMap.put(ChartHyperRelateFloatLink.class, ChartHyperRelateFloatLinkPane.CHART_MAP.class); - - mapMap.put(FormHyperlinkProvider.class, FormHyperlinkPane.CHART_MAP.class); - } - return mapMap; - } - - private HashMap getPiePlotHyperMap() { - if(pieMap.isEmpty()) { - pieMap.put(ReportletHyperlink.class, ReportletHyperlinkPane.CHART_PIE.class); - pieMap.put(EmailJavaScript.class, ChartEmailPane.class); - pieMap.put(WebHyperlink.class, WebHyperlinkPane.CHART_PIE.class); - pieMap.put(ParameterJavaScript.class, ParameterJavaScriptPane.CHART_PIE.class); - - pieMap.put(JavaScriptImpl.class, JavaScriptImplPane.CHART_PIE.class); - pieMap.put(ChartHyperPoplink.class, ChartHyperPoplinkPane.CHART_PIE.class); - pieMap.put(ChartHyperRelateCellLink.class, ChartHyperRelateCellLinkPane.CHART_PIE.class); - pieMap.put(ChartHyperRelateFloatLink.class, ChartHyperRelateFloatLinkPane.CHART_PIE.class); - - pieMap.put(FormHyperlinkProvider.class, FormHyperlinkPane.CHART_PIE.class); - } - return pieMap; - } - - private HashMap getGisPlotHyperMap() { - if(gisMap.isEmpty()) { - gisMap.put(ReportletHyperlink.class, ReportletHyperlinkPane.CHART_GIS.class); - gisMap.put(EmailJavaScript.class, ChartEmailPane.class); - gisMap.put(WebHyperlink.class, WebHyperlinkPane.CHART_GIS.class); - gisMap.put(ParameterJavaScript.class, ParameterJavaScriptPane.CHART_GIS.class); - - gisMap.put(JavaScriptImpl.class, JavaScriptImplPane.CHART_GIS.class); - gisMap.put(ChartHyperPoplink.class, ChartHyperPoplinkPane.CHART_GIS.class); - gisMap.put(ChartHyperRelateCellLink.class, ChartHyperRelateCellLinkPane.CHART_GIS.class); - gisMap.put(ChartHyperRelateFloatLink.class, ChartHyperRelateFloatLinkPane.CHART_GIS.class); - - gisMap.put(FormHyperlinkProvider.class, FormHyperlinkPane.CHART_GIS.class); - } - return gisMap; - } - - private HashMap getNormalPlotHyperMap() { + private HashMap getPlotHyperMap() { if(normalMap.isEmpty()) { FormHyperlinkProvider fp = StableFactory.getMarkedInstanceObjectFromClass(FormHyperlinkProvider.XML_TAG, FormHyperlinkProvider.class); - normalMap.put(ReportletHyperlink.class, ReportletHyperlinkPane.CHART.class); + normalMap.put(ReportletHyperlink.class, ReportletHyperlinkPane.class); normalMap.put(EmailJavaScript.class, ChartEmailPane.class); - normalMap.put(WebHyperlink.class, WebHyperlinkPane.CHART.class); - normalMap.put(ParameterJavaScript.class, ParameterJavaScriptPane.CHART.class); + normalMap.put(WebHyperlink.class, WebHyperlinkPane.class); + normalMap.put(ParameterJavaScript.class, ParameterJavaScriptPane.class); - normalMap.put(JavaScriptImpl.class, JavaScriptImplPane.CHART.class); + normalMap.put(JavaScriptImpl.class, JavaScriptImplPane.class); normalMap.put(ChartHyperPoplink.class, ChartHyperPoplinkPane.class); normalMap.put(ChartHyperRelateCellLink.class, ChartHyperRelateCellLinkPane.class); normalMap.put(ChartHyperRelateFloatLink.class, ChartHyperRelateFloatLinkPane.class); - normalMap.put(FormHyperlinkProvider.class, FormHyperlinkPane.CHART.class); + normalMap.put(FormHyperlinkProvider.class, FormHyperlinkPane.class); //兼容老的FormHyperlink.class if(fp != null){ - normalMap.put(fp.getClass(), FormHyperlinkPane.CHART.class); + normalMap.put(fp.getClass(), FormHyperlinkPane.class); } } return normalMap; diff --git a/designer_chart/src/com/fr/plugin/chart/custom/component/VanChartHyperLinkPane.java b/designer_chart/src/com/fr/plugin/chart/custom/component/VanChartHyperLinkPane.java index 2f0e0c628..0fbeb752f 100644 --- a/designer_chart/src/com/fr/plugin/chart/custom/component/VanChartHyperLinkPane.java +++ b/designer_chart/src/com/fr/plugin/chart/custom/component/VanChartHyperLinkPane.java @@ -6,12 +6,21 @@ import com.fr.chart.web.ChartHyperRelateCellLink; import com.fr.chart.web.ChartHyperRelateFloatLink; import com.fr.design.ExtraDesignClassManager; import com.fr.design.beans.BasicBeanPane; +import com.fr.design.chart.javascript.ChartEmailPane; +import com.fr.design.chart.series.SeriesCondition.impl.ChartHyperPoplinkPane; +import com.fr.design.chart.series.SeriesCondition.impl.ChartHyperRelateCellLinkPane; +import com.fr.design.chart.series.SeriesCondition.impl.ChartHyperRelateFloatLinkPane; +import com.fr.design.chart.series.SeriesCondition.impl.FormHyperlinkPane; import com.fr.design.designer.TargetComponent; import com.fr.design.fun.HyperlinkProvider; import com.fr.design.gui.HyperlinkFilterHelper; import com.fr.design.gui.controlpane.NameObjectCreator; import com.fr.design.gui.controlpane.NameableCreator; import com.fr.design.gui.imenutable.UIMenuNameableCreator; +import com.fr.design.hyperlink.ReportletHyperlinkPane; +import com.fr.design.hyperlink.WebHyperlinkPane; +import com.fr.design.javascript.JavaScriptImplPane; +import com.fr.design.javascript.ParameterJavaScriptPane; import com.fr.design.module.DesignModuleFactory; import com.fr.general.Inter; import com.fr.general.NameObject; @@ -25,11 +34,12 @@ import com.fr.js.ParameterJavaScript; import com.fr.js.ReportletHyperlink; import com.fr.js.WebHyperlink; import com.fr.plugin.chart.designer.component.VanChartUIListControlPane; -import com.fr.plugin.chart.designer.other.HyperlinkMapFactory; import com.fr.stable.ListMap; import com.fr.stable.Nameable; import com.fr.stable.bridge.StableFactory; +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; import java.util.HashMap; import java.util.Map; @@ -62,6 +72,25 @@ public class VanChartHyperLinkPane extends VanChartUIListControlPane { } + protected BasicBeanPane createPaneByCreators(NameableCreator creator) { + Constructor constructor = null; + try { + constructor = creator.getUpdatePane().getConstructor(Plot.class); + return constructor.newInstance(plot); + + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (NoSuchMethodException e) { + return super.createPaneByCreators(creator); + } catch (InvocationTargetException e) { + e.printStackTrace(); + } + return null; + } + + /** * 弹出列表的标题. * @@ -119,8 +148,7 @@ public class VanChartHyperLinkPane extends VanChartUIListControlPane { Set providers = ExtraDesignClassManager.getInstance().getArray(HyperlinkProvider.XML_TAG); for (HyperlinkProvider provider : providers) { NameableCreator nc = provider.createHyperlinkCreator(); - //todo@shine9.0 - // paneMap.put(nc.getHyperlink(), nc.getUpdatePane()); + paneMap.put(nc.getHyperlink(), nc.getUpdatePane()); } java.util.List list = refreshList(paneMap); @@ -155,7 +183,20 @@ public class VanChartHyperLinkPane extends VanChartUIListControlPane { } protected HashMap getHyperlinkMap(Plot plot) { - return HyperlinkMapFactory.getHyperlinkMap(plot); + HashMap map = new HashMap(); + + map.put(ReportletHyperlink.class, ReportletHyperlinkPane.class); + map.put(EmailJavaScript.class, ChartEmailPane.class); + map.put(WebHyperlink.class, WebHyperlinkPane.class); + map.put(ParameterJavaScript.class, ParameterJavaScriptPane.class); + + map.put(JavaScriptImpl.class, JavaScriptImplPane.class); + map.put(ChartHyperPoplink.class, ChartHyperPoplinkPane.class); + map.put(ChartHyperRelateCellLink.class, ChartHyperRelateCellLinkPane.class); + map.put(ChartHyperRelateFloatLink.class, ChartHyperRelateFloatLinkPane.class); + + map.put(FormHyperlinkProvider.class, FormHyperlinkPane.class); + return map; } public void update(Plot plot) { @@ -191,7 +232,7 @@ public class VanChartHyperLinkPane extends VanChartUIListControlPane { list.add(new UIMenuNameableCreator(Inter.getLocText("Chart-Link_Reportlet"), new ReportletHyperlink(), getUseMap(map, ReportletHyperlink.class))); - list.add(new UIMenuNameableCreator(Inter.getLocText("Chart-Link_Mail"), new EmailJavaScript(), HyperlinkMapFactory.VanChartEmailPane.class)); + list.add(new UIMenuNameableCreator(Inter.getLocText("Chart-Link_Mail"), new EmailJavaScript(), VanChartEmailPane.class)); list.add(new UIMenuNameableCreator(Inter.getLocText("Chart-Link_Web"), new WebHyperlink(), getUseMap(map, WebHyperlink.class))); list.add(new UIMenuNameableCreator(Inter.getLocText("Chart-Link_Dynamic_Parameters"), @@ -237,5 +278,13 @@ public class VanChartHyperLinkPane extends VanChartUIListControlPane { } } + //邮箱 + public static class VanChartEmailPane extends ChartEmailPane { + @Override + protected boolean needRenamePane() { + return false; + } + } + } diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/ConditionUIMenuNameableCreator.java b/designer_chart/src/com/fr/plugin/chart/designer/component/ChartUIMenuNameableCreator.java similarity index 60% rename from designer_chart/src/com/fr/plugin/chart/designer/component/ConditionUIMenuNameableCreator.java rename to designer_chart/src/com/fr/plugin/chart/designer/component/ChartUIMenuNameableCreator.java index 5b78f970a..c660d1750 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/ConditionUIMenuNameableCreator.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/ChartUIMenuNameableCreator.java @@ -2,7 +2,6 @@ package com.fr.plugin.chart.designer.component; import com.fr.chart.chartattr.Plot; import com.fr.design.beans.BasicBeanPane; -import com.fr.design.condition.ConditionAttributesPane; import com.fr.design.gui.imenutable.UIMenuNameableCreator; import com.fr.general.FRLogger; @@ -11,10 +10,10 @@ import java.lang.reflect.Constructor; /** * Created by hufan on 2016/11/15. */ -public class ConditionUIMenuNameableCreator extends UIMenuNameableCreator { +public class ChartUIMenuNameableCreator extends UIMenuNameableCreator { private Plot plot; - public ConditionUIMenuNameableCreator(Plot plot, String name, Object obj, Class paneClazz) { + public ChartUIMenuNameableCreator(Plot plot, String name, Object obj, Class paneClazz) { super(name, obj, paneClazz); this.plot = plot; } @@ -28,16 +27,18 @@ public class ConditionUIMenuNameableCreator extends UIMenuNameableCreator { } catch (IllegalAccessException e) { FRLogger.getLogger().error("UIMenuNameableCreator IllegalAccessException"); } - return new ConditionUIMenuNameableCreator(plot, name, cloneObj, (Class) this.paneClazz); + return new ChartUIMenuNameableCreator(plot, name, cloneObj, (Class) this.paneClazz); } public BasicBeanPane getPane() { try { - Constructor constructor = paneClazz.getConstructor(Plot.class); - return constructor.newInstance(plot); + if (plot != null) { + Constructor constructor = paneClazz.getConstructor(Plot.class); + return constructor.newInstance(plot); + } } catch (Exception e) { - FRLogger.getLogger().error(e.getMessage(), e); + return super.getPane(); } return null; } diff --git a/designer_chart/src/com/fr/plugin/chart/designer/other/HyperlinkMapFactory.java b/designer_chart/src/com/fr/plugin/chart/designer/other/HyperlinkMapFactory.java deleted file mode 100644 index 2ca0e2504..000000000 --- a/designer_chart/src/com/fr/plugin/chart/designer/other/HyperlinkMapFactory.java +++ /dev/null @@ -1,1096 +0,0 @@ -package com.fr.plugin.chart.designer.other; - -import com.fr.base.Formula; -import com.fr.chart.chartattr.Plot; -import com.fr.chart.web.ChartHyperPoplink; -import com.fr.chart.web.ChartHyperRelateCellLink; -import com.fr.chart.web.ChartHyperRelateFloatLink; -import com.fr.design.chart.javascript.ChartEmailPane; -import com.fr.design.chart.series.SeriesCondition.impl.ChartHyperPoplinkPane; -import com.fr.design.chart.series.SeriesCondition.impl.ChartHyperRelateCellLinkPane; -import com.fr.design.chart.series.SeriesCondition.impl.ChartHyperRelateFloatLinkPane; -import com.fr.design.chart.series.SeriesCondition.impl.FormHyperlinkPane; -import com.fr.design.editor.ValueEditorPane; -import com.fr.design.editor.ValueEditorPaneFactory; -import com.fr.design.editor.editor.BooleanEditor; -import com.fr.design.editor.editor.ConstantsEditor; -import com.fr.design.editor.editor.DateEditor; -import com.fr.design.editor.editor.DoubleEditor; -import com.fr.design.editor.editor.Editor; -import com.fr.design.editor.editor.FormulaEditor; -import com.fr.design.editor.editor.IntegerEditor; -import com.fr.design.editor.editor.TextEditor; -import com.fr.design.hyperlink.ReportletHyperlinkPane; -import com.fr.design.hyperlink.WebHyperlinkPane; -import com.fr.design.javascript.JavaScriptImplPane; -import com.fr.design.javascript.ParameterJavaScriptPane; -import com.fr.general.Inter; -import com.fr.js.EmailJavaScript; -import com.fr.js.FormHyperlinkProvider; -import com.fr.js.JavaScriptImpl; -import com.fr.js.ParameterJavaScript; -import com.fr.js.ReportletHyperlink; -import com.fr.js.WebHyperlink; -import com.fr.plugin.chart.area.VanChartAreaPlot; -import com.fr.plugin.chart.bubble.BubblePlotType; -import com.fr.plugin.chart.bubble.VanChartBubblePlot; -import com.fr.plugin.chart.column.VanChartColumnPlot; -import com.fr.plugin.chart.custom.VanChartCustomPlot; -import com.fr.plugin.chart.custom.type.CustomStyle; -import com.fr.plugin.chart.drillmap.VanChartDrillMapPlot; -import com.fr.plugin.chart.funnel.VanChartFunnelPlot; -import com.fr.plugin.chart.gantt.VanChartGanttPlot; -import com.fr.plugin.chart.gauge.VanChartGaugePlot; -import com.fr.plugin.chart.heatmap.VanChartHeatMapPlot; -import com.fr.plugin.chart.line.VanChartLinePlot; -import com.fr.plugin.chart.map.VanChartMapPlot; -import com.fr.plugin.chart.multilayer.VanChartMultiPiePlot; -import com.fr.plugin.chart.scatter.VanChartScatterPlot; -import com.fr.plugin.chart.structure.VanChartStructurePlot; -import com.fr.plugin.chart.treemap.VanChartTreeMapPlot; -import com.fr.plugin.chart.type.GaugeStyle; -import com.fr.plugin.chart.type.MapType; -import com.fr.plugin.chart.wordcloud.VanChartWordCloudPlot; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - - -/** - * 根据plot返回不同的超链的map - */ - -public class HyperlinkMapFactory { - //注意啦:下面超链面板那些类名如VAN_CHART_SCATTER要和SCATTER = "$VAN_CHART_SCATTER"完全一致。 - private static final String NORMAL = "$VAN_CHART"; - private static final String GAUGE = "$VAN_CHART_GAUGE"; - private static final String SCATTER = "$VAN_CHART_SCATTER"; - private static final String GANNT = "$VAN_CHART_GANNT"; - private static final String MULTIPIE = "$VAN_CHART_MULTIPIE"; - private static final String MAP = "$VAN_CHART_MAP"; - private static final String LINEMAP = "$VAN_CHART_LINE_MAP"; - private static final String DIRLLMAPCATALOG = "$VAN_CHART_DRILLMAPCATALOG"; - private static final String FUNNEL = "$VAN_CHART_FUNNEL"; - private static final String WORDCLOUD = "$VAN_CHART_WORDCLOUD"; - private static final String STRUCTURE = "$VAN_CHART_STRUCTURE"; - private static final String MULTICATEGORY = "$VAN_CHART_MULTICATEGORY"; - - private static final String KEY_GAUGE_SLOT = VanChartGaugePlot.class.getName() + GaugeStyle.SLOT.ordinal(); - private static final String KEY_GAUGE_RING = VanChartGaugePlot.class.getName() + GaugeStyle.RING.ordinal(); - private static final String KEY_GAUGE_THERMOMETER = VanChartGaugePlot.class.getName() + GaugeStyle.THERMOMETER.ordinal(); - private static final String KEY_LINE_MAP = VanChartMapPlot.class.getName() + MapType.LINE.ordinal(); - - private static final String KEY_CUSTOM_COLUMN_LINE = VanChartCustomPlot.class.getName() + CustomStyle.COMMON_COLUMN_AREA.ordinal(); - private static final String KEY_CUSTOM_COLUMN_AREA = VanChartCustomPlot.class.getName() + CustomStyle.COMMON_COLUMN_AREA.ordinal(); - private static final String KEY_CUSTOM_STACK_COLUMN_LINE = VanChartCustomPlot.class.getName() + CustomStyle.COMMON_COLUMN_AREA.ordinal(); - - private static final String KEY_BUBBLE_FORCE = VanChartBubblePlot.class.getName() + BubblePlotType.FORCE.ordinal(); - - private static HashMap plotTypeMap = new HashMap(); - - static { - plotTypeMap.put(KEY_GAUGE_SLOT, GAUGE); - plotTypeMap.put(KEY_GAUGE_RING, GAUGE); - plotTypeMap.put(KEY_GAUGE_THERMOMETER, GAUGE); - plotTypeMap.put(VanChartScatterPlot.class.getName(), SCATTER); - plotTypeMap.put(VanChartBubblePlot.class.getName(), SCATTER); - plotTypeMap.put(VanChartMultiPiePlot.class.getName(), MULTIPIE); - plotTypeMap.put(VanChartTreeMapPlot.class.getName(), MULTIPIE); - plotTypeMap.put(KEY_BUBBLE_FORCE, NORMAL); - plotTypeMap.put(VanChartMapPlot.class.getName(), MAP); - plotTypeMap.put(KEY_LINE_MAP, LINEMAP); - plotTypeMap.put(VanChartDrillMapPlot.class.getName(), MAP); - plotTypeMap.put(VanChartFunnelPlot.class.getName(), FUNNEL); - plotTypeMap.put(VanChartHeatMapPlot.class.getName(), MAP); - plotTypeMap.put(VanChartWordCloudPlot.class.getName(), WORDCLOUD); - plotTypeMap.put(VanChartGanttPlot.class.getName(), GANNT); - plotTypeMap.put(VanChartStructurePlot.class.getName(), STRUCTURE); - plotTypeMap.put(VanChartColumnPlot.class.getName(), MULTICATEGORY); - plotTypeMap.put(VanChartLinePlot.class.getName(), MULTICATEGORY); - plotTypeMap.put(VanChartAreaPlot.class.getName(), MULTICATEGORY); - plotTypeMap.put(KEY_CUSTOM_COLUMN_LINE, MULTICATEGORY); - plotTypeMap.put(KEY_CUSTOM_COLUMN_AREA, MULTICATEGORY); - plotTypeMap.put(KEY_CUSTOM_STACK_COLUMN_LINE, MULTICATEGORY); - } - - public static HashMap getHyperlinkMap(Plot plot) { - String plotType = plotTypeMap.get(plot.getClass().getName() + plot.getDetailType()); - if (plotType == null) { - plotType = plotTypeMap.get(plot.getClass().getName()); - if (plotType == null) { - plotType = NORMAL; - } - } - return getHyperlinkMapWithType(plotType); - } - - public static HashMap getDrillUpLinkMap() { - return getHyperlinkMapWithType(DIRLLMAPCATALOG); - } - - public static HashMap getLineMapHyperLinkMap() { - return getHyperlinkMapWithType(LINEMAP); - } - - private static HashMap getHyperlinkMapWithType(String plotType) { - HashMap map = new HashMap(); - - map.put(ReportletHyperlink.class, getClassWithPrefix(HyperlinkMapFactory.Report.class, plotType)); - map.put(EmailJavaScript.class, VanChartEmailPane.class); - map.put(WebHyperlink.class, getClassWithPrefix(HyperlinkMapFactory.Web.class, plotType)); - map.put(ParameterJavaScript.class, getClassWithPrefix(HyperlinkMapFactory.Para.class, plotType)); - - map.put(JavaScriptImpl.class, getClassWithPrefix(HyperlinkMapFactory.Js.class, plotType)); - map.put(ChartHyperPoplink.class, getClassWithPrefix(HyperlinkMapFactory.Chart_Chart.class, plotType)); - map.put(ChartHyperRelateCellLink.class, getClassWithPrefix(HyperlinkMapFactory.Chart_Cell.class, plotType)); - map.put(ChartHyperRelateFloatLink.class, getClassWithPrefix(HyperlinkMapFactory.Chart_Float.class, plotType)); - - map.put(FormHyperlinkProvider.class, getClassWithPrefix(HyperlinkMapFactory.Form.class, plotType)); - return map; - } - - private static Class getClassWithPrefix(Class superClass, String plotType) { - String wholeClassString = superClass.getName() + plotType; - try { - return Class.forName(wholeClassString); - } catch (Exception e) { - return superClass; - } - } - - private static Editor[] addBasicEditors(List list) { - list.add(new TextEditor()); - list.add(new IntegerEditor()); - list.add(new DoubleEditor()); - list.add(new DateEditor(true, Inter.getLocText("FR-Base_Sche_Day"))); - list.add(new BooleanEditor()); - - FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("Plugin-ChartF_Formula")); - formulaEditor.setEnabled(true); - list.add(formulaEditor); - - return list.toArray(new Editor[list.size()]); - } - - private static List getVanMultiPieEditor() { - ConstantsEditor seriesName = new ConstantsEditor(Inter.getLocText("Plugin-ChartF_MultiPie_Series_Name"), new Formula("SERIES")); - seriesName.setEnabled(false); - ConstantsEditor levelName = new ConstantsEditor(Inter.getLocText("Plugin-ChartF_Level_Name"), new Formula("NAME")); - levelName.setEnabled(false); - ConstantsEditor levelOrder = new ConstantsEditor(Inter.getLocText("Plugin-ChartF_Level_Order"), new Formula("LEVEL")); - levelOrder.setEnabled(false); - ConstantsEditor value = new ConstantsEditor(Inter.getLocText("Chart-Use_Value"), new Formula("VALUE")); - value.setEnabled(false); - - List lists = new ArrayList(); - lists.add(seriesName); - lists.add(levelName); - lists.add(levelOrder); - lists.add(value); - return lists; - } - - private static List getVanMultiCategoryEditor() { - ConstantsEditor category = new ConstantsEditor(Inter.getLocText("Chart-Category_Name"), new Formula("CATEGORY")); - category.setEnabled(false); - ConstantsEditor categoryArray = new ConstantsEditor(Inter.getLocText("Plugin-Chart_Category_Array"), new Formula("CATEGORYARRAY")); - categoryArray.setEnabled(false); - ConstantsEditor series = new ConstantsEditor(Inter.getLocText("ChartF-Series_Name"), new Formula("SERIES")); - series.setEnabled(false); - ConstantsEditor value = new ConstantsEditor(Inter.getLocText("Chart-Use_Value"), new Formula("VALUE")); - value.setEnabled(false); - - List lists = new ArrayList(); - lists.add(category); - lists.add(categoryArray); - lists.add(series); - lists.add(value); - return lists; - } - - private static List getVanScatterEditor() { - ConstantsEditor series = new ConstantsEditor(Inter.getLocText("ChartF-Series_Name"), new Formula("SERIES")); - series.setEnabled(false); - ConstantsEditor size = new ConstantsEditor("SIZE", new Formula("SIZE")); - size.setEnabled(false); - ConstantsEditor x = new ConstantsEditor("X", new Formula("X")); - x.setEnabled(false); - ConstantsEditor y = new ConstantsEditor("Y", new Formula("Y")); - y.setEnabled(false); - - List lists = new ArrayList(); - lists.add(series); - lists.add(x); - lists.add(y); - lists.add(size); - return lists; - } - - private static List getVanGanntEditor() { - ConstantsEditor project = new ConstantsEditor(Inter.getLocText("Plugin-ChartF_Project_Name"), new Formula("PROJECT")); - project.setEnabled(false); - ConstantsEditor series = new ConstantsEditor(Inter.getLocText("ChartF-Series_Name"), new Formula("SERIES")); - series.setEnabled(false); - ConstantsEditor startTime = new ConstantsEditor(Inter.getLocText("Plugin-ChartF_Start_Time"), new Formula("START_TIME")); - startTime.setEnabled(false); - ConstantsEditor endTime = new ConstantsEditor(Inter.getLocText("Plugin-ChartF_End_Time"), new Formula("END_TIME")); - endTime.setEnabled(false); - ConstantsEditor progress = new ConstantsEditor(Inter.getLocText("Plugin-ChartF_Process"), new Formula("PROGRESS")); - progress.setEnabled(false); - - List lists = new ArrayList(); - lists.add(project); - lists.add(series); - lists.add(startTime); - lists.add(endTime); - lists.add(progress); - - return lists; - } - - private static List getVanMapEditor() { - ConstantsEditor series = new ConstantsEditor(Inter.getLocText("ChartF-Series_Name"), new Formula("SERIES")); - series.setEnabled(false); - ConstantsEditor areaName = new ConstantsEditor(Inter.getLocText("FR-Chart-Area_Name"), new Formula("AREA_NAME")); - areaName.setEnabled(false); - ConstantsEditor value = new ConstantsEditor(Inter.getLocText("Chart-Use_Value"), new Formula("VALUE")); - value.setEnabled(false); - - List lists = new ArrayList(); - lists.add(series); - lists.add(areaName); - lists.add(value); - return lists; - } - - private static List getVanLineMapEditor() { - ConstantsEditor series = new ConstantsEditor(Inter.getLocText("ChartF-Series_Name"), new Formula("SERIES")); - series.setEnabled(false); - ConstantsEditor startAreaName = new ConstantsEditor(Inter.getLocText("Plugin-ChartF_Start_Point"), new Formula("START_AREA_NAME")); - startAreaName.setEnabled(false); - ConstantsEditor endAreaName = new ConstantsEditor(Inter.getLocText("Plugin-ChartF_End_Point"), new Formula("END_AREA_NAME")); - endAreaName.setEnabled(false); - ConstantsEditor value = new ConstantsEditor(Inter.getLocText("Chart-Use_Value"), new Formula("VALUE")); - value.setEnabled(false); - - List lists = new ArrayList(); - lists.add(series); - lists.add(startAreaName); - lists.add(endAreaName); - lists.add(value); - return lists; - } - - private static List getDrillMapCatalogEditor() { - ConstantsEditor areaName = new ConstantsEditor(Inter.getLocText("FR-Chart-Area_Name"), new Formula("AREA_NAME")); - areaName.setEnabled(false); - - List lists = new ArrayList(); - lists.add(areaName); - return lists; - } - - private static List getVanFunnelEditor() { - ConstantsEditor series = new ConstantsEditor(Inter.getLocText("ChartF-Series_Name"), new Formula("SERIES")); - series.setEnabled(false); - ConstantsEditor value = new ConstantsEditor(Inter.getLocText("Chart-Use_Value"), new Formula("VALUE")); - value.setEnabled(false); - - List lists = new ArrayList(); - lists.add(series); - lists.add(value); - return lists; - } - - private static List getVanWordCloudEditor() { - ConstantsEditor series = new ConstantsEditor(Inter.getLocText("Plugin-ChartF_MultiPie_Series_Name"), new Formula("SERIES")); - series.setEnabled(false); - ConstantsEditor name = new ConstantsEditor(Inter.getLocText("Plugin-ChartF_Word_Name"), new Formula("WORD_NAME")); - name.setEnabled(false); - ConstantsEditor value = new ConstantsEditor(Inter.getLocText("Plugin-ChartF_Word_Value"), new Formula("WORD_VALUE")); - value.setEnabled(false); - - List lists = new ArrayList(); - lists.add(series); - lists.add(name); - lists.add(value); - return lists; - } - - private static List getVanStructureEditor() { - ConstantsEditor name = new ConstantsEditor(Inter.getLocText("Plugin-ChartF_Node_Name"), new Formula("NAME")); - name.setEnabled(false); - ConstantsEditor series = new ConstantsEditor(Inter.getLocText("Plugin-ChartF_MultiPie_Series_Name"), new Formula("SERIES")); - series.setEnabled(false); - ConstantsEditor value = new ConstantsEditor(Inter.getLocText("Chart-Use_Value"), new Formula("VALUE")); - value.setEnabled(false); - - List lists = new ArrayList(); - lists.add(name); - lists.add(series); - lists.add(value); - return lists; - } - - private static ValueEditorPane getMultiCategoryEditorPane() { - List list = getVanMultiCategoryEditor(); - return ValueEditorPaneFactory.createValueEditorPane(addBasicEditors(list)); - } - - private static ValueEditorPane getScatterValueEditorPane() { - List list = getVanScatterEditor(); - return ValueEditorPaneFactory.createValueEditorPane(addBasicEditors(list)); - } - - private static ValueEditorPane getGanntValueEditorPane() { - List list = getVanGanntEditor(); - return ValueEditorPaneFactory.createValueEditorPane(addBasicEditors(list)); - } - - private static ValueEditorPane getMultiPieValueEditorPane() { - List list = getVanMultiPieEditor(); - return ValueEditorPaneFactory.createValueEditorPane(addBasicEditors(list)); - } - - private static ValueEditorPane getMapValueEditorPane() { - List list = getVanMapEditor(); - return ValueEditorPaneFactory.createValueEditorPane(addBasicEditors(list)); - } - - private static ValueEditorPane getLineMapValueEditorPane() { - List list = getVanLineMapEditor(); - return ValueEditorPaneFactory.createValueEditorPane(addBasicEditors(list)); - } - - private static ValueEditorPane getDrillMapCatalogValueEditorPane() { - List list = getDrillMapCatalogEditor(); - return ValueEditorPaneFactory.createValueEditorPane(addBasicEditors(list)); - } - - private static ValueEditorPane getFunnelValueEditorPane() { - List list = getVanFunnelEditor(); - return ValueEditorPaneFactory.createValueEditorPane(addBasicEditors(list)); - } - - private static ValueEditorPane getWordCloudValueEditorPane() { - List list = getVanWordCloudEditor(); - return ValueEditorPaneFactory.createValueEditorPane(addBasicEditors(list)); - } - - private static ValueEditorPane getStructureValueEditorPane() { - List list = getVanStructureEditor(); - return ValueEditorPaneFactory.createValueEditorPane(addBasicEditors(list)); - } - - - //网络报表 - public static class Report { - public static class VAN_CHART extends ReportletHyperlinkPane.CHART { - - @Override - protected boolean needRenamePane() { - return false; - } - - } - - public static class VAN_CHART_MULTICATEGORY extends Report.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getMultiCategoryEditorPane(); - } - } - - public static class VAN_CHART_SCATTER extends Report.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getScatterValueEditorPane(); - } - } - - public static class VAN_CHART_GANNT extends Report.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getGanntValueEditorPane(); - } - } - - public static class VAN_CHART_MULTIPIE extends Report.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getMultiPieValueEditorPane(); - } - } - - public static class VAN_CHART_GAUGE extends ReportletHyperlinkPane.CHART_METER { - - @Override - protected boolean needRenamePane() { - return false; - } - } - - public static class VAN_CHART_MAP extends Report.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getMapValueEditorPane(); - } - } - - public static class VAN_CHART_LINE_MAP extends Report.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getLineMapValueEditorPane(); - } - } - - public static class VAN_CHART_DRILLMAPCATALOG extends Report.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getDrillMapCatalogValueEditorPane(); - } - } - - public static class VAN_CHART_FUNNEL extends Report.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getFunnelValueEditorPane(); - } - } - - public static class VAN_CHART_WORDCLOUD extends Report.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getWordCloudValueEditorPane(); - } - } - - public static class VAN_CHART_STRUCTURE extends Report.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getStructureValueEditorPane(); - } - } - } - - //邮箱 - public static class VanChartEmailPane extends ChartEmailPane { - @Override - protected boolean needRenamePane() { - return false; - } - } - - //网页链接 - public static class Web { - public static class VAN_CHART extends WebHyperlinkPane.CHART { - - @Override - protected boolean needRenamePane() { - return false; - } - } - - public static class VAN_CHART_MULTICATEGORY extends Web.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getMultiCategoryEditorPane(); - } - } - - public static class VAN_CHART_SCATTER extends Web.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getScatterValueEditorPane(); - } - } - - public static class VAN_CHART_GANNT extends Web.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getGanntValueEditorPane(); - } - } - - public static class VAN_CHART_GAUGE extends WebHyperlinkPane.CHART_METER { - - @Override - protected boolean needRenamePane() { - return false; - } - } - - public static class VAN_CHART_MAP extends Web.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getMapValueEditorPane(); - } - } - - public static class VAN_CHART_LINE_MAP extends Web.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getLineMapValueEditorPane(); - } - } - - - public static class VAN_CHART_DRILLMAPCATALOG extends Web.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getDrillMapCatalogValueEditorPane(); - } - } - - public static class VAN_CHART_MULTIPIE extends Web.VAN_CHART { - protected ValueEditorPane getValueEditorPane() { - return getMultiPieValueEditorPane(); - } - } - - public static class VAN_CHART_FUNNEL extends Web.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getFunnelValueEditorPane(); - } - } - - public static class VAN_CHART_WORDCLOUD extends Web.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getWordCloudValueEditorPane(); - } - } - - public static class VAN_CHART_STRUCTURE extends Web.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getStructureValueEditorPane(); - } - } - } - - //动态参数 - public static class Para { - public static class VAN_CHART extends ParameterJavaScriptPane.CHART { - - @Override - protected boolean needRenamePane() { - return false; - } - } - - public static class VAN_CHART_MULTICATEGORY extends Para.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getMultiCategoryEditorPane(); - } - } - - public static class VAN_CHART_SCATTER extends Para.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getScatterValueEditorPane(); - } - } - - public static class VAN_CHART_GANNT extends Para.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getGanntValueEditorPane(); - } - } - - public static class VAN_CHART_GAUGE extends ParameterJavaScriptPane.CHART_METER { - - @Override - protected boolean needRenamePane() { - return false; - } - } - - public static class VAN_CHART_MAP extends Para.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getMapValueEditorPane(); - } - } - - public static class VAN_CHART_LINE_MAP extends Para.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getLineMapValueEditorPane(); - } - } - - - public static class VAN_CHART_DRILLMAPCATALOG extends Para.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getDrillMapCatalogValueEditorPane(); - } - } - - public static class VAN_CHART_MULTIPIE extends Para.VAN_CHART { - protected ValueEditorPane getValueEditorPane() { - return getMultiPieValueEditorPane(); - } - } - - public static class VAN_CHART_FUNNEL extends Para.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getFunnelValueEditorPane(); - } - } - - public static class VAN_CHART_WORDCLOUD extends Para.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getWordCloudValueEditorPane(); - } - } - - public static class VAN_CHART_STRUCTURE extends Para.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getStructureValueEditorPane(); - } - } - } - - //js超链 - public static class Js { - public static class VAN_CHART extends JavaScriptImplPane.CHART { - - @Override - protected boolean needRenamePane() { - return false; - } - } - - public static class VAN_CHART_MULTICATEGORY extends Js.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getMultiCategoryEditorPane(); - } - } - - public static class VAN_CHART_SCATTER extends Js.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getScatterValueEditorPane(); - } - } - - public static class VAN_CHART_GANNT extends Js.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getGanntValueEditorPane(); - } - } - - public static class VAN_CHART_GAUGE extends Js.VAN_CHART { - - @Override - protected boolean needRenamePane() { - return false; - } - } - - public static class VAN_CHART_MAP extends Js.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getMapValueEditorPane(); - } - } - - public static class VAN_CHART_LINE_MAP extends Js.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getLineMapValueEditorPane(); - } - } - - public static class VAN_CHART_DRILLMAPCATALOG extends Js.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getDrillMapCatalogValueEditorPane(); - } - } - - public static class VAN_CHART_MULTIPIE extends Js.VAN_CHART { - protected ValueEditorPane getValueEditorPane() { - return getMultiPieValueEditorPane(); - } - } - - public static class VAN_CHART_FUNNEL extends Js.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getFunnelValueEditorPane(); - } - } - - public static class VAN_CHART_WORDCLOUD extends Js.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getWordCloudValueEditorPane(); - } - } - - public static class VAN_CHART_STRUCTURE extends Js.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getStructureValueEditorPane(); - } - } - } - - //图表超链-悬浮窗图表 - public static class Chart_Chart { - public static class VAN_CHART extends ChartHyperPoplinkPane { - @Override - protected boolean needRenamePane() { - return false; - } - } - - public static class VAN_CHART_MULTICATEGORY extends Chart_Chart.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getMultiCategoryEditorPane(); - } - } - - public static class VAN_CHART_SCATTER extends Chart_Chart.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getScatterValueEditorPane(); - } - } - - public static class VAN_CHART_GANNT extends Chart_Chart.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getGanntValueEditorPane(); - } - } - - public static class VAN_CHART_GAUGE extends ChartHyperPoplinkPane.CHART_METER { - @Override - protected boolean needRenamePane() { - return false; - } - } - - public static class VAN_CHART_MAP extends Chart_Chart.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getMapValueEditorPane(); - } - } - - public static class VAN_CHART_LINE_MAP extends Chart_Chart.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getLineMapValueEditorPane(); - } - } - - public static class VAN_CHART_DRILLMAPCATALOG extends Chart_Chart.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getDrillMapCatalogValueEditorPane(); - } - } - - public static class VAN_CHART_MULTIPIE extends Chart_Chart.VAN_CHART { - protected ValueEditorPane getValueEditorPane() { - return getMultiPieValueEditorPane(); - } - } - - public static class VAN_CHART_FUNNEL extends Chart_Chart.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getFunnelValueEditorPane(); - } - } - - public static class VAN_CHART_WORDCLOUD extends Chart_Chart.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getWordCloudValueEditorPane(); - } - } - - public static class VAN_CHART_STRUCTURE extends Chart_Chart.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getStructureValueEditorPane(); - } - } - } - - //图表超链-联动单元格 - public static class Chart_Cell { - public static class VAN_CHART extends ChartHyperRelateCellLinkPane { - @Override - protected boolean needRenamePane() { - return false; - } - } - - public static class VAN_CHART_MULTICATEGORY extends Chart_Cell.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getMultiCategoryEditorPane(); - } - } - - public static class VAN_CHART_SCATTER extends Chart_Cell.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getScatterValueEditorPane(); - } - } - - public static class VAN_CHART_GANNT extends Chart_Cell.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getGanntValueEditorPane(); - } - } - - public static class VAN_CHART_GAUGE extends ChartHyperRelateCellLinkPane.CHART_METER { - @Override - protected boolean needRenamePane() { - return false; - } - } - - public static class VAN_CHART_MAP extends Chart_Cell.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getMapValueEditorPane(); - } - } - - public static class VAN_CHART_LINE_MAP extends Chart_Cell.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getLineMapValueEditorPane(); - } - } - - public static class VAN_CHART_DRILLMAPCATALOG extends Chart_Cell.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getDrillMapCatalogValueEditorPane(); - } - } - - public static class VAN_CHART_MULTIPIE extends Chart_Cell.VAN_CHART { - protected ValueEditorPane getValueEditorPane() { - return getMultiPieValueEditorPane(); - } - } - - public static class VAN_CHART_FUNNEL extends Chart_Cell.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getFunnelValueEditorPane(); - } - } - - public static class VAN_CHART_WORDCLOUD extends Chart_Cell.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getWordCloudValueEditorPane(); - } - } - - public static class VAN_CHART_STRUCTURE extends Chart_Cell.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getStructureValueEditorPane(); - } - } - } - - //图表超链-悬浮元素 - public static class Chart_Float { - public static class VAN_CHART extends ChartHyperRelateFloatLinkPane { - @Override - protected boolean needRenamePane() { - return false; - } - } - - public static class VAN_CHART_MULTICATEGORY extends Chart_Float.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getMultiCategoryEditorPane(); - } - } - - public static class VAN_CHART_SCATTER extends Chart_Float.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getScatterValueEditorPane(); - } - } - - public static class VAN_CHART_GANNT extends Chart_Float.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getGanntValueEditorPane(); - } - } - - public static class VAN_CHART_GAUGE extends ChartHyperRelateFloatLinkPane.CHART_METER { - @Override - protected boolean needRenamePane() { - return false; - } - } - - public static class VAN_CHART_MAP extends Chart_Float.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getMapValueEditorPane(); - } - } - - public static class VAN_CHART_LINE_MAP extends Chart_Float.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getLineMapValueEditorPane(); - } - } - - public static class VAN_CHART_DRILLMAPCATALOG extends Chart_Float.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getDrillMapCatalogValueEditorPane(); - } - } - - public static class VAN_CHART_MULTIPIE extends Chart_Float.VAN_CHART { - protected ValueEditorPane getValueEditorPane() { - return getMultiPieValueEditorPane(); - } - } - - public static class VAN_CHART_FUNNEL extends Chart_Float.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getFunnelValueEditorPane(); - } - } - - public static class VAN_CHART_WORDCLOUD extends Chart_Float.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getWordCloudValueEditorPane(); - } - } - - public static class VAN_CHART_STRUCTURE extends Chart_Float.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getStructureValueEditorPane(); - } - } - } - - //当前表单对象 - public static class Form { - public static class VAN_CHART extends FormHyperlinkPane.CHART { - @Override - protected boolean needRenamePane() { - return false; - } - } - - public static class VAN_CHART_MULTICATEGORY extends Form.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getMultiCategoryEditorPane(); - } - } - - public static class VAN_CHART_SCATTER extends Form.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getScatterValueEditorPane(); - } - } - - public static class VAN_CHART_GANNT extends Form.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getGanntValueEditorPane(); - } - } - - public static class VAN_CHART_GAUGE extends FormHyperlinkPane.CHART_METER { - @Override - protected boolean needRenamePane() { - return false; - } - } - - public static class VAN_CHART_MAP extends Form.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getMapValueEditorPane(); - } - } - - public static class VAN_CHART_LINE_MAP extends Form.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getLineMapValueEditorPane(); - } - } - - - public static class VAN_CHART_DRILLMAPCATALOG extends Form.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getDrillMapCatalogValueEditorPane(); - } - } - - public static class VAN_CHART_MULTIPIE extends Form.VAN_CHART { - protected ValueEditorPane getValueEditorPane() { - return getMultiPieValueEditorPane(); - } - } - - public static class VAN_CHART_FUNNEL extends Form.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getFunnelValueEditorPane(); - } - } - - public static class VAN_CHART_WORDCLOUD extends Form.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getWordCloudValueEditorPane(); - } - } - - public static class VAN_CHART_STRUCTURE extends Form.VAN_CHART { - @Override - protected ValueEditorPane getValueEditorPane() { - return getStructureValueEditorPane(); - } - } - } - -} \ No newline at end of file diff --git a/designer_chart/src/com/fr/plugin/chart/drillmap/designer/other/VanChartCatalogHyperLinkPane.java b/designer_chart/src/com/fr/plugin/chart/drillmap/designer/other/VanChartCatalogHyperLinkPane.java index 30d0cfca2..8bf8bdfe6 100644 --- a/designer_chart/src/com/fr/plugin/chart/drillmap/designer/other/VanChartCatalogHyperLinkPane.java +++ b/designer_chart/src/com/fr/plugin/chart/drillmap/designer/other/VanChartCatalogHyperLinkPane.java @@ -3,18 +3,12 @@ package com.fr.plugin.chart.drillmap.designer.other; import com.fr.chart.chartattr.Plot; import com.fr.js.NameJavaScriptGroup; import com.fr.plugin.chart.custom.component.VanChartHyperLinkPane; -import com.fr.plugin.chart.designer.other.HyperlinkMapFactory; import com.fr.plugin.chart.drillmap.VanChartDrillMapPlot; -import java.util.HashMap; - /** * Created by hufan on 2016/12/13. */ public class VanChartCatalogHyperLinkPane extends VanChartHyperLinkPane{ - protected HashMap getHyperlinkMap(Plot plot){ - return HyperlinkMapFactory.getDrillUpLinkMap(); - } protected void updateHotHyperLink(Plot plot, NameJavaScriptGroup nameGroup) { if (plot instanceof VanChartDrillMapPlot) { diff --git a/designer_chart/src/com/fr/plugin/chart/map/designer/other/VanChartMapHyperLinkPane.java b/designer_chart/src/com/fr/plugin/chart/map/designer/other/VanChartMapHyperLinkPane.java index 435c39cb4..bcdc76782 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/designer/other/VanChartMapHyperLinkPane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/designer/other/VanChartMapHyperLinkPane.java @@ -4,14 +4,12 @@ import com.fr.chart.chartattr.Plot; import com.fr.design.dialog.BasicScrollPane; import com.fr.js.NameJavaScriptGroup; import com.fr.plugin.chart.custom.component.VanChartHyperLinkPane; -import com.fr.plugin.chart.designer.other.HyperlinkMapFactory; -import com.fr.plugin.chart.type.MapType; import com.fr.plugin.chart.map.VanChartMapPlot; import com.fr.plugin.chart.map.designer.VanMapAreaPointAndLineGroupPane; +import com.fr.plugin.chart.type.MapType; import javax.swing.*; import java.awt.*; -import java.util.HashMap; /** * Created by hufan on 2016/12/20. @@ -194,11 +192,6 @@ public class VanChartMapHyperLinkPane extends BasicScrollPane { protected NameJavaScriptGroup populateHotHyperLink(Plot plot) { return ((VanChartMapPlot)plot).getLineHotHyperLink(); } - - @Override - protected HashMap getHyperlinkMap(Plot plot){ - return HyperlinkMapFactory.getLineMapHyperLinkMap(); - } }; } From 6a00341dac7f5b73391dab2286dcb06c3c3e8d53 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Wed, 11 Oct 2017 14:35:26 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E5=90=88=E5=B9=B6=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/editor/ValueEditorPaneFactory.java | 1 + 1 file changed, 1 insertion(+) diff --git a/designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java b/designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java index f931c0f58..2efa9012e 100644 --- a/designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java +++ b/designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java @@ -15,6 +15,7 @@ import com.fr.design.editor.editor.FormulaEditor; import com.fr.design.editor.editor.IntegerEditor; import com.fr.design.editor.editor.NoneEditor; import com.fr.design.editor.editor.ParameterEditor; +import com.fr.design.editor.editor.SpinnerIntegerEditor; import com.fr.design.editor.editor.TextEditor; import com.fr.design.editor.editor.WidgetNameEditor; import com.fr.design.gui.ilable.UILabel; From 627d2e4f3a8322214c2181477a5ad0c8ad0c3563 Mon Sep 17 00:00:00 2001 From: kerry Date: Wed, 11 Oct 2017 14:42:04 +0800 Subject: [PATCH 3/9] =?UTF-8?q?REPORT-4717=20[9.0=E5=86=85=E6=B5=8B]=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BB=9D=E5=AF=B9=E5=B8=83=E5=B1=80=E5=86=B3?= =?UTF-8?q?=E7=AD=96=E6=8A=A5=E8=A1=A8body=E6=A0=B7=E5=BC=8F=EF=BC=8C?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=88=97=E8=A1=A8=E4=BC=9A=E5=87=BA=E7=8E=B0?= =?UTF-8?q?=E4=B8=A4=E4=B8=AAbody=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/widget/ui/FormWidgetCardPane.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java b/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java index ac9e5848d..14d3eb37a 100644 --- a/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java +++ b/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java @@ -238,12 +238,15 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane { public void fireValueChanged() { XCreator creator = getXCreatorDedicated(); creator.firePropertyChange(); - designer.fireTargetModified(); + firePropertyEdit(); } public String getIconPath() { return StringUtils.EMPTY; } + public void firePropertyEdit() { + designer.getEditListenerTable().fireCreatorModified(DesignerEvent.CREATOR_EDITED); + } } From 814cf80da44c11062213377df9b8529233f92250 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Wed, 11 Oct 2017 15:00:17 +0800 Subject: [PATCH 4/9] =?UTF-8?q?REPORT-4888=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E4=BA=A4=E4=BA=92=E4=BF=AE=E6=94=B9=201.=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=A0=BC=E5=B1=9E=E6=80=A7-=E6=A0=B7=E5=BC=8F-=E5=8D=95?= =?UTF-8?q?=E5=85=83=E6=A0=BC=20=E5=9B=BE=E6=A0=87=E5=8F=8D=E7=99=BD=202.?= =?UTF-8?q?=E5=8D=95=E5=85=83=E6=A0=BC=E5=B1=9E=E6=80=A7-=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F-=E5=AF=B9=E9=BD=90=20=E5=9B=BE=E6=A0=87=E5=8F=8D?= =?UTF-8?q?=E7=99=BD=203.=E5=B7=A5=E5=85=B7=E6=A0=8F=E5=80=BE=E6=96=9C?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E5=9B=BE=E6=A0=87=E6=9B=BF=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cell/style/ReportFontItalicAction.java | 2 +- .../fr/design/gui/ibutton/UIToggleButton.java | 12 ++++++++++++ .../com/fr/design/gui/style/AlignmentPane.java | 14 +++++--------- .../src/com/fr/design/gui/style/BorderPane.java | 16 ++++++++-------- .../images/m_format/cellstyle/bottom_white.png | Bin 0 -> 178 bytes .../cellstyle/defaultAlignment_white.png | Bin 0 -> 124 bytes .../m_format/cellstyle/h_s_normal_white.png | Bin 0 -> 112 bytes .../m_format/cellstyle/horizontal_white.png | Bin 0 -> 187 bytes .../images/m_format/cellstyle/in_white.png | Bin 0 -> 167 bytes .../design/images/m_format/cellstyle/italic.png | Bin 221 -> 206 bytes .../images/m_format/cellstyle/left_white.png | Bin 0 -> 175 bytes .../images/m_format/cellstyle/out_white.png | Bin 0 -> 154 bytes .../images/m_format/cellstyle/right_white.png | Bin 0 -> 172 bytes .../images/m_format/cellstyle/top_white.png | Bin 0 -> 181 bytes .../cellstyle/v_center_normal_white.png | Bin 0 -> 121 bytes .../m_format/cellstyle/v_down_normal_white.png | Bin 0 -> 119 bytes .../m_format/cellstyle/v_top_normal_white.png | Bin 0 -> 123 bytes .../m_format/cellstyle/vertical_white.png | Bin 0 -> 186 bytes 18 files changed, 26 insertions(+), 18 deletions(-) create mode 100644 designer_base/src/com/fr/design/images/m_format/cellstyle/bottom_white.png create mode 100644 designer_base/src/com/fr/design/images/m_format/cellstyle/defaultAlignment_white.png create mode 100644 designer_base/src/com/fr/design/images/m_format/cellstyle/h_s_normal_white.png create mode 100644 designer_base/src/com/fr/design/images/m_format/cellstyle/horizontal_white.png create mode 100644 designer_base/src/com/fr/design/images/m_format/cellstyle/in_white.png create mode 100644 designer_base/src/com/fr/design/images/m_format/cellstyle/left_white.png create mode 100644 designer_base/src/com/fr/design/images/m_format/cellstyle/out_white.png create mode 100644 designer_base/src/com/fr/design/images/m_format/cellstyle/right_white.png create mode 100644 designer_base/src/com/fr/design/images/m_format/cellstyle/top_white.png create mode 100644 designer_base/src/com/fr/design/images/m_format/cellstyle/v_center_normal_white.png create mode 100644 designer_base/src/com/fr/design/images/m_format/cellstyle/v_down_normal_white.png create mode 100644 designer_base/src/com/fr/design/images/m_format/cellstyle/v_top_normal_white.png create mode 100644 designer_base/src/com/fr/design/images/m_format/cellstyle/vertical_white.png diff --git a/designer/src/com/fr/design/actions/cell/style/ReportFontItalicAction.java b/designer/src/com/fr/design/actions/cell/style/ReportFontItalicAction.java index 66e2d97cf..9fdf217da 100644 --- a/designer/src/com/fr/design/actions/cell/style/ReportFontItalicAction.java +++ b/designer/src/com/fr/design/actions/cell/style/ReportFontItalicAction.java @@ -22,7 +22,7 @@ public class ReportFontItalicAction extends ReportFontBoldAction { public ReportFontItalicAction(ElementCasePane t) { super(t); - this.setName(Inter.getLocText("FRFont-italic")); + this.setName(Inter.getLocText("FR-Designer-FRFont_Italic")); this.setSmallIcon(ICONS, true); } diff --git a/designer_base/src/com/fr/design/gui/ibutton/UIToggleButton.java b/designer_base/src/com/fr/design/gui/ibutton/UIToggleButton.java index 0a5351048..b47975b3f 100644 --- a/designer_base/src/com/fr/design/gui/ibutton/UIToggleButton.java +++ b/designer_base/src/com/fr/design/gui/ibutton/UIToggleButton.java @@ -76,6 +76,18 @@ public class UIToggleButton extends UIButton implements GlobalNameObserver{ super(icons[0], null, icons[1]); setSelectedIcon(icons[1]); setExtraPainted(true); + if (!needRelease) { + addActionListener(new AbstractAction() { + @Override + public void actionPerformed(ActionEvent e) { + if (UIToggleButton.super.isSelected()) { + UIToggleButton.super.setSelected(false); + } else { + UIToggleButton.super.setSelected(true); + } + } + }); + } addMouseListener(getMouseListener()); } diff --git a/designer_base/src/com/fr/design/gui/style/AlignmentPane.java b/designer_base/src/com/fr/design/gui/style/AlignmentPane.java index f0e760cfd..9939ab2e1 100644 --- a/designer_base/src/com/fr/design/gui/style/AlignmentPane.java +++ b/designer_base/src/com/fr/design/gui/style/AlignmentPane.java @@ -83,12 +83,8 @@ public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameO Icon[][] hAlignmentIconArray = {{BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal_white.png")}, {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal_white.png")}, {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal_white.png")}, - {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_s_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_s_normal.png")}, - {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/defaultAlignment.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/defaultAlignment.png")}}; -// BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"), -// BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png"), -// BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_s_normal.png"), -// BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/defaultAlignment.png")}; + {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_s_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_s_normal_white.png")}, + {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/defaultAlignment.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/defaultAlignment_white.png")}}; Integer[] hAlignment = new Integer[]{Constants.LEFT, Constants.CENTER, Constants.RIGHT, Integer.valueOf(Constants.DISTRIBUTED), Constants.NULL}; hAlignmentPane = new UIButtonGroup(hAlignmentIconArray, hAlignment); hAlignmentPane.setAllToolTips(new String[]{Inter.getLocText("FR-Designer-StyleAlignment_Tooltips_Left"), Inter.getLocText("FR-Designer-StyleAlignment_Tooltips_Center"), Inter.getLocText("FR-Designer-StyleAlignment_Tooltips_Right"), @@ -96,9 +92,9 @@ public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameO hPaneContainer = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0)); vPaneContainer = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0)); - Icon[] vAlignmentIconArray = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/v_top_normal.png"), - BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/v_center_normal.png"), - BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/v_down_normal.png")}; + Icon[][] vAlignmentIconArray = {{BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/v_top_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/v_top_normal_white.png")}, + {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/v_center_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/v_center_normal_white.png")}, + {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/v_down_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/v_down_normal_white.png")}}; Integer[] vAlignment = new Integer[]{Constants.TOP, Constants.CENTER, Constants.BOTTOM}; vAlignmentPane = new UIButtonGroup(vAlignmentIconArray, vAlignment); vAlignmentPane.setAllToolTips(new String[]{Inter.getLocText("FR-Designer-StyleAlignment_Tooltips_Top"), Inter.getLocText("FR-Designer-StyleAlignment_Tooltips_Center"), Inter.getLocText("FR-Designer-StyleAlignment_Tooltips_Bottom")}); diff --git a/designer_base/src/com/fr/design/gui/style/BorderPane.java b/designer_base/src/com/fr/design/gui/style/BorderPane.java index a78c4fd7e..e05d7f529 100644 --- a/designer_base/src/com/fr/design/gui/style/BorderPane.java +++ b/designer_base/src/com/fr/design/gui/style/BorderPane.java @@ -82,10 +82,10 @@ public class BorderPane extends AbstractBasicStylePane implements GlobalNameObse new Component[]{null, null}, new Component[]{new UILabel(Inter.getLocText("FR-Designer_Color") + " ", SwingConstants.LEFT), currentLineColorPane}, new Component[]{null, null}, - new Component[]{new UILabel(Inter.getLocText("FR-Designer_outBorder") + " ", SwingConstants.LEFT), outerToggleButton = new UIToggleButton(BaseUtils.readIcon("com/fr/design/images/m_format/out.png"))}, + new Component[]{new UILabel(Inter.getLocText("FR-Designer_outBorder") + " ", SwingConstants.LEFT), outerToggleButton = new UIToggleButton(new Icon[]{BaseUtils.readIcon("com/fr/design/images/m_format/out.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/out_white.png")}, false)}, new Component[]{null, externalPane}, new Component[]{null, null}, - new Component[]{new UILabel(Inter.getLocText("FR-Designer_inBorder") + " ", SwingConstants.LEFT), innerToggleButton = new UIToggleButton(BaseUtils.readIcon("com/fr/design/images/m_format/in.png"))}, + new Component[]{new UILabel(Inter.getLocText("FR-Designer_inBorder") + " ", SwingConstants.LEFT), innerToggleButton = new UIToggleButton(new Icon[]{BaseUtils.readIcon("com/fr/design/images/m_format/in.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/in_white.png")}, false)}, new Component[]{null, insidePane}, new Component[]{null, null} }; @@ -125,12 +125,12 @@ public class BorderPane extends AbstractBasicStylePane implements GlobalNameObse }; private void initButtonsWithIcon() { - topToggleButton = new UIToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/top.png")); - leftToggleButton = new UIToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/left.png")); - bottomToggleButton = new UIToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/bottom.png")); - rightToggleButton = new UIToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/right.png")); - horizontalToggleButton = new UIToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/horizontal.png")); - verticalToggleButton = new UIToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/vertical.png")); + topToggleButton = new UIToggleButton(new Icon[]{BaseUtils.readIcon("/com/fr/base/images/dialog/border/top.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/top_white.png")}, false); + leftToggleButton = new UIToggleButton(new Icon[]{BaseUtils.readIcon("/com/fr/base/images/dialog/border/left.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/left_white.png")}, false); + bottomToggleButton = new UIToggleButton(new Icon[]{BaseUtils.readIcon("/com/fr/base/images/dialog/border/bottom.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bottom_white.png")}, false); + rightToggleButton = new UIToggleButton(new Icon[]{BaseUtils.readIcon("/com/fr/base/images/dialog/border/right.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/right_white.png")}, false); + horizontalToggleButton = new UIToggleButton(new Icon[]{BaseUtils.readIcon("/com/fr/base/images/dialog/border/horizontal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/horizontal_white.png")}, false); + verticalToggleButton = new UIToggleButton(new Icon[]{BaseUtils.readIcon("/com/fr/base/images/dialog/border/vertical.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/vertical_white.png")}, false); this.currentLineCombo = new LineComboBox(CoreConstants.UNDERLINE_STYLE_ARRAY); this.currentLineColorPane = new NewColorSelectBox(100); } diff --git a/designer_base/src/com/fr/design/images/m_format/cellstyle/bottom_white.png b/designer_base/src/com/fr/design/images/m_format/cellstyle/bottom_white.png new file mode 100644 index 0000000000000000000000000000000000000000..a87cd273adae1ab66a261f9305a1249d4e2e9c4c GIT binary patch literal 178 zcmeAS@N?(olHy`uVBq!ia0vp^q9Dw{1|(OCFP#RY7>k44ofy`glX(f`rd}j_ugMTxo_)#GbxJ4Aa=O?vB?MmAuR3xnLn6UjQl*QLAyQs~ Uxx+1^8fXH8r>mdKI;Vst0IYT+rT_o{ literal 0 HcmV?d00001 diff --git a/designer_base/src/com/fr/design/images/m_format/cellstyle/h_s_normal_white.png b/designer_base/src/com/fr/design/images/m_format/cellstyle/h_s_normal_white.png new file mode 100644 index 0000000000000000000000000000000000000000..e776e2efc31896a1c94299c8f4fc27967773a0d0 GIT binary patch literal 112 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|v^-rLLo5W7 z6C^%02tH~4@8HnqFVWZ_Q>#(s7JJ};ffQS_B2U01RZAHL!wVAZ!Y@KT0(CKXy85}S Ib4q9e0LUmFDF6Tf literal 0 HcmV?d00001 diff --git a/designer_base/src/com/fr/design/images/m_format/cellstyle/horizontal_white.png b/designer_base/src/com/fr/design/images/m_format/cellstyle/horizontal_white.png new file mode 100644 index 0000000000000000000000000000000000000000..2be4ab8959b9efde826bf85c41bfccfc0bda2775 GIT binary patch literal 187 zcmeAS@N?(olHy`uVBq!ia0vp^q9Dw{1|(OCFP#RY7>k44ofy`glX(f`lzO^2hFA!` z4RYiyX& ztk|{MXW^|A-!|EbTvI-MH)2isr+4}3akEq3hkZ10*Dl*S@$K5OOpDjg&RQEuOLSeV kKO_43p!3|!8j0PEn|X78?Qq(n2y_60r>mdKI;Vst0CyBe;s5{u literal 0 HcmV?d00001 diff --git a/designer_base/src/com/fr/design/images/m_format/cellstyle/in_white.png b/designer_base/src/com/fr/design/images/m_format/cellstyle/in_white.png new file mode 100644 index 0000000000000000000000000000000000000000..6936456ad5958ae8d5cc163f10ad5bb92d7faa39 GIT binary patch literal 167 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|5vnMwJdD&TdYZm(q-S2`y|&_a+<@ zs$1do!$~+^;n8LG?Tqso6?9m3bELiV;FSrk%nV=n8kk-s|LFu; O#^CAd=d#Wzp$Py5F*(Wr literal 0 HcmV?d00001 diff --git a/designer_base/src/com/fr/design/images/m_format/cellstyle/italic.png b/designer_base/src/com/fr/design/images/m_format/cellstyle/italic.png index 6b36a5c1ac8a1ec68f29c00914ccbfef13eec912..5fbc0dc432b6049be54c593b3fffaf3b367a3108 100644 GIT binary patch delta 178 zcmV;j08Rhh0nP!CB!2;OQb$4nuFf3k0001pNkl7f5u;h@*&$)$L`hnImc)I$ztaD0e0ssbBL)QQR diff --git a/designer_base/src/com/fr/design/images/m_format/cellstyle/left_white.png b/designer_base/src/com/fr/design/images/m_format/cellstyle/left_white.png new file mode 100644 index 0000000000000000000000000000000000000000..ed850955f40af0733b8747be0a75aecde15b86e2 GIT binary patch literal 175 zcmeAS@N?(olHy`uVBq!ia0vp^q9Dw{1|(OCFP#RY7>k44ofy`glX(f`WO}+dhFAzD zCrGev5ct8*xKF`uf~N^@Ft;&#E8EOYB?qQuIN z<`eoK7!(^BFPTemhj1{v1uU2>&8^}hk++n=!zOED)UMj+K=Tk44ofy`glX(f`q05#}RsR9VQApPCM*-?0@CjD?>&>Nv$mRf~Q-FM62Z8Asymd97ATdbYD UcLis+9MDDvPgg&ebxsLQ0A&V0yZ`_I literal 0 HcmV?d00001 diff --git a/designer_base/src/com/fr/design/images/m_format/cellstyle/top_white.png b/designer_base/src/com/fr/design/images/m_format/cellstyle/top_white.png new file mode 100644 index 0000000000000000000000000000000000000000..7bf97dcf16af54b9226cc746b576bb1e5b06b7d3 GIT binary patch literal 181 zcmeAS@N?(olHy`uVBq!ia0vp^q9Dw{1|(OCFP#RY7>k44ofy`glX(f`bjdFY{JgqHdQ&=-|S9T}c#2WAW7jblF@w~7P`zrN3Bu*5~oZq%N zQ)})tjo@(UNWI%jAI@ugd+S@@Eny|z(~A1C$(KW{Y($E70o%s!SdvV^F`-L+$)llyS_T`dFmaw;L~g1U|yo~iBZ~sho!+p RLlUT+!PC{xWt~$(69AuCAF==d literal 0 HcmV?d00001 diff --git a/designer_base/src/com/fr/design/images/m_format/cellstyle/v_down_normal_white.png b/designer_base/src/com/fr/design/images/m_format/cellstyle/v_down_normal_white.png new file mode 100644 index 0000000000000000000000000000000000000000..d86816f87276afbbbcca6a5ad66b03f85a2a03d3 GIT binary patch literal 119 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|3_V>OLo5W7 z6C_v{D;h{RH3&ZG`0wD*mn_lPAXBSRgTe~DWM4fa_t}v literal 0 HcmV?d00001 diff --git a/designer_base/src/com/fr/design/images/m_format/cellstyle/v_top_normal_white.png b/designer_base/src/com/fr/design/images/m_format/cellstyle/v_top_normal_white.png new file mode 100644 index 0000000000000000000000000000000000000000..2ea2412eac10b325186c5055c6591c7a50ae723c GIT binary patch literal 123 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|Og&v3Lo5W7 z6BY;k44ofy`glX(f`lz6&0hFA!` z4RYi=pul1L`~JWGGE`F4xBc_E4*vvwlH}ifr-)6ud%2;Sj%pgDdQ}6+2`=q zu7X`tPrup!EmNj6Xx@kHWdZ^`^F`!MBP9$k{t%D5vaY{Ua=WqV#XDE5zjl836~1hT jXTQYL%C!d_i!I7rcqZ@NDVLWHw4cG#)z4*}Q$iB}_^Cy$ literal 0 HcmV?d00001 From f3e73419a49200363d7f643b2530119e6fd8e917 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Wed, 11 Oct 2017 15:04:49 +0800 Subject: [PATCH 5/9] =?UTF-8?q?REPORT-4888=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E4=BA=A4=E4=BA=92=E4=BF=AE=E6=94=B9=20=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E6=A0=8F=E5=80=BE=E6=96=9C=E6=8C=89=E9=92=AE=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E6=9B=BF=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/images/m_format/cellstyle/italic.png | Bin 206 -> 226 bytes .../images/m_format/cellstyle/italic_white.png | Bin 158 -> 190 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/designer_base/src/com/fr/design/images/m_format/cellstyle/italic.png b/designer_base/src/com/fr/design/images/m_format/cellstyle/italic.png index 5fbc0dc432b6049be54c593b3fffaf3b367a3108..5e48d763365f95de4ebff0e565ed07dc2efa3960 100644 GIT binary patch delta 185 zcmV;q07n1L0pbCWF@Ky%L_t(I5o2H&@_-Sa4~&gX{v*quJ$nX2JrlA5bT%6st149N z4mQmoIlKn^`t{cnq==D`VLOP%2Jjld$oL;@08k_823T5Jaso9vFfuZJXJutQfX#N0 z7)}@b{{7qG|Ns9WLk=82e*8Ph1^_jHo&WzoBTnao48`e!|1$p}2C%U)<28T_hTb?=dg7MF7zQP#&tS0@6f(|KS1`X`mqv T1HnI500000NkvXXu0mjfGV4b& diff --git a/designer_base/src/com/fr/design/images/m_format/cellstyle/italic_white.png b/designer_base/src/com/fr/design/images/m_format/cellstyle/italic_white.png index 936a3e7840ec699dd360a78dd735e3ac2b9ec9e7..e32c6eaefc2246ff6321ae94f979121ce6c9b020 100644 GIT binary patch delta 149 zcmV;G0BZl90loo{F@JbTL_t(I5o2H&@_-Sa5B>uIvOFUYAoD?NCUgNbzABV|2b*S) z93cZdp$2S+(ijxQ24I*7699Uj6NtY-F(*tMoyO+^2cTk*#sfhAe@E8{=0iFSnF>P2$L_t(I5o2H&1$aZ?|Ns9gKnw!6aVccNB>@%pgwoq_siW8c zTm~}$oy`fv-=LTimqL6lZ~$roX*|Hl$oQQc0|@#bm!V*BP{;!@2&mvyI4Vhb2mk;8 WjwtAJ^x0Sd0000 Date: Wed, 11 Oct 2017 16:05:12 +0800 Subject: [PATCH 6/9] =?UTF-8?q?REPORT-4992=20=E6=8F=92=E4=BB=B6=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E8=84=9A=E6=9C=ACindex.html=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/extra/LoginWebPane.java | 2 +- .../src/com/fr/design/extra/QQLoginWebPane.java | 2 +- .../src/com/fr/design/extra/WebViewDlgHelper.java | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/designer_base/src/com/fr/design/extra/LoginWebPane.java b/designer_base/src/com/fr/design/extra/LoginWebPane.java index ee0a3275a..a5138544c 100644 --- a/designer_base/src/com/fr/design/extra/LoginWebPane.java +++ b/designer_base/src/com/fr/design/extra/LoginWebPane.java @@ -27,7 +27,7 @@ public class LoginWebPane extends JFXPanel { LoginWebPane.this.setScene(scene); WebView webView = new WebView(); WebEngine webEngine = webView.getEngine(); - webEngine.load("file:///" + installHome + "/scripts/qqLogin/web/login.html"); + webEngine.load("file:///" + installHome + "/scripts/login.html"); webEngine.setOnAlert(new EventHandler>() { @Override public void handle(WebEvent event) { diff --git a/designer_base/src/com/fr/design/extra/QQLoginWebPane.java b/designer_base/src/com/fr/design/extra/QQLoginWebPane.java index 096f9bb25..82648531c 100644 --- a/designer_base/src/com/fr/design/extra/QQLoginWebPane.java +++ b/designer_base/src/com/fr/design/extra/QQLoginWebPane.java @@ -62,7 +62,7 @@ public class QQLoginWebPane extends JFXPanel { QQLoginWebPane.this.setScene(scene); final WebView webView = new WebView(); webEngine = webView.getEngine(); - url = "file:///" + installHome + "/scripts/qqLogin/web/qqLogin.html"; + url = "file:///" + installHome + "/scripts/qqLogin.html"; webEngine.load(url); final Stage primaryStage = new Stage(); diff --git a/designer_base/src/com/fr/design/extra/WebViewDlgHelper.java b/designer_base/src/com/fr/design/extra/WebViewDlgHelper.java index 43e1dbae5..cef4c2d96 100644 --- a/designer_base/src/com/fr/design/extra/WebViewDlgHelper.java +++ b/designer_base/src/com/fr/design/extra/WebViewDlgHelper.java @@ -37,7 +37,7 @@ public class WebViewDlgHelper { public static void createPluginDialog() { if (StableUtils.getMajorJavaVersion() >= VERSION_8) { - String relativePath = "/scripts/store/web/index.html"; + String relativePath = "/scripts/plugin.html"; String mainJsPath = StableUtils.pathJoin(installHome, relativePath); File file = new File(mainJsPath); if (!file.exists()) { @@ -52,7 +52,7 @@ public class WebViewDlgHelper { downloadShopScripts(SHOP_SCRIPTS); } } else { - String indexPath = "index.html"; + String indexPath = "plugin.html"; String mainIndexPath = StableUtils.pathJoin(installHome, indexPath); checkAndCopyMainFile(mainIndexPath, mainJsPath); showPluginDlg(mainIndexPath); @@ -73,7 +73,7 @@ public class WebViewDlgHelper { } /** - * 检查script文件夹中的index.html文件 + * 检查script文件夹中的plugin.html文件 * */ public static void checkAndCopyMainFile(String indexPath, String mainJsPath){ @@ -84,7 +84,7 @@ public class WebViewDlgHelper { } /** - * 將script文件夹中的index.html文件复制到webreport下 + * 將script文件夹中的plugin.html文件复制到webreport下 * */ public static void copyMainFile(String indexPath, String mainJsPath){ @@ -191,9 +191,9 @@ public class WebViewDlgHelper { try { if (get()) { - String relativePath = "/scripts/store/web/index.html"; + String relativePath = "/scripts/plugin.html"; IOUtils.unzip(new File(StableUtils.pathJoin(PluginConstants.DOWNLOAD_PATH, PluginConstants.TEMP_FILE)), installHome); - copyMainFile(StableUtils.pathJoin(installHome, "index.html"), StableUtils.pathJoin(installHome, relativePath)); + copyMainFile(StableUtils.pathJoin(installHome, "plugin.html"), StableUtils.pathJoin(installHome, relativePath)); // TODO: 2017/4/17 删除之前存放在安装目录下的script PluginStoreConstants.refreshProps(); // 下载完刷新一下版本号等 JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer-Plugin_Shop_Installed"), Inter.getLocText("FR-Designer_Tooltips"), JOptionPane.INFORMATION_MESSAGE); From 7f2b3eec2ab5278ba37ce503baee1cc94d688bf8 Mon Sep 17 00:00:00 2001 From: plough Date: Wed, 11 Oct 2017 16:06:21 +0800 Subject: [PATCH 7/9] =?UTF-8?q?REPORT-4978=20[9.0=E4=BA=8C=E8=BD=AE?= =?UTF-8?q?=E5=9B=9E=E5=BD=92]=E8=AE=BE=E8=AE=A1=E5=99=A8=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6=E8=AE=BE=E7=BD=AE=E7=95=8C=E9=9D=A2=EF=BC=8C=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6=E5=9B=BE=E6=A0=87=E6=98=BE=E7=A4=BA=E6=9C=89=E9=97=AE?= =?UTF-8?q?=E9=A2=98=EF=BC=8C=E5=B7=A6=E8=BE=B9=E8=A2=AB=E9=81=AE=E6=8C=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/gui/icombobox/UIComboBoxUI.java | 6 +++++- .../src/com/fr/design/mainframe/widget/UITreeComboBox.java | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/gui/icombobox/UIComboBoxUI.java b/designer_base/src/com/fr/design/gui/icombobox/UIComboBoxUI.java index cebf2a07a..9912594c8 100644 --- a/designer_base/src/com/fr/design/gui/icombobox/UIComboBoxUI.java +++ b/designer_base/src/com/fr/design/gui/icombobox/UIComboBoxUI.java @@ -94,6 +94,10 @@ public class UIComboBoxUI extends BasicComboBoxUI implements MouseListener { */ @Override public void paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus) { + paintCurrentValue(g, bounds, hasFocus, 0); + } + + public void paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus, int paddingLeft) { ListCellRenderer renderer = comboBox.getRenderer(); Component c; @@ -142,7 +146,7 @@ public class UIComboBoxUI extends BasicComboBoxUI implements MouseListener { int x = bounds.x, y = bounds.y, w = bounds.width, h = bounds.height; - currentValuePane.paintComponent(g, c, comboBox, x, y, w, h, shouldValidate); + currentValuePane.paintComponent(g, c, comboBox, x + paddingLeft, y, w, h, shouldValidate); } @Override diff --git a/designer_form/src/com/fr/design/mainframe/widget/UITreeComboBox.java b/designer_form/src/com/fr/design/mainframe/widget/UITreeComboBox.java index 31be76569..749bdceb7 100644 --- a/designer_form/src/com/fr/design/mainframe/widget/UITreeComboBox.java +++ b/designer_form/src/com/fr/design/mainframe/widget/UITreeComboBox.java @@ -121,6 +121,11 @@ public class UITreeComboBox extends UIComboBox { protected ComboPopup createPopup() { return new TreePopup(comboBox); } + + @Override + public void paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus) { + paintCurrentValue(g, bounds, hasFocus, 3); + } } class MotifJTreeComboBoxUI extends MotifComboBoxUI{ From 989c364f66638ff720c5f95176e626c33ccd8f80 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Wed, 11 Oct 2017 16:39:45 +0800 Subject: [PATCH 8/9] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=9B=BE=E8=A1=A8?= =?UTF-8?q?=E8=B6=85=E9=93=BE=E7=B1=BB=E5=9E=8B=E5=92=8C=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E6=A1=86=E6=8E=A5=E5=8F=A3=EF=BC=8C=E6=95=B4=E7=90=86=E5=9B=BE?= =?UTF-8?q?=E8=A1=A8=E8=B6=85=E9=93=BE=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/editor/ValueEditorPaneFactory.java | 10 +++++----- .../fr/design/hyperlink/ReportletHyperlinkPane.java | 8 ++++---- .../src/com/fr/design/hyperlink/WebHyperlinkPane.java | 8 ++++---- .../com/fr/design/javascript/JavaScriptImplPane.java | 8 ++++---- .../fr/design/javascript/ParameterJavaScriptPane.java | 8 ++++---- .../SeriesCondition/impl/ChartHyperPoplinkPane.java | 7 ++++--- .../impl/ChartHyperRelateCellLinkPane.java | 7 ++++--- .../impl/ChartHyperRelateFloatLinkPane.java | 7 ++++--- .../series/SeriesCondition/impl/FormHyperlinkPane.java | 7 ++++--- 9 files changed, 37 insertions(+), 33 deletions(-) diff --git a/designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java b/designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java index 2efa9012e..2da01d896 100644 --- a/designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java +++ b/designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java @@ -1,7 +1,7 @@ package com.fr.design.editor; import com.fr.base.Formula; -import com.fr.chart.chartattr.Plot; +import com.fr.base.chart.BasePlot; import com.fr.design.editor.editor.BooleanEditor; import com.fr.design.editor.editor.ColumnRowEditor; import com.fr.design.editor.editor.ColumnRowGroupEditor; @@ -202,7 +202,7 @@ public class ValueEditorPaneFactory { return createVallueEditorPaneWithUseType(paraUseType, null); } - public static ValueEditorPane createVallueEditorPaneWithUseType(int paraUseType, Plot plot) { + public static ValueEditorPane createVallueEditorPaneWithUseType(int paraUseType, BasePlot plot) { if (paraUseType == ParameterTableModel.NO_CHART_USE) { return createBasicValueEditorPane(); } else if (paraUseType == ParameterTableModel.FORM_NORMAL_USE) { @@ -218,7 +218,7 @@ public class ValueEditorPaneFactory { * @param plot plot类型 * @return 值编辑器 */ - public static ValueEditorPane createChartHotValueEditorPane(Plot plot) { + public static ValueEditorPane createChartHotValueEditorPane(BasePlot plot) { return createValueEditorPane(chartHotEditors(plot), StringUtils.EMPTY, StringUtils.EMPTY); } @@ -446,7 +446,7 @@ public class ValueEditorPaneFactory { * * @return 值编辑器 */ - public static Editor[] chartHotEditors(Plot plot) { + public static Editor[] chartHotEditors(BasePlot plot) { List list = createEditors4Chart(plot); list.add(new TextEditor()); @@ -467,7 +467,7 @@ public class ValueEditorPaneFactory { * * @return 值编辑器 */ - private static List createEditors4Chart(Plot plot) { + private static List createEditors4Chart(BasePlot plot) { List lists = new ArrayList(); if (plot == null) { return lists; diff --git a/designer_base/src/com/fr/design/hyperlink/ReportletHyperlinkPane.java b/designer_base/src/com/fr/design/hyperlink/ReportletHyperlinkPane.java index b893dad71..f2cf7e70c 100644 --- a/designer_base/src/com/fr/design/hyperlink/ReportletHyperlinkPane.java +++ b/designer_base/src/com/fr/design/hyperlink/ReportletHyperlinkPane.java @@ -2,7 +2,7 @@ package com.fr.design.hyperlink; import com.fr.base.BaseUtils; import com.fr.base.Parameter; -import com.fr.chart.chartattr.Plot; +import com.fr.base.chart.BasePlot; import com.fr.design.beans.BasicBeanPane; import com.fr.design.editor.ValueEditorPane; import com.fr.design.editor.ValueEditorPaneFactory; @@ -25,16 +25,16 @@ import java.awt.event.ActionEvent; import java.util.List; public class ReportletHyperlinkPane extends BasicBeanPane { - private Plot plot; + private BasePlot plot; private ReporletHyperNorthPane northPane; private ReportletParameterViewPane parameterViewPane = null; private UICheckBox extendParametersCheckBox; - protected Plot getPlot() { + protected BasePlot getPlot() { return plot; } - public ReportletHyperlinkPane(Plot plot) { + public ReportletHyperlinkPane(BasePlot plot) { super(); this.plot = plot; this.initComponents(); diff --git a/designer_base/src/com/fr/design/hyperlink/WebHyperlinkPane.java b/designer_base/src/com/fr/design/hyperlink/WebHyperlinkPane.java index 055ec23a1..2b225ac67 100644 --- a/designer_base/src/com/fr/design/hyperlink/WebHyperlinkPane.java +++ b/designer_base/src/com/fr/design/hyperlink/WebHyperlinkPane.java @@ -1,7 +1,7 @@ package com.fr.design.hyperlink; import com.fr.base.Parameter; -import com.fr.chart.chartattr.Plot; +import com.fr.base.chart.BasePlot; import com.fr.design.beans.BasicBeanPane; import com.fr.design.editor.ValueEditorPane; import com.fr.design.editor.ValueEditorPaneFactory; @@ -19,7 +19,7 @@ import java.awt.*; import java.util.List; public class WebHyperlinkPane extends BasicBeanPane { - private Plot plot; + private BasePlot plot; private WebHyperNorthPane northPane; private ReportletParameterViewPane parameterViewPane; @@ -28,7 +28,7 @@ public class WebHyperlinkPane extends BasicBeanPane { private UICheckBox extendParametersCheckBox; - protected Plot getPlot() { + protected BasePlot getPlot() { return plot; } @@ -37,7 +37,7 @@ public class WebHyperlinkPane extends BasicBeanPane { this.initComponents(); } - public WebHyperlinkPane(Plot plot) { + public WebHyperlinkPane(BasePlot plot) { super(); this.plot = plot; this.initComponents(); diff --git a/designer_base/src/com/fr/design/javascript/JavaScriptImplPane.java b/designer_base/src/com/fr/design/javascript/JavaScriptImplPane.java index dcdb4e6b5..f0adc6b19 100644 --- a/designer_base/src/com/fr/design/javascript/JavaScriptImplPane.java +++ b/designer_base/src/com/fr/design/javascript/JavaScriptImplPane.java @@ -1,7 +1,7 @@ package com.fr.design.javascript; import com.fr.base.Parameter; -import com.fr.chart.chartattr.Plot; +import com.fr.base.chart.BasePlot; import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.data.tabledata.tabledatapane.OneListTableModel; import com.fr.design.editor.ValueEditorPane; @@ -27,14 +27,14 @@ import java.util.HashSet; import java.util.List; public class JavaScriptImplPane extends FurtherBasicBeanPane { - private Plot plot; + private BasePlot plot; private UITextField itemNameTextField; private JSContentPane jsPane; private UITableEditorPane importedJsPane; private ReportletParameterViewPane parameterPane; private String[] defaultArgs; - protected Plot getPlot() { + protected BasePlot getPlot() { return plot; } @@ -42,7 +42,7 @@ public class JavaScriptImplPane extends FurtherBasicBeanPane { this(new String[0]); } - public JavaScriptImplPane(Plot plot) { + public JavaScriptImplPane(BasePlot plot) { this.plot = plot; this.defaultArgs = new String[0]; initComponents(); diff --git a/designer_base/src/com/fr/design/javascript/ParameterJavaScriptPane.java b/designer_base/src/com/fr/design/javascript/ParameterJavaScriptPane.java index 5a5067b10..cf3e0c76a 100644 --- a/designer_base/src/com/fr/design/javascript/ParameterJavaScriptPane.java +++ b/designer_base/src/com/fr/design/javascript/ParameterJavaScriptPane.java @@ -1,7 +1,7 @@ package com.fr.design.javascript; import com.fr.base.Parameter; -import com.fr.chart.chartattr.Plot; +import com.fr.base.chart.BasePlot; import com.fr.design.beans.BasicBeanPane; import com.fr.design.editor.ValueEditorPane; import com.fr.design.editor.ValueEditorPaneFactory; @@ -17,11 +17,11 @@ import java.awt.*; import java.util.List; public class ParameterJavaScriptPane extends BasicBeanPane { - private Plot plot; + private BasePlot plot; private UITextField itemNameTextField; private ReportletParameterViewPane parameterViewPane; - protected Plot getPlot() { + protected BasePlot getPlot() { return plot; } @@ -29,7 +29,7 @@ public class ParameterJavaScriptPane extends BasicBeanPane this(null); } - public ParameterJavaScriptPane(Plot plot){ + public ParameterJavaScriptPane(BasePlot plot){ this.plot = plot; this.setLayout(new BorderLayout()); parameterViewPane = new ReportletParameterViewPane(getChartParaType(), getValueEditorPane(), getValueEditorPane()); diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java index e49b9e1bb..d0ad6bf8e 100644 --- a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java @@ -1,6 +1,7 @@ package com.fr.design.chart.series.SeriesCondition.impl; import com.fr.base.chart.BaseChartCollection; +import com.fr.base.chart.BasePlot; import com.fr.chart.chartattr.Bar2DPlot; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.ChartCollection; @@ -34,9 +35,9 @@ public class ChartHyperPoplinkPane extends BasicBeanPane { private ChartHyperEditPane hyperEditPane; private ChartComponent chartComponent; - private Plot plot; + private BasePlot plot; - protected Plot getPlot() { + protected BasePlot getPlot() { return plot; } @@ -44,7 +45,7 @@ public class ChartHyperPoplinkPane extends BasicBeanPane { this(null); } - public ChartHyperPoplinkPane(Plot plot) { + public ChartHyperPoplinkPane(BasePlot plot) { this.plot = plot; this.setLayout(FRGUIPaneFactory.createM_BorderLayout()); diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateCellLinkPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateCellLinkPane.java index 0b6a91a06..b29585c23 100644 --- a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateCellLinkPane.java +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateCellLinkPane.java @@ -1,6 +1,7 @@ package com.fr.design.chart.series.SeriesCondition.impl; import com.fr.base.Utils; +import com.fr.base.chart.BasePlot; import com.fr.chart.chartattr.Plot; import com.fr.chart.web.ChartHyperRelateCellLink; import com.fr.design.beans.BasicBeanPane; @@ -32,9 +33,9 @@ public class ChartHyperRelateCellLinkPane extends BasicBeanPane { - private Plot plot; + private BasePlot plot; private ReportletParameterViewPane parameterViewPane; private FormHyperlinkNorthPane northPane; - protected Plot getPlot() { + protected BasePlot getPlot() { return plot; } - public FormHyperlinkPane(Plot plot) { + public FormHyperlinkPane(BasePlot plot) { super(); this.plot = plot; this.initComponents(); From cf0474e36d651eb573dc8bdb831f802565f8411b Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Wed, 11 Oct 2017 18:38:06 +0800 Subject: [PATCH 9/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gui/itableeditorpane/ParameterTableModel.java | 12 ------------ .../fr/design/hyperlink/ReportletHyperlinkPane.java | 4 ++-- .../com/fr/design/hyperlink/WebHyperlinkPane.java | 4 ++-- .../com/fr/design/javascript/JavaScriptImplPane.java | 4 ++-- .../design/javascript/ParameterJavaScriptPane.java | 4 ++-- .../SeriesCondition/impl/ChartHyperPoplinkPane.java | 5 ++--- .../impl/ChartHyperRelateCellLinkPane.java | 5 ++--- .../impl/ChartHyperRelateFloatLinkPane.java | 5 ++--- .../SeriesCondition/impl/FormHyperlinkPane.java | 5 ++--- 9 files changed, 16 insertions(+), 32 deletions(-) diff --git a/designer_base/src/com/fr/design/gui/itableeditorpane/ParameterTableModel.java b/designer_base/src/com/fr/design/gui/itableeditorpane/ParameterTableModel.java index 488c5ee66..debfc7ced 100644 --- a/designer_base/src/com/fr/design/gui/itableeditorpane/ParameterTableModel.java +++ b/designer_base/src/com/fr/design/gui/itableeditorpane/ParameterTableModel.java @@ -26,19 +26,7 @@ public class ParameterTableModel extends UITableModelAdapter public static final int NO_CHART_USE = 0; public static final int CHART_NORMAL_USE = 1; - public static final int CHART_MAP_USE = 2; - public static final int CHART_PIE_USE = 3; - public static final int CHART__XY_USE = 4; - public static final int CHART_BUBBLE_USE = 5; - public static final int CHART_STOCK_USE = 6; - public static final int CHART_NO_USE = 7; - public static final int CHART_GIS_USE = 8; - public static final int CHART_GANTT_USE = 9; - public static final int CHART_METER_USE = 10; public static final int FORM_NORMAL_USE = -1; - public static final int FORM_ELEMENTCASE_USE = 11; - public static final int FORM_CHART_USE = 12; - public static final int VAN_CHART_USE = 20; private static final long serialVersionUID = 1L; protected Component component = null; //指定确认对话框的父窗口,bug40340 diff --git a/designer_base/src/com/fr/design/hyperlink/ReportletHyperlinkPane.java b/designer_base/src/com/fr/design/hyperlink/ReportletHyperlinkPane.java index f2cf7e70c..395c6dbd8 100644 --- a/designer_base/src/com/fr/design/hyperlink/ReportletHyperlinkPane.java +++ b/designer_base/src/com/fr/design/hyperlink/ReportletHyperlinkPane.java @@ -67,7 +67,7 @@ public class ReportletHyperlinkPane extends BasicBeanPane { } protected int getChartParaType() { - return plot != null ? plot.getHyperLinkParaType() : ParameterTableModel.NO_CHART_USE; + return plot != null ? ParameterTableModel.CHART_NORMAL_USE : ParameterTableModel.NO_CHART_USE; } protected ValueEditorPane getValueEditorPane() { @@ -75,7 +75,7 @@ public class ReportletHyperlinkPane extends BasicBeanPane { } protected boolean needRenamePane(){ - return getChartParaType() != ParameterTableModel.NO_CHART_USE && getChartParaType() != ParameterTableModel.VAN_CHART_USE ; + return plot != null && plot.needRenameHyperLinkPane(); } @Override diff --git a/designer_base/src/com/fr/design/hyperlink/WebHyperlinkPane.java b/designer_base/src/com/fr/design/hyperlink/WebHyperlinkPane.java index 2b225ac67..c3185d392 100644 --- a/designer_base/src/com/fr/design/hyperlink/WebHyperlinkPane.java +++ b/designer_base/src/com/fr/design/hyperlink/WebHyperlinkPane.java @@ -65,7 +65,7 @@ public class WebHyperlinkPane extends BasicBeanPane { } protected int getChartParaType() { - return plot != null ? plot.getHyperLinkParaType() : ParameterTableModel.NO_CHART_USE; + return plot != null ? ParameterTableModel.CHART_NORMAL_USE : ParameterTableModel.NO_CHART_USE; } protected ValueEditorPane getValueEditorPane() { @@ -73,7 +73,7 @@ public class WebHyperlinkPane extends BasicBeanPane { } protected boolean needRenamePane(){ - return getChartParaType() != ParameterTableModel.NO_CHART_USE && getChartParaType() != ParameterTableModel.VAN_CHART_USE ; + return plot != null && plot.needRenameHyperLinkPane(); } @Override diff --git a/designer_base/src/com/fr/design/javascript/JavaScriptImplPane.java b/designer_base/src/com/fr/design/javascript/JavaScriptImplPane.java index f0adc6b19..c110471a3 100644 --- a/designer_base/src/com/fr/design/javascript/JavaScriptImplPane.java +++ b/designer_base/src/com/fr/design/javascript/JavaScriptImplPane.java @@ -110,7 +110,7 @@ public class JavaScriptImplPane extends FurtherBasicBeanPane { } protected int getChartParaType() { - return plot != null ? plot.getHyperLinkParaType() : ParameterTableModel.NO_CHART_USE; + return plot != null ? ParameterTableModel.CHART_NORMAL_USE : ParameterTableModel.NO_CHART_USE; } protected ValueEditorPane getValueEditorPane() { @@ -118,7 +118,7 @@ public class JavaScriptImplPane extends FurtherBasicBeanPane { } protected boolean needRenamePane(){ - return getChartParaType() != ParameterTableModel.NO_CHART_USE && getChartParaType() != ParameterTableModel.VAN_CHART_USE ; + return plot != null && plot.needRenameHyperLinkPane(); } /** diff --git a/designer_base/src/com/fr/design/javascript/ParameterJavaScriptPane.java b/designer_base/src/com/fr/design/javascript/ParameterJavaScriptPane.java index cf3e0c76a..353fd887d 100644 --- a/designer_base/src/com/fr/design/javascript/ParameterJavaScriptPane.java +++ b/designer_base/src/com/fr/design/javascript/ParameterJavaScriptPane.java @@ -41,7 +41,7 @@ public class ParameterJavaScriptPane extends BasicBeanPane } protected int getChartParaType() { - return plot != null ? plot.getHyperLinkParaType() : ParameterTableModel.NO_CHART_USE; + return plot != null ? ParameterTableModel.CHART_NORMAL_USE : ParameterTableModel.NO_CHART_USE; } protected ValueEditorPane getValueEditorPane() { @@ -49,7 +49,7 @@ public class ParameterJavaScriptPane extends BasicBeanPane } protected boolean needRenamePane(){ - return getChartParaType() != ParameterTableModel.NO_CHART_USE && getChartParaType() != ParameterTableModel.VAN_CHART_USE ; + return plot != null && plot.needRenameHyperLinkPane(); } @Override diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java index d0ad6bf8e..f0669a99e 100644 --- a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java @@ -5,7 +5,6 @@ import com.fr.base.chart.BasePlot; import com.fr.chart.chartattr.Bar2DPlot; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.ChartCollection; -import com.fr.chart.chartattr.Plot; import com.fr.chart.charttypes.ChartTypeManager; import com.fr.chart.web.ChartHyperPoplink; import com.fr.design.beans.BasicBeanPane; @@ -89,7 +88,7 @@ public class ChartHyperPoplinkPane extends BasicBeanPane { } protected int getChartParaType() { - return plot != null ? plot.getHyperLinkParaType() : ParameterTableModel.NO_CHART_USE; + return plot != null ? ParameterTableModel.CHART_NORMAL_USE : ParameterTableModel.NO_CHART_USE; } protected ValueEditorPane getValueEditorPane() { @@ -97,7 +96,7 @@ public class ChartHyperPoplinkPane extends BasicBeanPane { } protected boolean needRenamePane(){ - return getChartParaType() != ParameterTableModel.NO_CHART_USE && getChartParaType() != ParameterTableModel.VAN_CHART_USE ; + return plot != null && plot.needRenameHyperLinkPane(); } @Override diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateCellLinkPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateCellLinkPane.java index b29585c23..6d535e487 100644 --- a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateCellLinkPane.java +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateCellLinkPane.java @@ -2,7 +2,6 @@ package com.fr.design.chart.series.SeriesCondition.impl; import com.fr.base.Utils; import com.fr.base.chart.BasePlot; -import com.fr.chart.chartattr.Plot; import com.fr.chart.web.ChartHyperRelateCellLink; import com.fr.design.beans.BasicBeanPane; import com.fr.design.editor.ValueEditorPane; @@ -70,7 +69,7 @@ public class ChartHyperRelateCellLinkPane extends BasicBeanPane { } protected int getChartParaType() { - return plot != null ? plot.getHyperLinkParaType() : ParameterTableModel.NO_CHART_USE; + return plot != null ? ParameterTableModel.CHART_NORMAL_USE : ParameterTableModel.NO_CHART_USE; } protected ValueEditorPane getValueEditorPane() { @@ -65,7 +64,7 @@ public class FormHyperlinkPane extends BasicBeanPane { } protected boolean needRenamePane(){ - return getChartParaType() != ParameterTableModel.NO_CHART_USE && getChartParaType() != ParameterTableModel.VAN_CHART_USE ; + return plot != null && plot.needRenameHyperLinkPane(); } protected int getHyperlinkType() {