Browse Source

Merge branch 'release/9.0' of http://www.cloud.finedevelop.com:2015/scm/~zheng/design into release/9.0

master
fr_shine 7 years ago
parent
commit
865bbf6814
  1. 44
      designer/designer.iml
  2. 221
      designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java
  3. 6
      designer_base/src/com/fr/design/gui/controlpane/AbstractNameableCreator.java
  4. 6
      designer_base/src/com/fr/design/gui/controlpane/NameableCreator.java
  5. 8
      designer_base/src/com/fr/design/gui/frpane/UICorrelationComboBoxPane.java
  6. 38
      designer_base/src/com/fr/design/gui/imenutable/UIMenuTable.java
  7. 11
      designer_base/src/com/fr/design/gui/itableeditorpane/ParameterTableModel.java
  8. 79
      designer_base/src/com/fr/design/hyperlink/ReportletHyperlinkPane.java
  9. 77
      designer_base/src/com/fr/design/hyperlink/WebHyperlinkPane.java
  10. 95
      designer_base/src/com/fr/design/javascript/JavaScriptImplPane.java
  11. 84
      designer_base/src/com/fr/design/javascript/ParameterJavaScriptPane.java
  12. 8
      designer_base/src/com/fr/env/RemoteEnv.java
  13. 81
      designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java
  14. 80
      designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateCellLinkPane.java
  15. 77
      designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateFloatLinkPane.java
  16. 75
      designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/FormHyperlinkPane.java
  17. 15
      designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartDesignerInteractivePane.java
  18. 235
      designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartInteractivePane.java
  19. 59
      designer_chart/src/com/fr/plugin/chart/custom/component/VanChartHyperLinkPane.java
  20. 15
      designer_chart/src/com/fr/plugin/chart/designer/component/ChartUIMenuNameableCreator.java
  21. 1096
      designer_chart/src/com/fr/plugin/chart/designer/other/HyperlinkMapFactory.java
  22. 6
      designer_chart/src/com/fr/plugin/chart/drillmap/designer/other/VanChartCatalogHyperLinkPane.java
  23. 9
      designer_chart/src/com/fr/plugin/chart/map/designer/other/VanChartMapHyperLinkPane.java
  24. 16
      designer_form/src/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java

44
designer/designer.iml

@ -1,44 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="designer_base" />
<orderEntry type="module" module-name="designer_form" />
<orderEntry type="module" module-name="designer_chart" />
<orderEntry type="module" module-name="designer_chart" />
<orderEntry type="module" module-name="designer_base" />
<orderEntry type="module" module-name="designer_form" />
<orderEntry type="module" module-name="base" />
<orderEntry type="module" module-name="base-basic" />
<orderEntry type="module" module-name="base-calculate" />
<orderEntry type="module" module-name="base-data" />
<orderEntry type="module" module-name="base-file" />
<orderEntry type="module" module-name="base-performance" />
<orderEntry type="module" module-name="base-plugin-engine" />
<orderEntry type="module" module-name="base-stable" />
<orderEntry type="module" module-name="chart-base" />
<orderEntry type="module" module-name="chart-chartattr" />
<orderEntry type="module" module-name="chart-chartdata" />
<orderEntry type="module" module-name="chart-chartglyph" />
<orderEntry type="module" module-name="chart-web" />
<orderEntry type="module" module-name="engine" />
<orderEntry type="module" module-name="engine-cross" />
<orderEntry type="module" module-name="engine-enhancement" />
<orderEntry type="module" module-name="engine-page" />
<orderEntry type="module" module-name="engine-remote" />
<orderEntry type="module" module-name="engine-view" />
<orderEntry type="module" module-name="engine-write" />
<orderEntry type="module" module-name="fmobile" />
<orderEntry type="module" module-name="form" />
<orderEntry type="module" module-name="fsbakrestore" />
<orderEntry type="module" module-name="fschedule" />
<orderEntry type="module" module-name="fservice" />
<orderEntry type="module" module-name="fsmonitor" />
<orderEntry type="library" name="lib" level="project" />
</component>
</module>

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

