Browse Source

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

master
daniel 7 years ago
parent
commit
561b95462c
  1. 33
      designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java
  2. 56
      designer_base/src/com/fr/design/hyperlink/AbstractHyperLinkPane.java
  3. 145
      designer_base/src/com/fr/design/hyperlink/AbstractHyperNorthPane.java
  4. 144
      designer_base/src/com/fr/design/hyperlink/AbstractHyperlinkPane.java
  5. 39
      designer_base/src/com/fr/design/hyperlink/ReporletHyperNorthPane.java
  6. 44
      designer_base/src/com/fr/design/hyperlink/ReportletHyperlinkPane.java
  7. 3
      designer_base/src/com/fr/design/hyperlink/WebHyperNorthPane.java
  8. 47
      designer_base/src/com/fr/design/hyperlink/WebHyperlinkPane.java
  9. 37
      designer_base/src/com/fr/design/javascript/JavaScriptImplPane.java
  10. 38
      designer_base/src/com/fr/design/javascript/ParameterJavaScriptPane.java
  11. 16
      designer_base/src/com/fr/design/module/DesignModule.java
  12. 38
      designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java
  13. 41
      designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateCellLinkPane.java
  14. 41
      designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateFloatLinkPane.java
  15. 43
      designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/FormHyperlinkPane.java
  16. 8
      designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartDesignerInteractivePane.java
  17. 48
      designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartInteractivePane.java
  18. 8
      designer_chart/src/com/fr/design/module/ChartHyperlinkGroup.java
  19. 4
      designer_chart/src/com/fr/design/module/FormHyperlinkGroup.java
  20. 12
      designer_chart/src/com/fr/plugin/chart/custom/component/VanChartHyperLinkPane.java
  21. 16
      designer_chart/src/com/fr/plugin/chart/designer/component/ChartUIMenuNameableCreator.java

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