@ -1,17 +1,36 @@
package com.fr.design.editor;
import com.fr.base.Formula;
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;
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.SpinnerIntegerEditor;
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 {
@ -180,23 +199,27 @@ public class ValueEditorPaneFactory {
* @return 值编辑器
*/
public static ValueEditorPane createVallueEditorPaneWithUseType(int paraUseType) {
return createVallueEditorPaneWithUseType(paraUseType, null);
}
public static ValueEditorPane createVallueEditorPaneWithUseType(int paraUseType, BasePlot 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(BasePlot plot) {
return createValueEditorPane(chartHotEditors(plot), StringUtils.EMPTY, StringUtils.EMPTY);
}
/**
@ -421,11 +444,10 @@ public class ValueEditorPaneFactory {
/**
* 图表热点的一些编辑器
*
* @param paraUseType 参数类型
* @return 值编辑器
*/
public static Editor[] chartHotEditors(int paraUseType) {
List<Editor> list = createEditors4Chart(paraUseType);
public static Editor[] chartHotEditors(BasePlot plot) {
List<Editor> list = createEditors4Chart(plot);
list.add(new TextEditor());
list.add(new IntegerEditor());
@ -443,179 +465,22 @@ public class ValueEditorPaneFactory {
/**
* 为图表创建编辑器.
*
* @param paraUseType 参数类型
* @return 值编辑器
*/
private static List<Editor> createEditors4Chart(int paraUseType) {
switch (paraUseType) {
case ParameterTableModel.CHART_PIE_USE:
return getPieEditor();
case ParameterTableModel.CHART_MAP_USE:
return getMapEditor();
case ParameterTableModel.CHART_GIS_USE:
return getGisEditor();
case ParameterTableModel.CHART__XY_USE:
return getXYEditor();
case ParameterTableModel.CHART_BUBBLE_USE:
return getBubbbleEdtor();
case ParameterTableModel.CHART_NO_USE:
return getChartNoUseEditor();
case ParameterTableModel.CHART_METER_USE:
return getMeterEditor();
case ParameterTableModel.CHART_STOCK_USE:
return getStockEditor();
case ParameterTableModel.CHART_GANTT_USE:
return getGanttEditor();
case ParameterTableModel.FORM_ELEMENTCASE_USE:
return getFormElementCaseEditor();
case ParameterTableModel.FORM_CHART_USE:
return getFormChartEditor();
default:
return getChartEditor();
}
}
private static List<Editor> 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<Editor> lists = new ArrayList<Editor>();
lists.add(cate);
lists.add(value);
return lists;
}
private static List<Editor> 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<Editor> lists = new ArrayList<Editor>();
lists.add(series);
lists.add(value);
return lists;
}
private static List<Editor> 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<Editor> lists = new ArrayList<Editor>();
lists.add(chartAddress);
lists.add(addressName);
lists.add(areaValue);
return lists;
}
private static List<Editor> 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);
private static List<Editor> createEditors4Chart(BasePlot plot) {
List<Editor> lists = new ArrayList<Editor>();
lists.add(projectid);
lists.add(step);
return lists;
}
private static List<Editor> 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<Editor> lists = new ArrayList<Editor>();
lists.add(series);
lists.add(value);
return lists;
}
private static List<Editor> getStockEditor() {
List<Editor> lists = new ArrayList<Editor>();
return lists;
}
private static List<Editor> 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<Editor> lists = new ArrayList<Editor>();
lists.add(series);
lists.add(value);
return lists;
}
private static List<Editor> getChartNoUseEditor() {
List<Editor> lists = new ArrayList<Editor>();
return lists;
}
private static List<Editor> 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<Editor> lists = new ArrayList<Editor>();
lists.add(areaName);
lists.add(areaValue);
return lists;
}
private static List<Editor> 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<Editor> lists = new ArrayList<Editor>();
lists.add(cate);
lists.add(series);
lists.add(value);
return lists;
}
private static List<Editor> getFormElementCaseEditor() {
List<Editor> lists = new ArrayList<Editor>();
return lists;
}
private static List<Editor> 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<Editor> lists = new ArrayList<Editor>();
lists.add(cate);
lists.add(series);
lists.add(value);
if (plot == null) {
return lists;
}
HashMap<String, Formula> map = plot.getHyperLinkEditorMap();
Iterator<Map.Entry<String, Formula>> entries = map.entrySet().iterator();
while (entries.hasNext()) {
Map.Entry<String, Formula> entry = entries.next();
ConstantsEditor editor = new ConstantsEditor(entry.getKey(), entry.getValue());
editor.setEnabled(false);
lists.add(editor);
}
return lists;
}