@ -1,7 +1,6 @@
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;
@ -202,24 +201,24 @@ public class ValueEditorPaneFactory {
return createVallueEditorPaneWithUseType(paraUseType, null);
}
public static ValueEditorPane createVallueEditorPaneWithUseType(int paraUseType, BasePlot plot) {
public static ValueEditorPane createVallueEditorPaneWithUseType(int paraUseType, HashMap hyperLinkEditorMap) {
if (paraUseType == ParameterTableModel.NO_CHART_USE) {
return createBasicValueEditorPane();
} else if (paraUseType == ParameterTableModel.FORM_NORMAL_USE) {
return createFormEditorPane();
} else {
return createChartHotValueEditorPane(plot);
return createChartHotValueEditorPane(hyperLinkEditorMap);
}
}
/**
* 图表用的参数编辑器的ValueEditorPane
*
* @param plot plot类型
* @param hyperLinkEditorMap 超链下拉参数类型
* @return 值编辑器
*/
public static ValueEditorPane createChartHotValueEditorPane(BasePlot plot) {
return createValueEditorPane(chartHotEditors(plot), StringUtils.EMPTY, StringUtils.EMPTY);
public static ValueEditorPane createChartHotValueEditorPane(HashMap hyperLinkEditorMap) {
return createValueEditorPane(chartHotEditors(hyperLinkEditorMap), StringUtils.EMPTY, StringUtils.EMPTY);
}
/**
@ -253,7 +252,7 @@ public class ValueEditorPaneFactory {
new DateEditor(true, Inter.getLocText("FR-Designer_Date")),
new BooleanEditor(),
formulaEditor,
new WidgetNameEditor(Inter.getLocText("Widget"))
new WidgetNameEditor(Inter.getLocText("FR-Designer_Widget"))
};
}
@ -317,7 +316,7 @@ public class ValueEditorPaneFactory {
*/
public static Editor<?>[] URLEditors(String popupName, String textEditorValue) {
return new Editor[]{
new NoneEditor(textEditorValue, StringUtils.isEmpty(popupName) ? Inter.getLocText("None") : popupName),
new NoneEditor(textEditorValue, StringUtils.isEmpty(popupName) ? Inter.getLocText("FR-Designer_None") : popupName),
new TextEditor()
};
}
@ -331,7 +330,7 @@ public class ValueEditorPaneFactory {
*/
public static Editor<?>[] dateEditors(String popupName, String textEditorValue) {
return new Editor[]{
new NoneEditor(textEditorValue, StringUtils.isEmpty(popupName) ? Inter.getLocText("None") : popupName),
new NoneEditor(textEditorValue, StringUtils.isEmpty(popupName) ? Inter.getLocText("FR-Designer_None") : popupName),
new DateEditor(true, Inter.getLocText("FR-Designer_Date")),
new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula"))
};
@ -446,8 +445,8 @@ public class ValueEditorPaneFactory {
*
* @return 值编辑器
*/
public static Editor[] chartHotEditors(BasePlot plot) {
List<Editor> list = createEditors4Chart(plot);
public static Editor[] chartHotEditors(HashMap hyperLinkEditorMap) {
List<Editor> list = createEditors4Chart(hyperLinkEditorMap);
list.add(new TextEditor());
list.add(new IntegerEditor());
@ -467,14 +466,12 @@ public class ValueEditorPaneFactory {
*
* @return 值编辑器
*/
private static List<Editor> createEditors4Chart(BasePlot plot) {
private static List<Editor> createEditors4Chart(HashMap hyperLinkEditorMap) {
List<Editor> lists = new ArrayList<Editor>();
if (plot == null) {
if (hyperLinkEditorMap == null) {
return lists;
}
HashMap<String, Formula> map = plot.getHyperLinkEditorMap();
Iterator<Map.Entry<String, Formula>> entries = map.entrySet().iterator();
Iterator<Map.Entry<String, Formula>> entries = hyperLinkEditorMap.entrySet().iterator();
while (entries.hasNext()) {
Map.Entry<String, Formula> entry = entries.next();
ConstantsEditor editor = new ConstantsEditor(entry.getKey(), entry.getValue());
@ -496,12 +493,12 @@ public class ValueEditorPaneFactory {
JPanel paneLeft = FRGUIPaneFactory.createBorderLayout_S_Pane();
pane.add(paneLeft);
paneLeft.add(new UILabel(" " + Inter.getLocText("Actual_Value") + ":"), BorderLayout.NORTH);
paneLeft.add(new UILabel(" " + Inter.getLocText("FR-Designer_Actual_Value") + ":"), BorderLayout.NORTH);
paneLeft.add(keyColumnPane, BorderLayout.CENTER);
JPanel paneRight = FRGUIPaneFactory.createBorderLayout_S_Pane();
pane.add(paneRight);
paneRight.add(new UILabel(" " + Inter.getLocText("Display_Value") + ":"), BorderLayout.NORTH);
paneRight.add(new UILabel(" " + Inter.getLocText("FR-Designer_Display_Value") + ":"), BorderLayout.NORTH);
paneRight.add(valueDictPane, BorderLayout.CENTER);

56
designer_base/src/com/fr/design/hyperlink/AbstractHyperLinkPane.java

@ -0,0 +1,56 @@
package com.fr.design.hyperlink;
import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.editor.ValueEditorPane;
import com.fr.design.editor.ValueEditorPaneFactory;
import com.fr.design.gui.frpane.ReportletParameterViewPane;
import com.fr.design.gui.itableeditorpane.ParameterTableModel;
import com.fr.js.JavaScript;
import java.util.HashMap;
/**
* Created by mengao on 2017/10/12.
*/
public abstract class AbstractHyperLinkPane<T> extends FurtherBasicBeanPane<T> {
private HashMap hyperLinkEditorMap;
private boolean needRenamePane = false;
protected ReportletParameterViewPane parameterViewPane;
public AbstractHyperLinkPane(HashMap hyperLinkEditorMap, boolean needRenamePane) {
this.hyperLinkEditorMap = hyperLinkEditorMap;
this.needRenamePane = needRenamePane;
}
public AbstractHyperLinkPane() {
}
public ReportletParameterViewPane getParameterViewPane() {
return parameterViewPane;
}
public void setParameterViewPane(ReportletParameterViewPane parameterViewPane) {
this.parameterViewPane = parameterViewPane;
}
public boolean accept(Object ob) {
return ob instanceof JavaScript;
}
public void reset() {
}
protected int getChartParaType() {
return hyperLinkEditorMap != null ? ParameterTableModel.CHART_NORMAL_USE : ParameterTableModel.NO_CHART_USE;
}
protected ValueEditorPane getValueEditorPane() {
return ValueEditorPaneFactory.createVallueEditorPaneWithUseType(getChartParaType(), hyperLinkEditorMap);
}
protected boolean needRenamePane() {
return needRenamePane;
}
}

145
designer_base/src/com/fr/design/hyperlink/AbstractHyperNorthPane.java

@ -0,0 +1,145 @@
package com.fr.design.hyperlink;
import com.fr.base.Utils;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UINumberField;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.Inter;
import com.fr.js.Hyperlink;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public abstract class AbstractHyperNorthPane<T extends Hyperlink> extends BasicBeanPane<T> {
public static final int NEW_WINDOW = 0;
public static final int DIALOG = 1;
public static final int SELF = 2;
public static final int DEFAULT_H_VALUE = 400;
public static final int DEFAULT_V_VALUE = 600;
private JPanel headerPane;
private UIComboBox targetFrameComboBox;
private UINumberField heightTextFiled;
private UINumberField widthTextFiled;
public AbstractHyperNorthPane() {
this.initComponents();
}
protected void initComponents() {
this.setLayout(FRGUIPaneFactory.createM_BorderLayout());
JPanel centerPane = FRGUIPaneFactory.createBorderLayout_L_Pane();
headerPane = this.setHeaderPanel();
this.add(headerPane, BorderLayout.NORTH);
this.add(centerPane, BorderLayout.CENTER);
targetFrameComboBox = new UIComboBox(getTargetFrames());
targetFrameComboBox.setRenderer(new DefaultListCellRenderer() {
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
return this;
}
});
JPanel targetFramePanel = new JPanel();
targetFramePanel.add(new UILabel(Inter.getLocText("Hyperlink-Link_Opened_in")));
targetFramePanel.add(targetFrameComboBox);
targetFrameComboBox.setEditable(true);
targetFrameComboBox.setPreferredSize(new Dimension(100, 20));
final JPanel newWindowConfPane = new JPanel();
newWindowConfPane.add(new UILabel(Inter.getLocText("FR-Designer_Height") + ": "));
heightTextFiled = new UINumberField();
heightTextFiled.setText(String.valueOf(DEFAULT_H_VALUE));
heightTextFiled.setPreferredSize(new Dimension(40, 20));
newWindowConfPane.add(heightTextFiled);
newWindowConfPane.add(new UILabel(" " + Inter.getLocText("FR-Designer_Width") + ": "));
widthTextFiled = new UINumberField();
widthTextFiled.setText(String.valueOf(DEFAULT_V_VALUE));
widthTextFiled.setPreferredSize(new Dimension(40, 20));
newWindowConfPane.add(widthTextFiled);
JPanel centerPanel = new JPanel(new BorderLayout());
centerPanel.add(targetFramePanel, BorderLayout.WEST);
centerPanel.add(newWindowConfPane, BorderLayout.EAST);
newWindowConfPane.setVisible(false);
centerPane.add(centerPanel);
targetFrameComboBox.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
newWindowConfPane.setVisible(DIALOG == targetFrameComboBox.getSelectedIndex());
}
});
this.add(this.setFootPanel(), BorderLayout.SOUTH);
}
protected String[] getTargetFrames() {
return new String[]{Inter.getLocText("Hyperlink-New_Window"), Inter.getLocText("FR-Hyperlink_Dialog"), Inter.getLocText("Hyperlink-Self_Window")};
}
protected abstract JPanel setHeaderPanel();
protected abstract JPanel setFootPanel();
protected abstract void populateSubHyperlinkBean(T link);
public UIComboBox getTargetFrameComboBox() {
return targetFrameComboBox;
}
public void setTargetFrameComboBox(UIComboBox targetFrameComboBox) {
this.targetFrameComboBox = targetFrameComboBox;
}
public UINumberField getHeightTextFiled() {
return heightTextFiled;
}
public void setHeightTextFiled(UINumberField heightTextFiled) {
this.heightTextFiled = heightTextFiled;
}
public UINumberField getWidthTextFiled() {
return widthTextFiled;
}
public void setWidthTextFiled(UINumberField widthTextFiled) {
this.widthTextFiled = widthTextFiled;
}
@Override
public void populateBean(T link) {
String name = link.getTargetFrame();
targetFrameComboBox.setSelectedIndex(HyperlinkTargetFrame.convert(name));
heightTextFiled.setText(String.valueOf(link.getHeight() == 0 ? DEFAULT_H_VALUE : link.getHeight()));
widthTextFiled.setText(String.valueOf(link.getWidth() == 0 ? DEFAULT_V_VALUE : link.getWidth()));
populateSubHyperlinkBean(link);
}
protected abstract T updateSubHyperlinkBean();
protected abstract void updateSubHyperlinkBean(T t);
@Override
public T updateBean() {
T link = updateSubHyperlinkBean();
updateBean(link);
return link;
}
public void updateBean(T link) {
updateSubHyperlinkBean(link);
link.setTargetFrame(HyperlinkTargetFrame.parse(targetFrameComboBox.getSelectedIndex()).getName());
link.setHeight(Utils.objectToNumber(heightTextFiled.getText(), false).intValue());
link.setWidth(Utils.objectToNumber(widthTextFiled.getText(), false).intValue());
}
}

144
designer_base/src/com/fr/design/hyperlink/AbstractHyperlinkPane.java

@ -1,144 +0,0 @@
package com.fr.design.hyperlink;
import com.fr.base.Utils;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UINumberField;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.Inter;
import com.fr.js.Hyperlink;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public abstract class AbstractHyperlinkPane<T extends Hyperlink> extends BasicBeanPane<T> {
public static final int NEW_WINDOW = 0;
public static final int DIALOG = 1;
public static final int SELF = 2;
public static final int DEFAULT_H_VALUE = 400;
public static final int DEFAULT_V_VALUE = 600;
private JPanel headerPane;
private UIComboBox targetFrameComboBox;
private UINumberField heightTextFiled;
private UINumberField widthTextFiled;
public AbstractHyperlinkPane() {
this.initComponents();
}
protected void initComponents() {
this.setLayout(FRGUIPaneFactory.createM_BorderLayout());
JPanel centerPane = FRGUIPaneFactory.createBorderLayout_L_Pane();
headerPane = this.setHeaderPanel();
this.add(headerPane, BorderLayout.NORTH);
this.add(centerPane, BorderLayout.CENTER);
targetFrameComboBox = new UIComboBox(getTargetFrames());
targetFrameComboBox.setRenderer(new DefaultListCellRenderer() {
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
return this;
}
});
JPanel targetFramePanel = new JPanel();
targetFramePanel.add(new UILabel(Inter.getLocText("Hyperlink-Link_Opened_in")));
targetFramePanel.add(targetFrameComboBox);
targetFrameComboBox.setEditable(true);
targetFrameComboBox.setPreferredSize(new Dimension(100, 20));
final JPanel newWindowConfPane = new JPanel();
newWindowConfPane.add(new UILabel(Inter.getLocText("FR-Designer_Height") + ": "));
heightTextFiled = new UINumberField();
heightTextFiled.setText(String.valueOf(DEFAULT_H_VALUE));
heightTextFiled.setPreferredSize(new Dimension(40, 20));
newWindowConfPane.add(heightTextFiled);
newWindowConfPane.add(new UILabel(" " + Inter.getLocText("FR-Designer_Width") + ": "));
widthTextFiled = new UINumberField();
widthTextFiled.setText(String.valueOf(DEFAULT_V_VALUE));
widthTextFiled.setPreferredSize(new Dimension(40, 20));
newWindowConfPane.add(widthTextFiled);
JPanel centerPanel = new JPanel(new BorderLayout());
centerPanel.add(targetFramePanel, BorderLayout.WEST);
centerPanel.add(newWindowConfPane, BorderLayout.EAST);
newWindowConfPane.setVisible(false);
centerPane.add(centerPanel);
targetFrameComboBox.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
newWindowConfPane.setVisible(DIALOG == targetFrameComboBox.getSelectedIndex());
}
});
this.add(this.setFootPanel(), BorderLayout.SOUTH);
}
protected String[] getTargetFrames(){
return new String[]{Inter.getLocText("Hyperlink-New_Window"), Inter.getLocText("FR-Hyperlink_Dialog"), Inter.getLocText("Hyperlink-Self_Window")};
}
protected abstract JPanel setHeaderPanel();
protected abstract JPanel setFootPanel();
protected abstract void populateSubHyperlinkBean(T link);
public UIComboBox getTargetFrameComboBox() {
return targetFrameComboBox;
}
public void setTargetFrameComboBox(UIComboBox targetFrameComboBox) {
this.targetFrameComboBox = targetFrameComboBox;
}
public UINumberField getHeightTextFiled() {
return heightTextFiled;
}
public void setHeightTextFiled(UINumberField heightTextFiled) {
this.heightTextFiled = heightTextFiled;
}
public UINumberField getWidthTextFiled() {
return widthTextFiled;
}
public void setWidthTextFiled(UINumberField widthTextFiled) {
this.widthTextFiled = widthTextFiled;
}
@Override
public void populateBean(T link) {
String name = link.getTargetFrame();
targetFrameComboBox.setSelectedIndex(HyperlinkTargetFrame.convert(name));
heightTextFiled.setText(String.valueOf(link.getHeight() == 0 ? DEFAULT_H_VALUE : link.getHeight()));
widthTextFiled.setText(String.valueOf(link.getWidth() == 0 ? DEFAULT_V_VALUE : link.getWidth()));
populateSubHyperlinkBean(link);
}
protected abstract T updateSubHyperlinkBean();
protected abstract void updateSubHyperlinkBean(T t);
@Override
public T updateBean() {
T link = updateSubHyperlinkBean();
updateBean(link);
return link;
}
public void updateBean(T link) {
updateSubHyperlinkBean(link);
link.setTargetFrame(HyperlinkTargetFrame.parse(targetFrameComboBox.getSelectedIndex()).getName());
link.setHeight(Utils.objectToNumber(heightTextFiled.getText(), false).intValue());
link.setWidth(Utils.objectToNumber(widthTextFiled.getText(), false).intValue());
}
}

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

@ -1,38 +1,33 @@
package com.fr.design.hyperlink;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import com.fr.design.gui.ilable.UILabel;
import javax.swing.JPanel;
import javax.swing.JPopupMenu;
import javax.swing.SwingUtilities;
import com.fr.design.actions.UpdateAction;
import com.fr.design.gui.itree.filetree.ReportletPane;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.gui.itree.filetree.ReportletPane;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter;
import com.fr.js.ReportletHyperlink;
import com.fr.stable.StringUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
/**
* 热点链接部分 上方 定义特征 样式 报表 等属性的界面.
*
* @author kunsnat
*/
public class ReporletHyperNorthPane extends AbstractHyperlinkPane<ReportletHyperlink> {
public class ReporletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyperlink> {
private UITextField itemNameTextField;
private boolean needRenamePane = false;
private UITextField reportPathTextField;
@ -70,7 +65,7 @@ public class ReporletHyperNorthPane extends AbstractHyperlinkPane<ReportletHyper
reportPathTextField = new UITextField(20);
reportletNamePane.add(reportPathTextField, BorderLayout.CENTER);
browserButton = new UIButton(Inter.getLocText("Select"));
browserButton = new UIButton(Inter.getLocText("FR-Designer_Select"));
browserButton.setPreferredSize(new Dimension(browserButton.getPreferredSize().width, 20));
reportletNamePane.add(browserButton, BorderLayout.EAST);
browserButton.addActionListener(new ActionListener() {
@ -91,13 +86,13 @@ public class ReporletHyperNorthPane extends AbstractHyperlinkPane<ReportletHyper
Component[][] components;
if (!this.needRenamePane) {
components = new Component[][]{
{new UILabel(" " + Inter.getLocText("Reportlet") + ":"), reportletNamePane},
{new UILabel(" " + Inter.getLocText("FR-Hyperlink_Reportlet") + ":"), reportletNamePane},
};
} else {
itemNameTextField = new UITextField();
components = new Component[][]{
{new UILabel(" " + Inter.getLocText("Name") + ":"), itemNameTextField},
{new UILabel(" " + Inter.getLocText("Reportlet") + ":"), reportletNamePane},
{new UILabel(" " + Inter.getLocText("FR-Designer-Hyperlink_Name") + ":"), itemNameTextField},
{new UILabel(" " + Inter.getLocText("FR-Hyperlink_Reportlet") + ":"), reportletNamePane},
};
}
JPanel northPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
@ -139,7 +134,7 @@ public class ReporletHyperNorthPane extends AbstractHyperlinkPane<ReportletHyper
}
public String getReportletName() {
return StringUtils.isBlank(this.reportPathTextField.getText()) ? "" : this.reportPathTextField.getText().substring(1);
return StringUtils.isBlank(this.reportPathTextField.getText()) ? StringUtils.EMPTY : this.reportPathTextField.getText().substring(1);
}
/**
@ -160,7 +155,7 @@ public class ReporletHyperNorthPane extends AbstractHyperlinkPane<ReportletHyper
}
public void actionPerformed(ActionEvent e) {
//do nothing
}
}

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

@ -2,10 +2,6 @@ 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;
import com.fr.design.gui.frpane.ReportletParameterViewPane;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.itableeditorpane.ParameterTableModel;
@ -22,21 +18,15 @@ import com.fr.stable.StringUtils;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.util.HashMap;
import java.util.List;
public class ReportletHyperlinkPane extends BasicBeanPane<ReportletHyperlink> {
private BasePlot plot;
public class ReportletHyperlinkPane extends AbstractHyperLinkPane<ReportletHyperlink> {
private ReporletHyperNorthPane northPane;
private ReportletParameterViewPane parameterViewPane = null;
private UICheckBox extendParametersCheckBox;
protected BasePlot getPlot() {
return plot;
}
public ReportletHyperlinkPane(BasePlot plot) {
super();
this.plot = plot;
public ReportletHyperlinkPane(HashMap hyperLinkEditorMap, boolean needRenamePane) {
super(hyperLinkEditorMap, needRenamePane);
this.initComponents();
}
@ -62,22 +52,10 @@ public class ReportletHyperlinkPane extends BasicBeanPane<ReportletHyperlink> {
}
@Override
protected String title4PopupWindow() {
public String title4PopupWindow() {
return Inter.getLocText("FR-Hyperlink_Reportlet");
}
protected int getChartParaType() {
return plot != null ? ParameterTableModel.CHART_NORMAL_USE : ParameterTableModel.NO_CHART_USE;
}
protected ValueEditorPane getValueEditorPane() {
return ValueEditorPaneFactory.createVallueEditorPaneWithUseType(getChartParaType(), plot);
}
protected boolean needRenamePane(){
return plot != null && plot.isNeedRenameHyperLinkPane();
}
@Override
public void populateBean(ReportletHyperlink ob) {
northPane.populateBean(ob);
@ -146,11 +124,11 @@ public class ReportletHyperlinkPane extends BasicBeanPane<ReportletHyperlink> {
@Override
public void checkEnabled() {
//do nothing
}
}
public static class CHART_NO_RENAME extends ReportletHyperlinkPane {
public static class ChartNoRename extends ReportletHyperlinkPane {
protected int getChartParaType() {
return ParameterTableModel.CHART_NORMAL_USE;
}
@ -168,14 +146,6 @@ public class ReportletHyperlinkPane extends BasicBeanPane<ReportletHyperlink> {
this.northPane = northPane;
}
public ReportletParameterViewPane getParameterViewPane() {
return parameterViewPane;
}
public void setParameterViewPane(ReportletParameterViewPane parameterViewPane) {
this.parameterViewPane = parameterViewPane;
}
public UICheckBox getExtendParametersCheckBox() {
return extendParametersCheckBox;
}

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

@ -2,7 +2,6 @@ package com.fr.design.hyperlink;
import com.fr.base.ConfigManager;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils;
@ -19,7 +18,7 @@ import java.awt.*;
*
* @author kunsnat
*/
public class WebHyperNorthPane extends AbstractHyperlinkPane<WebHyperlink> {
public class WebHyperNorthPane extends AbstractHyperNorthPane<WebHyperlink> {
private UITextField itemNameTextField;
private boolean needRenamePane = false;
private UITextField urlTextField;

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

@ -1,10 +1,6 @@
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;
import com.fr.design.gui.frpane.ReportletParameterViewPane;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.itableeditorpane.ParameterTableModel;
@ -16,36 +12,30 @@ import com.fr.stable.ParameterProvider;
import javax.swing.*;
import java.awt.*;
import java.util.HashMap;
import java.util.List;
public class WebHyperlinkPane extends BasicBeanPane<WebHyperlink> {
private BasePlot plot;
public class WebHyperlinkPane extends AbstractHyperLinkPane<WebHyperlink> {
private static final int BORDER_WIDTH = 4;
private WebHyperNorthPane northPane;
private ReportletParameterViewPane parameterViewPane;
private UICheckBox useCJKCheckBox;
private UICheckBox extendParametersCheckBox;
protected BasePlot getPlot() {
return plot;
}
public WebHyperlinkPane() {
super();
this.initComponents();
}
public WebHyperlinkPane(BasePlot plot) {
super();
this.plot = plot;
public WebHyperlinkPane(HashMap hyperLinkEditorMap, boolean needRenamePane) {
super(hyperLinkEditorMap, needRenamePane);
this.initComponents();
}
protected void initComponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));
this.setBorder(BorderFactory.createEmptyBorder(BORDER_WIDTH, BORDER_WIDTH, BORDER_WIDTH, BORDER_WIDTH));
northPane = new WebHyperNorthPane(needRenamePane());
this.add(northPane, BorderLayout.NORTH);
@ -60,22 +50,10 @@ public class WebHyperlinkPane extends BasicBeanPane<WebHyperlink> {
}
@Override
protected String title4PopupWindow() {
public String title4PopupWindow() {
return Inter.getLocText("Hyperlink-Web_link");
}
protected int getChartParaType() {
return plot != null ? ParameterTableModel.CHART_NORMAL_USE : ParameterTableModel.NO_CHART_USE;
}
protected ValueEditorPane getValueEditorPane() {
return ValueEditorPaneFactory.createVallueEditorPaneWithUseType(getChartParaType(), plot);
}
protected boolean needRenamePane(){
return plot != null && plot.isNeedRenameHyperLinkPane();
}
@Override
public void populateBean(WebHyperlink ob) {
northPane.populateBean(ob);
@ -114,10 +92,11 @@ public class WebHyperlinkPane extends BasicBeanPane<WebHyperlink> {
webHyperlink.setExtendParameters(this.extendParametersCheckBox.isSelected());
}
public static class CHART_NO_RENAME extends WebHyperlinkPane{
public static class ChartNoRename extends WebHyperlinkPane {
protected boolean needRenamePane() {
return false;
}
protected int getChartParaType() {
return ParameterTableModel.CHART_NORMAL_USE;
}
@ -131,14 +110,6 @@ public class WebHyperlinkPane extends BasicBeanPane<WebHyperlink> {
this.northPane = northPane;
}
public ReportletParameterViewPane getParameterViewPane() {
return parameterViewPane;
}
public void setParameterViewPane(ReportletParameterViewPane parameterViewPane) {
this.parameterViewPane = parameterViewPane;
}
public UICheckBox getUseCJKCheckBox() {
return useCJKCheckBox;
}

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

@ -1,16 +1,13 @@
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;
import com.fr.design.editor.ValueEditorPaneFactory;
import com.fr.design.gui.frpane.ReportletParameterViewPane;
import com.fr.design.gui.itableeditorpane.ParameterTableModel;
import com.fr.design.gui.itableeditorpane.UITableEditAction;
import com.fr.design.gui.itableeditorpane.UITableEditorPane;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.hyperlink.AbstractHyperLinkPane;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.scrollruler.ModLineBorder;
import com.fr.design.utils.gui.GUICoreUtils;
@ -23,27 +20,25 @@ import javax.swing.*;
import javax.swing.event.TableModelEvent;
import javax.swing.event.TableModelListener;
import java.awt.*;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
public class JavaScriptImplPane extends FurtherBasicBeanPane<JavaScriptImpl> {
private BasePlot plot;
public class JavaScriptImplPane extends AbstractHyperLinkPane<JavaScriptImpl> {
private static final int BOTTOM_BORDER = 12;
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;
public JavaScriptImplPane(HashMap hyperLinkEditorMap, boolean needRenamePane) {
super(hyperLinkEditorMap, needRenamePane);
this.defaultArgs = new String[0];
initComponents();
}
@ -100,7 +95,7 @@ public class JavaScriptImplPane extends FurtherBasicBeanPane<JavaScriptImpl> {
parameterPane, BorderLayout.EAST
);
topPane.setPreferredSize(new Dimension(300, 150));
topPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 12, 0));
topPane.setBorder(BorderFactory.createEmptyBorder(0, 0, BOTTOM_BORDER, 0));
this.setLayout(new BorderLayout());
this.add(topPane, BorderLayout.NORTH);
@ -109,20 +104,9 @@ public class JavaScriptImplPane extends FurtherBasicBeanPane<JavaScriptImpl> {
this.reLayoutForChart();
}
protected int getChartParaType() {
return plot != null ? ParameterTableModel.CHART_NORMAL_USE : ParameterTableModel.NO_CHART_USE;
}
protected ValueEditorPane getValueEditorPane() {
return ValueEditorPaneFactory.createVallueEditorPaneWithUseType(getChartParaType(), plot);
}
protected boolean needRenamePane(){
return plot != null && plot.isNeedRenameHyperLinkPane();
}
/**
* 参数改变
*
* @param list 参数列表.
*/
public void parameterChanger(List<ParameterProvider> list) {
@ -137,6 +121,7 @@ public class JavaScriptImplPane extends FurtherBasicBeanPane<JavaScriptImpl> {
/**
* title for popup window 弹出界面标题
*
* @return 标题.
*/
public String title4PopupWindow() {
@ -224,10 +209,11 @@ public class JavaScriptImplPane extends FurtherBasicBeanPane<JavaScriptImpl> {
}
}
public static class CHART_NO_RENAME extends JavaScriptImplPane{
public static class ChartNoRename extends JavaScriptImplPane {
protected int getChartParaType() {
return ParameterTableModel.CHART_NORMAL_USE;
}
protected boolean needRenamePane() {
return false;
}
@ -235,6 +221,7 @@ public class JavaScriptImplPane extends FurtherBasicBeanPane<JavaScriptImpl> {
/**
* 判断类型
*
* @param ob 判断目标
* @return 返回是否符合类型.
*/

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

@ -1,59 +1,40 @@
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;
import com.fr.design.gui.frpane.ReportletParameterViewPane;
import com.fr.design.gui.itableeditorpane.ParameterTableModel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.hyperlink.AbstractHyperLinkPane;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter;
import com.fr.js.ParameterJavaScript;
import com.fr.stable.ParameterProvider;
import java.awt.*;
import java.util.HashMap;
import java.util.List;
public class ParameterJavaScriptPane extends BasicBeanPane<ParameterJavaScript> {
private BasePlot plot;
public class ParameterJavaScriptPane extends AbstractHyperLinkPane<ParameterJavaScript> {
private UITextField itemNameTextField;
private ReportletParameterViewPane parameterViewPane;
protected BasePlot getPlot() {
return plot;
}
public ParameterJavaScriptPane() {
this(null);
this(null, false);
}
public ParameterJavaScriptPane(BasePlot plot){
this.plot = plot;
public ParameterJavaScriptPane(HashMap hyperLinkEditorMap, boolean needRenamePane) {
super(hyperLinkEditorMap, needRenamePane);
this.setLayout(new BorderLayout());
parameterViewPane = new ReportletParameterViewPane(getChartParaType(), getValueEditorPane(), getValueEditorPane());
this.add(parameterViewPane, BorderLayout.CENTER);
if (needRenamePane()) {
itemNameTextField = new UITextField();
this.add(GUICoreUtils.createNamedPane(itemNameTextField, Inter.getLocText("Name") + ":"), BorderLayout.NORTH);
}
}
protected int getChartParaType() {
return plot != null ? ParameterTableModel.CHART_NORMAL_USE : ParameterTableModel.NO_CHART_USE;
this.add(GUICoreUtils.createNamedPane(itemNameTextField, Inter.getLocText("FR-Designer-Hyperlink_Name") + ":"), BorderLayout.NORTH);
}
protected ValueEditorPane getValueEditorPane() {
return ValueEditorPaneFactory.createVallueEditorPaneWithUseType(getChartParaType(), plot);
}
protected boolean needRenamePane(){
return plot != null && plot.isNeedRenameHyperLinkPane();
}
@Override
protected String title4PopupWindow() {
public String title4PopupWindow() {
return Inter.getLocText("JavaScript-Dynamic_Parameters");
}
@ -89,10 +70,11 @@ public class ParameterJavaScriptPane extends BasicBeanPane<ParameterJavaScript>
}
}
public static class CHART_NO_RENAME extends ParameterJavaScriptPane{
public static class ChartNoRename extends ParameterJavaScriptPane {
protected int getChartParaType() {
return ParameterTableModel.CHART_NORMAL_USE;
}
protected boolean needRenamePane() {
return false;
}

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

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

38
designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java

@ -1,18 +1,14 @@
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;
import com.fr.chart.charttypes.ChartTypeManager;
import com.fr.chart.web.ChartHyperPoplink;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.chart.gui.ChartComponent;
import com.fr.design.editor.ValueEditorPane;
import com.fr.design.editor.ValueEditorPaneFactory;
import com.fr.design.gui.itableeditorpane.ParameterTableModel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.hyperlink.AbstractHyperLinkPane;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.chart.ChartHyperEditPane;
import com.fr.design.module.DesignModuleFactory;
@ -21,31 +17,28 @@ import com.fr.general.FRLogger;
import com.fr.general.Inter;
import java.awt.*;
import java.util.HashMap;
/**
* 类说明: 图表超链 -- 弹出 悬浮窗.
*
* @author kunsnat E-mail:kunsnat@gmail.com
* @version 创建时间2011-12-28 上午10:41:39
*/
public class ChartHyperPoplinkPane extends BasicBeanPane<ChartHyperPoplink> {
public class ChartHyperPoplinkPane extends AbstractHyperLinkPane<ChartHyperPoplink> {
private static final long serialVersionUID = 2469115951510144738L;
private static final int EDIT_PANE_WIDTH = 248;
private UITextField itemNameTextField;
private ChartHyperEditPane hyperEditPane;
private ChartComponent chartComponent;
private BasePlot plot;
protected BasePlot getPlot() {
return plot;
}
public ChartHyperPoplinkPane() {
this(null);
this(null, false);
}
public ChartHyperPoplinkPane(BasePlot plot) {
this.plot = plot;
public ChartHyperPoplinkPane(HashMap hyperLinkEditorMap, boolean needRenamePane) {
super(hyperLinkEditorMap, needRenamePane);
this.setLayout(FRGUIPaneFactory.createM_BorderLayout());
if (this.needRenamePane()) {
@ -87,20 +80,8 @@ public class ChartHyperPoplinkPane extends BasicBeanPane<ChartHyperPoplink> {
return cc;
}
protected int getChartParaType() {
return plot != null ? ParameterTableModel.CHART_NORMAL_USE : ParameterTableModel.NO_CHART_USE;
}
protected ValueEditorPane getValueEditorPane() {
return ValueEditorPaneFactory.createVallueEditorPaneWithUseType(getChartParaType(), plot);
}
protected boolean needRenamePane(){
return plot != null && plot.isNeedRenameHyperLinkPane();
}
@Override
protected String title4PopupWindow() {
public String title4PopupWindow() {
return Inter.getLocText("FR-Chart-Pop_Chart");
}
@ -122,6 +103,7 @@ public class ChartHyperPoplinkPane extends BasicBeanPane<ChartHyperPoplink> {
/**
* 超链数组HyperlinkGoup切换时 updateBean.
*
* @return 返回的弹出超链.
*/
public ChartHyperPoplink updateBean() {
@ -146,7 +128,7 @@ public class ChartHyperPoplinkPane extends BasicBeanPane<ChartHyperPoplink> {
}
}
public static class CHART_NO_RENAME extends ChartHyperPoplinkPane{
public static class ChartNoRename extends ChartHyperPoplinkPane {
protected boolean needRenamePane() {
return false;
}

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

@ -1,15 +1,11 @@
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;
import com.fr.design.editor.ValueEditorPaneFactory;
import com.fr.design.gui.columnrow.ColumnRowVerticalPane;
import com.fr.design.gui.frpane.ReportletParameterViewPane;
import com.fr.design.gui.itableeditorpane.ParameterTableModel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.hyperlink.AbstractHyperLinkPane;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter;
@ -18,6 +14,7 @@ import com.fr.stable.ParameterProvider;
import javax.swing.*;
import java.awt.*;
import java.util.HashMap;
import java.util.List;
/**
@ -25,25 +22,19 @@ import java.util.List;
* @version 创建时间2011-12-28 下午02:51:10
* 类说明: 图表超链 -- 关联单元格图表.
*/
public class ChartHyperRelateCellLinkPane extends BasicBeanPane<ChartHyperRelateCellLink>{
public class ChartHyperRelateCellLinkPane extends AbstractHyperLinkPane<ChartHyperRelateCellLink> {
private static final long serialVersionUID = 7874948047886548990L;
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;
public ChartHyperRelateCellLinkPane(HashMap hyperLinkEditorMap, boolean needRenamePane) {
super(hyperLinkEditorMap, needRenamePane);
this.initComponent();
}
@ -51,35 +42,23 @@ public class ChartHyperRelateCellLinkPane extends BasicBeanPane<ChartHyperRelate
this.setLayout(FRGUIPaneFactory.createM_BorderLayout());
if (needRenamePane()) {
itemNameTextField = new UITextField();
this.add(GUICoreUtils.createNamedPane(itemNameTextField, Inter.getLocText("Name") + ":"), BorderLayout.NORTH);
this.add(GUICoreUtils.createNamedPane(itemNameTextField, Inter.getLocText("FR-Designer_Name") + ":"), BorderLayout.NORTH);
}
JPanel centerPane = FRGUIPaneFactory.createBorderLayout_L_Pane();
this.add(centerPane, BorderLayout.CENTER);
centerPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText(new String[]{"Related", "Cell"})));
centerPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText(new String[]{"Related", "FR-Designer_Cell"})));
colRowPane = new ColumnRowVerticalPane();
centerPane.add(colRowPane, BorderLayout.NORTH);
parameterViewPane = new ReportletParameterViewPane(getChartParaType(), getValueEditorPane(), getValueEditorPane());
parameterViewPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("Parameters")));
parameterViewPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("FR-Designer_Parameter")));
parameterViewPane.setPreferredSize(new Dimension(500, 200));
this.add(parameterViewPane, BorderLayout.SOUTH);
}
protected int getChartParaType() {
return plot != null ? ParameterTableModel.CHART_NORMAL_USE : ParameterTableModel.NO_CHART_USE;
}
protected ValueEditorPane getValueEditorPane() {
return ValueEditorPaneFactory.createVallueEditorPaneWithUseType(getChartParaType(), plot);
}
protected boolean needRenamePane(){
return plot != null && plot.isNeedRenameHyperLinkPane();
}
@Override
public void populateBean(ChartHyperRelateCellLink ob) {
if (ob == null) {
@ -133,11 +112,11 @@ public class ChartHyperRelateCellLinkPane extends BasicBeanPane<ChartHyperRelate
}
@Override
protected String title4PopupWindow() {
public String title4PopupWindow() {
return Inter.getLocText(new String[]{"Related", "Cell"});
}
public static class CHART_NO_RENAME extends ChartHyperRelateCellLinkPane{
public static class ChartNoRename extends ChartHyperRelateCellLinkPane {
protected boolean needRenamePane() {
return false;
}

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

@ -1,18 +1,14 @@
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;
import com.fr.design.constants.UIConstants;
import com.fr.design.editor.ValueEditorPane;
import com.fr.design.editor.ValueEditorPaneFactory;
import com.fr.design.gui.frpane.ReportletParameterViewPane;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itableeditorpane.ParameterTableModel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.hyperlink.AbstractHyperLinkPane;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter;
@ -23,6 +19,7 @@ import javax.swing.border.Border;
import javax.swing.border.LineBorder;
import javax.swing.border.TitledBorder;
import java.awt.*;
import java.util.HashMap;
import java.util.List;
/**
@ -30,27 +27,19 @@ import java.util.List;
* @version 创建时间2011-12-28 下午03:02:43
* 类说明: 图表超链 关联悬浮元素
*/
public class ChartHyperRelateFloatLinkPane extends BasicBeanPane<ChartHyperRelateFloatLink> {
public class ChartHyperRelateFloatLinkPane extends AbstractHyperLinkPane<ChartHyperRelateFloatLink> {
private static final long serialVersionUID = -3308412003405587689L;
private UITextField itemNameTextField;
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;
public ChartHyperRelateFloatLinkPane(HashMap hyperLinkEditorMap, boolean needRenamePane) {
super(hyperLinkEditorMap, needRenamePane);
this.initComponent();
}
@ -61,7 +50,7 @@ public class ChartHyperRelateFloatLinkPane extends BasicBeanPane<ChartHyperRelat
if (needRenamePane()) {
itemNameTextField = new UITextField();
this.add(GUICoreUtils.createNamedPane(itemNameTextField, Inter.getLocText("Name") + ":"), BorderLayout.NORTH);
this.add(GUICoreUtils.createNamedPane(itemNameTextField, Inter.getLocText("FR-Designer-Hyperlink_Name") + ":"), BorderLayout.NORTH);
}
this.add(centerPane, BorderLayout.CENTER);
@ -81,23 +70,11 @@ public class ChartHyperRelateFloatLinkPane extends BasicBeanPane<ChartHyperRelat
centerPane.add(pane, BorderLayout.NORTH);
parameterViewPane = new ReportletParameterViewPane(getChartParaType(), getValueEditorPane(), getValueEditorPane());
parameterViewPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("Parameters")));
parameterViewPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("FR-Designer_Parameter")));
parameterViewPane.setPreferredSize(new Dimension(500, 200));
this.add(parameterViewPane, BorderLayout.SOUTH);
}
protected int getChartParaType() {
return plot != null ? ParameterTableModel.CHART_NORMAL_USE : ParameterTableModel.NO_CHART_USE;
}
protected ValueEditorPane getValueEditorPane() {
return ValueEditorPaneFactory.createVallueEditorPaneWithUseType(getChartParaType(), plot);
}
protected boolean needRenamePane(){
return plot != null && plot.isNeedRenameHyperLinkPane();
}
private String[] getFloatNames() {
DesignModelAdapter adapter = DesignModelAdapter.getCurrentModelAdapter();
if (adapter != null) {
@ -156,11 +133,11 @@ public class ChartHyperRelateFloatLinkPane extends BasicBeanPane<ChartHyperRelat
}
@Override
protected String title4PopupWindow() {
public String title4PopupWindow() {
return Inter.getLocText(new String[]{"Related", "M_Insert-Float"});
}
public static class CHART_NO_RENAME extends ChartHyperRelateFloatLinkPane{
public static class ChartNoRename extends ChartHyperRelateFloatLinkPane {
protected boolean needRenamePane() {
return false;
}

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

@ -1,12 +1,9 @@
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;
import com.fr.design.gui.frpane.ReportletParameterViewPane;
import com.fr.design.gui.itableeditorpane.ParameterTableModel;
import com.fr.design.hyperlink.AbstractHyperLinkPane;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.form.ui.ElementCaseEditorProvider;
@ -17,20 +14,15 @@ import com.fr.stable.bridge.StableFactory;
import javax.swing.*;
import java.awt.*;
import java.util.HashMap;
public class FormHyperlinkPane extends BasicBeanPane<FormHyperlinkProvider> {
private BasePlot plot;
private ReportletParameterViewPane parameterViewPane;
public class FormHyperlinkPane extends AbstractHyperLinkPane<FormHyperlinkProvider> {
private static final int BORDER_WIDTH = 4;
private FormHyperlinkNorthPane northPane;
protected BasePlot getPlot() {
return plot;
}
public FormHyperlinkPane(BasePlot plot) {
super();
this.plot = plot;
public FormHyperlinkPane(HashMap hyperLinkEditorMap, boolean needRenamePane) {
super(hyperLinkEditorMap, needRenamePane);
this.initComponents();
}
@ -41,7 +33,7 @@ public class FormHyperlinkPane extends BasicBeanPane<FormHyperlinkProvider> {
protected void initComponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));
this.setBorder(BorderFactory.createEmptyBorder(BORDER_WIDTH, BORDER_WIDTH, BORDER_WIDTH, BORDER_WIDTH));
northPane = new FormHyperlinkNorthPane(needRenamePane());
this.add(northPane, BorderLayout.NORTH);
@ -51,28 +43,14 @@ public class FormHyperlinkPane extends BasicBeanPane<FormHyperlinkProvider> {
}
@Override
protected String title4PopupWindow() {
public String title4PopupWindow() {
return Inter.getLocText("Hyperlink-Form_link");
}
protected int getChartParaType() {
return plot != null ? ParameterTableModel.CHART_NORMAL_USE : ParameterTableModel.NO_CHART_USE;
}
protected ValueEditorPane getValueEditorPane() {
return ValueEditorPaneFactory.createVallueEditorPaneWithUseType(getChartParaType(), plot);
}
protected boolean needRenamePane(){
return plot != null && plot.isNeedRenameHyperLinkPane();
}
protected int getHyperlinkType() {
if (northPane.getEditingEditor() != null){
if (northPane.getEditingEditor().acceptType(ElementCaseEditorProvider.class)) {
if (northPane.getEditingEditor() != null && northPane.getEditingEditor().acceptType(ElementCaseEditorProvider.class)) {
return FormHyperlinkProvider.ELEMENTCASE;
}
}
return FormHyperlinkProvider.CHART;
}
@ -112,10 +90,11 @@ public class FormHyperlinkPane extends BasicBeanPane<FormHyperlinkProvider> {
}
}
public static class CHART_NO_RENAME extends FormHyperlinkPane{
public static class ChartNoRename extends FormHyperlinkPane {
protected boolean needRenamePane() {
return false;
}
protected int getChartParaType() {
return ParameterTableModel.CHART_NORMAL_USE;
}

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

@ -4,6 +4,7 @@
package com.fr.design.mainframe.chart.gui.other;
import com.fr.base.Formula;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartdata.TopDefinition;
import com.fr.design.mainframe.chart.gui.ChartOtherPane;
@ -30,11 +31,12 @@ public class ChartDesignerInteractivePane extends ChartInteractivePane {
protected List<ChartUIMenuNameableCreator> refreshList(HashMap map) {
List<ChartUIMenuNameableCreator> list = new ArrayList<ChartUIMenuNameableCreator>();
java.util.HashMap<String, Formula> hyperLinkEditorMap = plot.getHyperLinkEditorMap();
list.add(new ChartUIMenuNameableCreator(plot, Inter.getLocText("Hyperlink-Web_link"),
list.add(new ChartUIMenuNameableCreator(hyperLinkEditorMap, Inter.getLocText("Hyperlink-Web_link"),
new WebHyperlink(), getUseMap(map, WebHyperlink.class)));
list.add(new ChartUIMenuNameableCreator(plot,"JavaScript", new JavaScriptImpl(), getUseMap(map, JavaScriptImpl.class)));
list.add(new ChartUIMenuNameableCreator(plot, Inter.getLocText("RelatedChart"),null,null));
list.add(new ChartUIMenuNameableCreator(hyperLinkEditorMap, "FR-Designer_JavaScript", new JavaScriptImpl(), getUseMap(map, JavaScriptImpl.class)));
list.add(new ChartUIMenuNameableCreator(hyperLinkEditorMap, Inter.getLocText("FR-Engine_Interactive-chart"), null, null));
return list;
}

48
designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartInteractivePane.java

@ -1,6 +1,7 @@
package com.fr.design.mainframe.chart.gui.other;
import com.fr.base.CoreDecimalFormat;
import com.fr.base.Formula;
import com.fr.base.Style;
import com.fr.base.chart.chartdata.TopDefinitionProvider;
import com.fr.chart.base.AttrContents;
@ -130,6 +131,7 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
private static final int SIZEX = 258;
private static final int SIZEY = 209;
private static final int DET = 20;
public ChartInteractivePane(ChartOtherPane parent) {
super();
this.parent = parent;
@ -137,6 +139,7 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
/**
* 界面标题.
*
* @return 返回标题.
*/
public String title4PopupWindow() {
@ -259,6 +262,7 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
/**
* 反正后面还有relayout,这边init一下就好了 保证所有的init 加入界面 并且加载入事件.
*
* @return
*/
private JPanel initPaneWithListener() {
@ -292,7 +296,6 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
}
/**
* 全部初始化, 对所有的界面 都加入, 然后会加载事件响应. 后续再relayout.
*/
@ -446,16 +449,14 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
private Component[] getChartAnimatePane(Plot plot, double[] row, double[] col) {
if (plot.isSupportAnimate() && plot.isSupportSeriesDrag()) {
return new Component[]{TableLayoutHelper.createTableLayoutPane(
new Component[][]{
new Component[]{isChartAnimation},
new Component[][]{new Component[]{isChartAnimation},
new Component[]{isSeriesDragEnable},
new Component[]{new JSeparator()}
}, row, col)
};
} else if (plot.isSupportAnimate() && !plot.isSupportSeriesDrag()) {
return new Component[]{TableLayoutHelper.createTableLayoutPane(
new Component[][]{
new Component[]{isChartAnimation},
new Component[][]{new Component[]{isChartAnimation},
new Component[]{new JSeparator()}
}, row, col)
};
@ -484,15 +485,13 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
boolean isNeedTimeSwitch = plot.getxAxis() != null && plot.getxAxis().isDate();
if (plot.isSupportZoomCategoryAxis() && !isNeedTimeSwitch) {
return new Component[]{TableLayoutHelper.createTableLayoutPane(
new Component[][]{
new Component[]{isAxisZoom},
new Component[][]{new Component[]{isAxisZoom},
new Component[]{new JSeparator()}
}, row, col)
};
} else if (plot.isSupportZoomCategoryAxis() && isNeedTimeSwitch) {
return new Component[]{TableLayoutHelper.createTableLayoutPane(
new Component[][]{
new Component[]{isAxisZoom},
new Component[][]{new Component[]{isAxisZoom},
new Component[]{timeSwitchContainer},
new Component[]{new JSeparator()}
}, row, col)
@ -522,8 +521,7 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
private Component[] getAutoRefreshPane(Plot plot, double[] row, double[] col) {
if (plot.isSupportAutoRefresh()) {
return new Component[]{TableLayoutHelper.createTableLayoutPane(
new Component[][]{
new Component[]{autoRefreshPane},
new Component[][]{new Component[]{autoRefreshPane},
new Component[]{new JSeparator()}
}, row, col)
};
@ -685,7 +683,7 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
NameJavaScript javaScript = nameGroup.getNameHyperlink(i);
if (javaScript != null && javaScript.getJavaScript() != null) {
JavaScript script = javaScript.getJavaScript();
hyperList.add(new ChartUIMenuNameableCreator(plot, javaScript.getName(), script, getUseMap(paneMap, script.getClass())));
hyperList.add(new ChartUIMenuNameableCreator(plot.getHyperLinkEditorMap(), javaScript.getName(), script, getUseMap(paneMap, script.getClass())));
}
}
@ -757,13 +755,11 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
}
seriesAttrContents.setFormat(valueFormat);
if(plot.isSupportValuePercent()) {
if (percentFormat != null) {
if (plot.isSupportValuePercent() && percentFormat != null) {
seriesAttrContents.setPercentFormat(percentFormat);
}
}
}
}
private String getTooltipContent(Plot plot) {
String contents = StringUtils.EMPTY;
@ -798,7 +794,8 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
noPara = false;
}
if (isAddressName.isSelected()) {
contents += ChartConstants.BREAKLINE_PARA + ChartConstants.ADDRESS_NAME_PARA;;
contents += ChartConstants.BREAKLINE_PARA + ChartConstants.ADDRESS_NAME_PARA;
;
noPara = false;
}
if (noPara) {
@ -857,25 +854,26 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
protected List<ChartUIMenuNameableCreator> refreshList(HashMap map) {
List<ChartUIMenuNameableCreator> list = new ArrayList<ChartUIMenuNameableCreator>();
java.util.HashMap<String, Formula> hyperLinkEditorMap = plot.getHyperLinkEditorMap();
list.add(new ChartUIMenuNameableCreator(plot, Inter.getLocText("Chart-Link_Reportlet"),
list.add(new ChartUIMenuNameableCreator(hyperLinkEditorMap, Inter.getLocText("Chart-Link_Reportlet"),
new ReportletHyperlink(), getUseMap(map, ReportletHyperlink.class)));
list.add(new ChartUIMenuNameableCreator(plot, Inter.getLocText("Chart-Link_Mail"), new EmailJavaScript(), ChartEmailPane.class));
list.add(new ChartUIMenuNameableCreator(plot, Inter.getLocText("Chart-Link_Web"),
list.add(new ChartUIMenuNameableCreator(hyperLinkEditorMap, Inter.getLocText("Chart-Link_Mail"), new EmailJavaScript(), ChartEmailPane.class));
list.add(new ChartUIMenuNameableCreator(hyperLinkEditorMap, Inter.getLocText("Chart-Link_Web"),
new WebHyperlink(), getUseMap(map, WebHyperlink.class)));
list.add(new ChartUIMenuNameableCreator(plot, Inter.getLocText("Chart-Link_Dynamic_Parameters"),
list.add(new ChartUIMenuNameableCreator(hyperLinkEditorMap, Inter.getLocText("Chart-Link_Dynamic_Parameters"),
new ParameterJavaScript(), getUseMap(map, ParameterJavaScript.class)));
list.add(new ChartUIMenuNameableCreator(plot, "JavaScript", new JavaScriptImpl(), getUseMap(map, JavaScriptImpl.class)));
list.add(new ChartUIMenuNameableCreator(hyperLinkEditorMap, "JavaScript", new JavaScriptImpl(), getUseMap(map, JavaScriptImpl.class)));
list.add(new ChartUIMenuNameableCreator(plot, Inter.getLocText("Chart-Float_Chart"),
list.add(new ChartUIMenuNameableCreator(hyperLinkEditorMap, Inter.getLocText("Chart-Float_Chart"),
new ChartHyperPoplink(), getUseMap(map, ChartHyperPoplink.class)));
list.add(new ChartUIMenuNameableCreator(plot, Inter.getLocText("Chart-Link_Cell"),
list.add(new ChartUIMenuNameableCreator(hyperLinkEditorMap, Inter.getLocText("Chart-Link_Cell"),
new ChartHyperRelateCellLink(), getUseMap(map, ChartHyperRelateCellLink.class)));
list.add(new ChartUIMenuNameableCreator(plot, Inter.getLocText("Chart-Link_Float"),
list.add(new ChartUIMenuNameableCreator(hyperLinkEditorMap, Inter.getLocText("Chart-Link_Float"),
new ChartHyperRelateFloatLink(), getUseMap(map, ChartHyperRelateFloatLink.class)));
FormHyperlinkProvider hyperlink = StableFactory.getMarkedInstanceObjectFromClass(FormHyperlinkProvider.XML_TAG, FormHyperlinkProvider.class);
list.add(new ChartUIMenuNameableCreator(plot, Inter.getLocText("Chart-Link_Form"),
list.add(new ChartUIMenuNameableCreator(hyperLinkEditorMap, Inter.getLocText("Chart-Link_Form"),
hyperlink, getUseMap(map, FormHyperlinkProvider.class)));
return list;

8
designer_chart/src/com/fr/design/module/ChartHyperlinkGroup.java

@ -17,6 +17,7 @@ import com.fr.stable.bridge.StableFactory;
/**
* 图表的超级链接界面. 比一般的HyperlinkGroupPane多了图表的相关超级链接
*
* @author kunsnat E-mail:kunsnat@gmail.com
* @version 创建时间2013-6-26 下午04:55:10
*/
@ -24,15 +25,16 @@ public class ChartHyperlinkGroup extends BaseHyperlinkGroup {
/**
* 返回支持的超级链接类型
*
* @return NameableCreator[]
*/
public NameableCreator[] getHyperlinkCreators() {
FormHyperlinkProvider formHyperlink = StableFactory.getMarkedInstanceObjectFromClass(FormHyperlinkProvider.XML_TAG, FormHyperlinkProvider.class);
NameableCreator[] realted4CharthyperUse = {
new NameObjectCreator(Inter.getLocText("FR-Designer_Chart_Float_chart"), ChartHyperPoplink.class, ChartHyperPoplinkPane.CHART_NO_RENAME.class),
new NameObjectCreator(Inter.getLocText("FR-Designer_Chart_Cell"), ChartHyperRelateCellLink.class, ChartHyperRelateCellLinkPane.CHART_NO_RENAME.class),
new NameObjectCreator(Inter.getLocText("FR-Designer_Chart_Float"), ChartHyperRelateFloatLink.class, ChartHyperRelateFloatLinkPane.CHART_NO_RENAME.class),
new NameObjectCreator(Inter.getLocText("FR-Designer_Chart_Float_chart"), ChartHyperPoplink.class, ChartHyperPoplinkPane.ChartNoRename.class),
new NameObjectCreator(Inter.getLocText("FR-Designer_Chart_Cell"), ChartHyperRelateCellLink.class, ChartHyperRelateCellLinkPane.ChartNoRename.class),
new NameObjectCreator(Inter.getLocText("FR-Designer_Chart_Float"), ChartHyperRelateFloatLink.class, ChartHyperRelateFloatLinkPane.ChartNoRename.class),
new NameObjectCreator(Inter.getLocText("FR-Designer_Hyperlink-Form_link"), formHyperlink.getClass(), FormHyperlinkPane.class)};
return (NameableCreator[]) ArrayUtils.addAll(super.getHyperlinkCreators(), realted4CharthyperUse);

4
designer_chart/src/com/fr/design/module/FormHyperlinkGroup.java

@ -28,8 +28,8 @@ public class FormHyperlinkGroup extends BaseHyperlinkGroup {
public NameableCreator[] getHyperlinkCreators() {
FormHyperlinkProvider formHyperlink = StableFactory.getMarkedInstanceObjectFromClass(FormHyperlinkProvider.XML_TAG, FormHyperlinkProvider.class);
NameableCreator[] realted4CharthyperUse = {
new NameObjectCreator(Inter.getLocText("FR-Designer_Chart_Float_chart"), ChartHyperPoplink.class, ChartHyperPoplinkPane.CHART_NO_RENAME.class),
new NameObjectCreator(Inter.getLocText("FR-Designer_Chart_Cell"), ChartHyperRelateCellLink.class, ChartHyperRelateCellLinkPane.CHART_NO_RENAME.class),
new NameObjectCreator(Inter.getLocText("FR-Designer_Chart_Float_chart"), ChartHyperPoplink.class, ChartHyperPoplinkPane.ChartNoRename.class),
new NameObjectCreator(Inter.getLocText("FR-Designer_Chart_Cell"), ChartHyperRelateCellLink.class, ChartHyperRelateCellLinkPane.ChartNoRename.class),
new NameObjectCreator(Inter.getLocText("FR-Designer_Hyperlink-Form_link"), formHyperlink.getClass(), FormHyperlinkPane.class)};
return (NameableCreator[]) ArrayUtils.addAll(super.getHyperlinkCreators(), realted4CharthyperUse);

12
designer_chart/src/com/fr/plugin/chart/custom/component/VanChartHyperLinkPane.java

@ -22,6 +22,7 @@ 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.FRLogger;
import com.fr.general.Inter;
import com.fr.general.NameObject;
import com.fr.js.EmailJavaScript;
@ -75,17 +76,17 @@ 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);
constructor = creator.getUpdatePane().getConstructor(HashMap.class, boolean.class);
return constructor.newInstance(plot.getHyperLinkEditorMap(), false);
} catch (InstantiationException e) {
throw new RuntimeException(e);
FRLogger.getLogger().error(e.getMessage(), e);
} catch (IllegalAccessException e) {
throw new RuntimeException(e);
FRLogger.getLogger().error(e.getMessage(), e);
} catch (NoSuchMethodException e) {
return super.createPaneByCreators(creator);
} catch (InvocationTargetException e) {
e.printStackTrace();
FRLogger.getLogger().error(e.getMessage(), e);
}
return null;
}
@ -122,6 +123,7 @@ public class VanChartHyperLinkPane extends VanChartUIListControlPane {
}
public void populate(TargetComponent elementCasePane) {
//populate
}
/**

16
designer_chart/src/com/fr/plugin/chart/designer/component/ChartUIMenuNameableCreator.java

@ -1,21 +1,21 @@
package com.fr.plugin.chart.designer.component;
import com.fr.chart.chartattr.Plot;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.imenutable.UIMenuNameableCreator;
import com.fr.general.FRLogger;
import java.lang.reflect.Constructor;
import java.util.HashMap;
/**
* Created by hufan on 2016/11/15.
*/
public class ChartUIMenuNameableCreator extends UIMenuNameableCreator {
private Plot plot;
private HashMap hyperLinkEditorMap;
public ChartUIMenuNameableCreator(Plot plot, String name, Object obj, Class<? extends BasicBeanPane> paneClazz) {
public ChartUIMenuNameableCreator(HashMap hyperLinkEditorMap, String name, Object obj, Class<? extends BasicBeanPane> paneClazz) {
super(name, obj, paneClazz);
this.plot = plot;
this.hyperLinkEditorMap = hyperLinkEditorMap;
}
public UIMenuNameableCreator clone() {
@ -27,15 +27,15 @@ public class ChartUIMenuNameableCreator extends UIMenuNameableCreator {
} catch (IllegalAccessException e) {
FRLogger.getLogger().error("UIMenuNameableCreator IllegalAccessException");
}
return new ChartUIMenuNameableCreator(plot, name, cloneObj, (Class<? extends BasicBeanPane>) this.paneClazz);
return new ChartUIMenuNameableCreator(hyperLinkEditorMap, name, cloneObj, (Class<? extends BasicBeanPane>) this.paneClazz);
}
public BasicBeanPane getPane() {
try {
if (plot != null) {
Constructor<? extends BasicBeanPane> constructor = paneClazz.getConstructor(Plot.class);
return constructor.newInstance(plot);
if (hyperLinkEditorMap != null) {
Constructor<? extends BasicBeanPane> constructor = paneClazz.getConstructor(HashMap.class, boolean.class);
return constructor.newInstance(hyperLinkEditorMap, true);
}
} catch (Exception e) {
return super.getPane();

Loading…
Cancel
Save