6
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<? extends JavaScript> getHyperlink() {
return this.clazzOfObject;
}
/**
* get clazzOfEditor
* @return

6
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 <? extends JavaScript> getHyperlink();
public boolean isNeedParameterWhenPopulateJControlPane();
}

8
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<UIMenuNameableCreator> values;
private List<? extends UIMenuNameableCreator> values;
private UIObserverListener uiObserverListener;
public UICorrelationComboBoxPane() {
@ -78,7 +78,7 @@ public class UICorrelationComboBoxPane extends JPanel implements UIObserver {
* 刷新下拉列表和按钮
* @param values 下拉列表里的值
*/
public void refreshMenuAndAddMenuAction(List<UIMenuNameableCreator> values) {
public void refreshMenuAndAddMenuAction(List<? extends UIMenuNameableCreator> values) {
if (values == null || values.isEmpty()) {
return;
}
@ -378,13 +378,13 @@ public class UICorrelationComboBoxPane extends JPanel implements UIObserver {
content.setLayout(new BorderLayout());
List<UIMenuNameableCreator> data = new ArrayList<UIMenuNameableCreator>();
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);

38
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<UIMenuNameableCreator> data = new ArrayList<UIMenuNameableCreator>();
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);

11
designer_base/src/com/fr/design/gui/itableeditorpane/ParameterTableModel.java

@ -26,18 +26,7 @@ public class ParameterTableModel extends UITableModelAdapter<ParameterProvider>
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;
private static final long serialVersionUID = 1L;
protected Component component = null; //指定确认对话框的父窗口,bug40340

79
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.base.chart.BasePlot;
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<ReportletHyperlink> {
private BasePlot plot;
private ReporletHyperNorthPane northPane;
private ReportletParameterViewPane parameterViewPane = null;
private UICheckBox extendParametersCheckBox;
protected BasePlot getPlot() {
return plot;
}
public ReportletHyperlinkPane(BasePlot plot) {
super();
this.plot = plot;
this.initComponents();
}
public ReportletHyperlinkPane() {
super();
this.initComponents();
@ -55,15 +67,15 @@ public class ReportletHyperlinkPane extends BasicBeanPane<ReportletHyperlink> {
}
protected int getChartParaType() {
return ParameterTableModel.NO_CHART_USE;
return plot != null ? ParameterTableModel.CHART_NORMAL_USE : 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 plot != null && plot.needRenameHyperLinkPane();
}
@Override
@ -148,65 +160,6 @@ public class ReportletHyperlinkPane extends BasicBeanPane<ReportletHyperlink> {
}
}
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;
}

77
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.base.chart.BasePlot;
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<WebHyperlink> {
private BasePlot plot;
private WebHyperNorthPane northPane;
private ReportletParameterViewPane parameterViewPane;
@ -25,11 +27,21 @@ public class WebHyperlinkPane extends BasicBeanPane<WebHyperlink> {
private UICheckBox useCJKCheckBox;
private UICheckBox extendParametersCheckBox;
protected BasePlot getPlot() {
return plot;
}
public WebHyperlinkPane() {
super();
this.initComponents();
}
public WebHyperlinkPane(BasePlot plot) {
super();
this.plot = plot;
this.initComponents();
}
protected void initComponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
@ -53,15 +65,15 @@ public class WebHyperlinkPane extends BasicBeanPane<WebHyperlink> {
}
protected int getChartParaType() {
return ParameterTableModel.NO_CHART_USE;
return plot != null ? ParameterTableModel.CHART_NORMAL_USE : 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 plot != null && plot.needRenameHyperLinkPane();
}
@Override
@ -111,63 +123,6 @@ public class WebHyperlinkPane extends BasicBeanPane<WebHyperlink> {
}
}
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;
}

95
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.base.chart.BasePlot;
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<JavaScriptImpl> {
private BasePlot plot;
private UITextField itemNameTextField;
private JSContentPane jsPane;
private UITableEditorPane<String> importedJsPane;
private ReportletParameterViewPane parameterPane;
private String[] defaultArgs;
protected BasePlot getPlot() {
return plot;
}
public JavaScriptImplPane() {
this(new String[0]);
}
public JavaScriptImplPane(BasePlot 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<JavaScriptImpl> {
});
OneListTableModel<String> model = new OneListTableModel<String>(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<JavaScriptImpl> {
importedJsPane = new UITableEditorPane<String>(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<JavaScriptImpl> {
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 ? ParameterTableModel.CHART_NORMAL_USE : 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 plot != null && plot.needRenameHyperLinkPane();
}
/**
*参数改变
@ -216,62 +233,6 @@ public class JavaScriptImplPane extends FurtherBasicBeanPane<JavaScriptImpl> {
}
}
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 判断目标

84
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.base.chart.BasePlot;
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<ParameterJavaScript> {
private BasePlot plot;
private UITextField itemNameTextField;
private ReportletParameterViewPane parameterViewPane;
public ParameterJavaScriptPane(){
protected BasePlot getPlot() {
return plot;
}
public ParameterJavaScriptPane(){
this(null);
}
public ParameterJavaScriptPane(BasePlot 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<ParameterJavaScript>
this.add(GUICoreUtils.createNamedPane(itemNameTextField, Inter.getLocText("Name") + ":"), BorderLayout.NORTH);
}
}
protected int getChartParaType() {
return ParameterTableModel.NO_CHART_USE;
}
protected int getChartParaType() {
return plot != null ? ParameterTableModel.CHART_NORMAL_USE : 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 plot != null && plot.needRenameHyperLinkPane();
}
@Override
@ -86,61 +97,4 @@ public class ParameterJavaScriptPane extends BasicBeanPane<ParameterJavaScript>
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;
}
}
}

8
designer_base/src/com/fr/env/RemoteEnv.java vendored

@ -29,11 +29,7 @@ import com.fr.file.CacheManager;
import com.fr.file.DatasourceManager;
import com.fr.file.DatasourceManagerProvider;
import com.fr.file.filetree.FileNode;
import com.fr.general.ComparatorUtils;
import com.fr.general.FRLogger;
import com.fr.general.IOUtils;
import com.fr.general.Inter;
import com.fr.general.LogRecordTime;
import com.fr.general.*;
import com.fr.general.http.HttpClient;
import com.fr.json.JSONArray;
import com.fr.json.JSONException;
@ -1839,7 +1835,7 @@ public class RemoteEnv extends AbstractEnv {
if (input == null) {
return;
}
LogRecordTime[] records = DavXMLUtils.readXMLLogRecords(input);
LogRecordTime[] records = LogUtils.readXMLLogRecords(input);
for (LogRecordTime logRecordTime : records) {
//TODO
}

81
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;
@ -32,8 +33,19 @@ public class ChartHyperPoplinkPane extends BasicBeanPane<ChartHyperPoplink> {
private UITextField itemNameTextField;
private ChartHyperEditPane hyperEditPane;
private ChartComponent chartComponent;
private BasePlot plot;
protected BasePlot getPlot() {
return plot;
}
public ChartHyperPoplinkPane() {
this(null);
}
public ChartHyperPoplinkPane(BasePlot plot) {
this.plot = plot;
this.setLayout(FRGUIPaneFactory.createM_BorderLayout());
if(this.needRenamePane()){
@ -75,21 +87,17 @@ public class ChartHyperPoplinkPane extends BasicBeanPane<ChartHyperPoplink> {
return cc;
}
protected int getChartParaType() {
return ParameterTableModel.CHART_NORMAL_USE;
protected int getChartParaType() {
return plot != null ? ParameterTableModel.CHART_NORMAL_USE : 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 plot != null && plot.needRenameHyperLinkPane();
}
@Override
protected String title4PopupWindow() {
@ -143,55 +151,4 @@ public class ChartHyperPoplinkPane extends BasicBeanPane<ChartHyperPoplink> {
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;
}
}
}

80
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.web.ChartHyperRelateCellLink;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.editor.ValueEditorPane;
@ -30,11 +31,22 @@ public class ChartHyperRelateCellLinkPane extends BasicBeanPane<ChartHyperRelate
private UITextField itemNameTextField;
private ColumnRowVerticalPane colRowPane;
private ReportletParameterViewPane parameterViewPane;
private BasePlot plot;
protected BasePlot getPlot() {
return plot;
}
public ChartHyperRelateCellLinkPane() {
this.initComponent();
}
public ChartHyperRelateCellLinkPane(BasePlot plot) {
this.plot = plot;
this.initComponent();
}
private void initComponent() {
this.setLayout(FRGUIPaneFactory.createM_BorderLayout());
if(needRenamePane()){
@ -55,22 +67,18 @@ public class ChartHyperRelateCellLinkPane extends BasicBeanPane<ChartHyperRelate
parameterViewPane.setPreferredSize(new Dimension(500, 200));
this.add(parameterViewPane, BorderLayout.SOUTH);
}
protected int getChartParaType() {
return ParameterTableModel.CHART_NORMAL_USE;
return plot != null ? ParameterTableModel.CHART_NORMAL_USE : 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 plot != null && plot.needRenameHyperLinkPane();
}
@Override
public void populateBean(ChartHyperRelateCellLink ob) {
@ -135,54 +143,4 @@ public class ChartHyperRelateCellLinkPane extends BasicBeanPane<ChartHyperRelate
}
}
public static class CHART_MAP extends ChartHyperRelateCellLinkPane {
protected int getChartParaType() {
return ParameterTableModel.CHART_MAP_USE;
}
}
public static class CHART_GIS extends ChartHyperRelateCellLinkPane {
protected int getChartParaType() {
return ParameterTableModel.CHART_GIS_USE;
}
}
public static class CHART_PIE extends ChartHyperRelateCellLinkPane {
@Override
protected int getChartParaType() {
return ParameterTableModel.CHART_PIE_USE;
}
};
public static class CHART_XY extends ChartHyperRelateCellLinkPane {
protected int getChartParaType() {
return ParameterTableModel.CHART__XY_USE;
}
}
public static class CHART_BUBBLE extends ChartHyperRelateCellLinkPane {
protected int getChartParaType() {
return ParameterTableModel.CHART_BUBBLE_USE;
}
}
public static class CHART_STOCK extends ChartHyperRelateCellLinkPane {
protected int getChartParaType() {
return ParameterTableModel.CHART_STOCK_USE;
}
}
public static class CHART_GANTT extends ChartHyperRelateCellLinkPane {
protected int getChartParaType() {
return ParameterTableModel.CHART_GANTT_USE;
}
}
public static class CHART_METER extends ChartHyperRelateCellLinkPane {
protected int getChartParaType() {
return ParameterTableModel.CHART_METER_USE;
}
}
}

77
designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateFloatLinkPane.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.web.ChartHyperRelateFloatLink;
import com.fr.design.DesignModelAdapter;
import com.fr.design.beans.BasicBeanPane;
@ -36,10 +37,22 @@ public class ChartHyperRelateFloatLinkPane extends BasicBeanPane<ChartHyperRelat
private UIComboBox floatNameBox;
private ReportletParameterViewPane parameterViewPane;
private BasePlot plot;
protected BasePlot getPlot() {
return plot;
}
public ChartHyperRelateFloatLinkPane() {
this.initComponent();
}
public ChartHyperRelateFloatLinkPane(BasePlot plot) {
this.plot = plot;
this.initComponent();
}
private void initComponent() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
@ -72,22 +85,18 @@ public class ChartHyperRelateFloatLinkPane extends BasicBeanPane<ChartHyperRelat
parameterViewPane.setPreferredSize(new Dimension(500, 200));
this.add(parameterViewPane, BorderLayout.SOUTH);
}
protected int getChartParaType() {
return ParameterTableModel.CHART_NORMAL_USE;
return plot != null ? ParameterTableModel.CHART_NORMAL_USE : 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 plot != null && plot.needRenameHyperLinkPane();
}
private String[] getFloatNames() {
DesignModelAdapter adapter = DesignModelAdapter.getCurrentModelAdapter();
@ -156,52 +165,4 @@ public class ChartHyperRelateFloatLinkPane extends BasicBeanPane<ChartHyperRelat
return false;
}
}
public static final class CHART_MAP extends ChartHyperRelateFloatLinkPane {
protected int getChartParaType() {
return ParameterTableModel.CHART_MAP_USE;
}
}
public static final class CHART_GIS extends ChartHyperRelateFloatLinkPane {
protected int getChartParaType() {
return ParameterTableModel.CHART_GIS_USE;
}
}
public static final class CHART_PIE extends ChartHyperRelateFloatLinkPane {
protected int getChartParaType() {
return ParameterTableModel.CHART_PIE_USE;
}
}
public static class CHART_XY extends ChartHyperRelateFloatLinkPane {
protected int getChartParaType() {
return ParameterTableModel.CHART__XY_USE;
}
}
public static class CHART_BUBBLE extends ChartHyperRelateFloatLinkPane {
protected int getChartParaType() {
return ParameterTableModel.CHART_BUBBLE_USE;
}
}
public static class CHART_STOCK extends ChartHyperRelateFloatLinkPane {
protected int getChartParaType() {
return ParameterTableModel.CHART_STOCK_USE;
}
}
public static class CHART_GANTT extends ChartHyperRelateFloatLinkPane {
protected int getChartParaType() {
return ParameterTableModel.CHART_GANTT_USE;
}
}
public static class CHART_METER extends ChartHyperRelateFloatLinkPane {
protected int getChartParaType() {
return ParameterTableModel.CHART_METER_USE;
}
}
}

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

@ -1,6 +1,7 @@
package com.fr.design.chart.series.SeriesCondition.impl;
import com.fr.base.Parameter;
import com.fr.base.chart.BasePlot;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.editor.ValueEditorPane;
import com.fr.design.editor.ValueEditorPaneFactory;
@ -18,10 +19,21 @@ import javax.swing.*;
import java.awt.*;
public class FormHyperlinkPane extends BasicBeanPane<FormHyperlinkProvider> {
private BasePlot plot;
private ReportletParameterViewPane parameterViewPane;
private FormHyperlinkNorthPane northPane;
protected BasePlot getPlot() {
return plot;
}
public FormHyperlinkPane(BasePlot plot) {
super();
this.plot = plot;
this.initComponents();
}
public FormHyperlinkPane() {
super();
this.initComponents();
@ -44,15 +56,15 @@ public class FormHyperlinkPane extends BasicBeanPane<FormHyperlinkProvider> {
}
protected int getChartParaType() {
return ParameterTableModel.NO_CHART_USE;
return plot != null ? ParameterTableModel.CHART_NORMAL_USE : 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 plot != null && plot.needRenameHyperLinkPane();
}
protected int getHyperlinkType() {
@ -108,61 +120,4 @@ public class FormHyperlinkPane extends BasicBeanPane<FormHyperlinkProvider> {
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;
}
}
}

15
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<UIMenuNameableCreator> refreshList(HashMap map) {
List<UIMenuNameableCreator> list = new ArrayList<UIMenuNameableCreator>();
protected List<ChartUIMenuNameableCreator> refreshList(HashMap map) {
List<ChartUIMenuNameableCreator> list = new ArrayList<ChartUIMenuNameableCreator>();
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;
}

235
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<Chart> 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<Chart> 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<Chart> implements UIOb
}
Plot plot = chart.getPlot();
this.plot =plot;
relayoutWithGis(chart, plot);
relayoutWithPlot(plot);
@ -676,18 +667,25 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
}
private void populateHyperlink(Plot plot) {
HashMap paneMap = renewMapWithPlot(plot);
HashMap paneMap = getPlotHyperMap();
//安装平台内打开插件时,添加相应按钮
Set<HyperlinkProvider> providers = ExtraDesignClassManager.getInstance().getArray(HyperlinkProvider.XML_TAG);
for (HyperlinkProvider provider : providers) {
NameableCreator nc = provider.createHyperlinkCreator();
paneMap.put(nc.getHyperlink(), nc.getUpdatePane());
}
List<UIMenuNameableCreator> list = refreshList(paneMap);
List<ChartUIMenuNameableCreator> list = refreshList(paneMap);
superLink.refreshMenuAndAddMenuAction(list);
List<UIMenuNameableCreator> hyperList = new ArrayList<UIMenuNameableCreator>();
List<ChartUIMenuNameableCreator> hyperList = new ArrayList<ChartUIMenuNameableCreator>();
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<Chart> implements UIOb
return null;
}
protected List<UIMenuNameableCreator> refreshList(HashMap map) {
List<UIMenuNameableCreator> list = new ArrayList<UIMenuNameableCreator>();
protected List<ChartUIMenuNameableCreator> refreshList(HashMap map) {
List<ChartUIMenuNameableCreator> list = new ArrayList<ChartUIMenuNameableCreator>();
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;

59
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<? extends BasicBeanPane> 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<HyperlinkProvider> 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<UIMenuNameableCreator> list = refreshList(paneMap);
@ -155,7 +183,20 @@ public class VanChartHyperLinkPane extends VanChartUIListControlPane {
}
protected HashMap getHyperlinkMap(Plot plot) {
return HyperlinkMapFactory.getHyperlinkMap(plot);
HashMap<Class, Class> map = new HashMap<Class, Class>();
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;
}
}
}

15
designer_chart/src/com/fr/plugin/chart/designer/component/ConditionUIMenuNameableCreator.java → 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<? extends ConditionAttributesPane> paneClazz) {
public ChartUIMenuNameableCreator(Plot plot, String name, Object obj, Class<? extends BasicBeanPane> 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<? extends ConditionAttributesPane>) this.paneClazz);
return new ChartUIMenuNameableCreator(plot, name, cloneObj, (Class<? extends BasicBeanPane>) this.paneClazz);
}
public BasicBeanPane getPane() {
try {
Constructor<? extends BasicBeanPane> constructor = paneClazz.getConstructor(Plot.class);
return constructor.newInstance(plot);
if (plot != null) {
Constructor<? extends BasicBeanPane> constructor = paneClazz.getConstructor(Plot.class);
return constructor.newInstance(plot);
}
} catch (Exception e) {
FRLogger.getLogger().error(e.getMessage(), e);
return super.getPane();
}
return null;
}

1096
designer_chart/src/com/fr/plugin/chart/designer/other/HyperlinkMapFactory.java

File diff suppressed because it is too large Load Diff

6
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) {

9
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<Plot> {
protected NameJavaScriptGroup populateHotHyperLink(Plot plot) {
return ((VanChartMapPlot)plot).getLineHotHyperLink();
}
@Override
protected HashMap getHyperlinkMap(Plot plot){
return HyperlinkMapFactory.getLineMapHyperLinkMap();
}
};
}

16
designer_form/src/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java

@ -3,6 +3,7 @@ package com.fr.design.widget.ui.designer.layout;
import com.fr.design.data.DataCreatorUI;
import com.fr.design.designer.IntervalConstants;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.designer.creator.XLayoutContainer;
import com.fr.design.designer.creator.XWAbsoluteBodyLayout;
import com.fr.design.designer.creator.XWFitLayout;
import com.fr.design.designer.creator.XWScaleLayout;
@ -117,6 +118,13 @@ public class FRFitLayoutDefinePane extends AbstractDataModify<WFitLayout> {
@Override
public void populateBean(WFitLayout ob) {
FormDesigner formDesigner = WidgetPropertyPane.getInstance().getEditingFormDesigner();
XLayoutContainer rootLayout = selectedBodyLayout(formDesigner);
if (rootLayout != formDesigner.getRootComponent()
&& formDesigner.getSelectionModel().getSelection().getSelectedCreator() == formDesigner.getRootComponent()) {
formDesigner.getSelectionModel().setSelectedCreators(
FormSelectionUtils.rebuildSelection(xWFitLayout, new Widget[]{selectedBodyLayout(formDesigner).toData()}));
}
paddingBound.populate(ob);
layoutComboBox.setSelectedIndex(ob.getBodyLayoutType().getTypeValue());
adaptComboBox.setSelectedIndex(ob.getCompState());
@ -124,6 +132,14 @@ public class FRFitLayoutDefinePane extends AbstractDataModify<WFitLayout> {
stylePane.setValue(ob.getBorderStyle());
}
private XLayoutContainer selectedBodyLayout(FormDesigner formDesigner) {
XLayoutContainer rootLayout = formDesigner.getRootComponent();
if (rootLayout.getComponentCount() == 1 && rootLayout.getXCreator(0).acceptType(XWAbsoluteBodyLayout.class)){
rootLayout = (XWAbsoluteBodyLayout)rootLayout.getXCreator(0);
}
return rootLayout;
}
@Override
public WFitLayout updateBean() {

Loading…
Cancel
Save