Browse Source

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

master
daniel 7 years ago
parent
commit
97fd46b185
  1. 2
      designer/src/com/fr/design/actions/cell/style/ReportFontItalicAction.java
  2. 221
      designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java
  3. 2
      designer_base/src/com/fr/design/extra/LoginWebPane.java
  4. 2
      designer_base/src/com/fr/design/extra/QQLoginWebPane.java
  5. 12
      designer_base/src/com/fr/design/extra/WebViewDlgHelper.java
  6. 6
      designer_base/src/com/fr/design/gui/controlpane/AbstractNameableCreator.java
  7. 6
      designer_base/src/com/fr/design/gui/controlpane/NameableCreator.java
  8. 8
      designer_base/src/com/fr/design/gui/frpane/UICorrelationComboBoxPane.java
  9. 12
      designer_base/src/com/fr/design/gui/ibutton/UIToggleButton.java
  10. 6
      designer_base/src/com/fr/design/gui/icombobox/UIComboBoxUI.java
  11. 38
      designer_base/src/com/fr/design/gui/imenutable/UIMenuTable.java
  12. 11
      designer_base/src/com/fr/design/gui/itableeditorpane/ParameterTableModel.java
  13. 14
      designer_base/src/com/fr/design/gui/style/AlignmentPane.java
  14. 16
      designer_base/src/com/fr/design/gui/style/BorderPane.java
  15. 79
      designer_base/src/com/fr/design/hyperlink/ReportletHyperlinkPane.java
  16. 77
      designer_base/src/com/fr/design/hyperlink/WebHyperlinkPane.java
  17. BIN
      designer_base/src/com/fr/design/images/m_format/cellstyle/bottom_white.png
  18. BIN
      designer_base/src/com/fr/design/images/m_format/cellstyle/defaultAlignment_white.png
  19. BIN
      designer_base/src/com/fr/design/images/m_format/cellstyle/h_s_normal_white.png
  20. BIN
      designer_base/src/com/fr/design/images/m_format/cellstyle/horizontal_white.png
  21. BIN
      designer_base/src/com/fr/design/images/m_format/cellstyle/in_white.png
  22. BIN
      designer_base/src/com/fr/design/images/m_format/cellstyle/italic.png
  23. BIN
      designer_base/src/com/fr/design/images/m_format/cellstyle/italic_white.png
  24. BIN
      designer_base/src/com/fr/design/images/m_format/cellstyle/left_white.png
  25. BIN
      designer_base/src/com/fr/design/images/m_format/cellstyle/out_white.png
  26. BIN
      designer_base/src/com/fr/design/images/m_format/cellstyle/right_white.png
  27. BIN
      designer_base/src/com/fr/design/images/m_format/cellstyle/top_white.png
  28. BIN
      designer_base/src/com/fr/design/images/m_format/cellstyle/v_center_normal_white.png
  29. BIN
      designer_base/src/com/fr/design/images/m_format/cellstyle/v_down_normal_white.png
  30. BIN
      designer_base/src/com/fr/design/images/m_format/cellstyle/v_top_normal_white.png
  31. BIN
      designer_base/src/com/fr/design/images/m_format/cellstyle/vertical_white.png
  32. 95
      designer_base/src/com/fr/design/javascript/JavaScriptImplPane.java
  33. 84
      designer_base/src/com/fr/design/javascript/ParameterJavaScriptPane.java
  34. 81
      designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java
  35. 80
      designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateCellLinkPane.java
  36. 77
      designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateFloatLinkPane.java
  37. 75
      designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/FormHyperlinkPane.java
  38. 15
      designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartDesignerInteractivePane.java
  39. 235
      designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartInteractivePane.java
  40. 59
      designer_chart/src/com/fr/plugin/chart/custom/component/VanChartHyperLinkPane.java
  41. 15
      designer_chart/src/com/fr/plugin/chart/designer/component/ChartUIMenuNameableCreator.java
  42. 1096
      designer_chart/src/com/fr/plugin/chart/designer/other/HyperlinkMapFactory.java
  43. 6
      designer_chart/src/com/fr/plugin/chart/drillmap/designer/other/VanChartCatalogHyperLinkPane.java
  44. 9
      designer_chart/src/com/fr/plugin/chart/map/designer/other/VanChartMapHyperLinkPane.java
  45. 5
      designer_form/src/com/fr/design/mainframe/widget/UITreeComboBox.java
  46. 5
      designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java

2
designer/src/com/fr/design/actions/cell/style/ReportFontItalicAction.java

@ -22,7 +22,7 @@ public class ReportFontItalicAction extends ReportFontBoldAction {
public ReportFontItalicAction(ElementCasePane t) {
super(t);
this.setName(Inter.getLocText("FRFont-italic"));
this.setName(Inter.getLocText("FR-Designer-FRFont_Italic"));
this.setSmallIcon(ICONS, true);
}

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;
}

2
designer_base/src/com/fr/design/extra/LoginWebPane.java

@ -27,7 +27,7 @@ public class LoginWebPane extends JFXPanel {
LoginWebPane.this.setScene(scene);
WebView webView = new WebView();
WebEngine webEngine = webView.getEngine();
webEngine.load("file:///" + installHome + "/scripts/qqLogin/web/login.html");
webEngine.load("file:///" + installHome + "/scripts/login.html");
webEngine.setOnAlert(new EventHandler<WebEvent<String>>() {
@Override
public void handle(WebEvent<String> event) {

2
designer_base/src/com/fr/design/extra/QQLoginWebPane.java

@ -62,7 +62,7 @@ public class QQLoginWebPane extends JFXPanel {
QQLoginWebPane.this.setScene(scene);
final WebView webView = new WebView();
webEngine = webView.getEngine();
url = "file:///" + installHome + "/scripts/qqLogin/web/qqLogin.html";
url = "file:///" + installHome + "/scripts/qqLogin.html";
webEngine.load(url);
final Stage primaryStage = new Stage();

12
designer_base/src/com/fr/design/extra/WebViewDlgHelper.java

@ -37,7 +37,7 @@ public class WebViewDlgHelper {
public static void createPluginDialog() {
if (StableUtils.getMajorJavaVersion() >= VERSION_8) {
String relativePath = "/scripts/store/web/index.html";
String relativePath = "/scripts/plugin.html";
String mainJsPath = StableUtils.pathJoin(installHome, relativePath);
File file = new File(mainJsPath);
if (!file.exists()) {
@ -52,7 +52,7 @@ public class WebViewDlgHelper {
downloadShopScripts(SHOP_SCRIPTS);
}
} else {
String indexPath = "index.html";
String indexPath = "plugin.html";
String mainIndexPath = StableUtils.pathJoin(installHome, indexPath);
checkAndCopyMainFile(mainIndexPath, mainJsPath);
showPluginDlg(mainIndexPath);
@ -73,7 +73,7 @@ public class WebViewDlgHelper {
}
/**
* 检查script文件夹中的index.html文件
* 检查script文件夹中的plugin.html文件
*
*/
public static void checkAndCopyMainFile(String indexPath, String mainJsPath){
@ -84,7 +84,7 @@ public class WebViewDlgHelper {
}
/**
* 將script文件夹中的index.html文件复制到webreport下
* 將script文件夹中的plugin.html文件复制到webreport下
*
*/
public static void copyMainFile(String indexPath, String mainJsPath){
@ -191,9 +191,9 @@ public class WebViewDlgHelper {
try {
if (get()) {
String relativePath = "/scripts/store/web/index.html";
String relativePath = "/scripts/plugin.html";
IOUtils.unzip(new File(StableUtils.pathJoin(PluginConstants.DOWNLOAD_PATH, PluginConstants.TEMP_FILE)), installHome);
copyMainFile(StableUtils.pathJoin(installHome, "index.html"), StableUtils.pathJoin(installHome, relativePath));
copyMainFile(StableUtils.pathJoin(installHome, "plugin.html"), StableUtils.pathJoin(installHome, relativePath));
// TODO: 2017/4/17 删除之前存放在安装目录下的script
PluginStoreConstants.refreshProps(); // 下载完刷新一下版本号等
JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer-Plugin_Shop_Installed"), Inter.getLocText("FR-Designer_Tooltips"), JOptionPane.INFORMATION_MESSAGE);

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);

12
designer_base/src/com/fr/design/gui/ibutton/UIToggleButton.java

@ -76,6 +76,18 @@ public class UIToggleButton extends UIButton implements GlobalNameObserver{
super(icons[0], null, icons[1]);
setSelectedIcon(icons[1]);
setExtraPainted(true);
if (!needRelease) {
addActionListener(new AbstractAction() {
@Override
public void actionPerformed(ActionEvent e) {
if (UIToggleButton.super.isSelected()) {
UIToggleButton.super.setSelected(false);
} else {
UIToggleButton.super.setSelected(true);
}
}
});
}
addMouseListener(getMouseListener());
}

6
designer_base/src/com/fr/design/gui/icombobox/UIComboBoxUI.java

@ -94,6 +94,10 @@ public class UIComboBoxUI extends BasicComboBoxUI implements MouseListener {
*/
@Override
public void paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus) {
paintCurrentValue(g, bounds, hasFocus, 0);
}
public void paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus, int paddingLeft) {
ListCellRenderer renderer = comboBox.getRenderer();
Component c;
@ -142,7 +146,7 @@ public class UIComboBoxUI extends BasicComboBoxUI implements MouseListener {
int x = bounds.x, y = bounds.y, w = bounds.width, h = bounds.height;
currentValuePane.paintComponent(g, c, comboBox, x, y, w, h, shouldValidate);
currentValuePane.paintComponent(g, c, comboBox, x + paddingLeft, y, w, h, shouldValidate);
}
@Override

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

14
designer_base/src/com/fr/design/gui/style/AlignmentPane.java

@ -83,12 +83,8 @@ public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameO
Icon[][] hAlignmentIconArray = {{BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal_white.png")},
{BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal_white.png")},
{BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal_white.png")},
{BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_s_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_s_normal.png")},
{BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/defaultAlignment.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/defaultAlignment.png")}};
// BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"),
// BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png"),
// BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_s_normal.png"),
// BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/defaultAlignment.png")};
{BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_s_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_s_normal_white.png")},
{BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/defaultAlignment.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/defaultAlignment_white.png")}};
Integer[] hAlignment = new Integer[]{Constants.LEFT, Constants.CENTER, Constants.RIGHT, Integer.valueOf(Constants.DISTRIBUTED), Constants.NULL};
hAlignmentPane = new UIButtonGroup<Integer>(hAlignmentIconArray, hAlignment);
hAlignmentPane.setAllToolTips(new String[]{Inter.getLocText("FR-Designer-StyleAlignment_Tooltips_Left"), Inter.getLocText("FR-Designer-StyleAlignment_Tooltips_Center"), Inter.getLocText("FR-Designer-StyleAlignment_Tooltips_Right"),
@ -96,9 +92,9 @@ public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameO
hPaneContainer = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
vPaneContainer = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
Icon[] vAlignmentIconArray = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/v_top_normal.png"),
BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/v_center_normal.png"),
BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/v_down_normal.png")};
Icon[][] vAlignmentIconArray = {{BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/v_top_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/v_top_normal_white.png")},
{BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/v_center_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/v_center_normal_white.png")},
{BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/v_down_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/v_down_normal_white.png")}};
Integer[] vAlignment = new Integer[]{Constants.TOP, Constants.CENTER, Constants.BOTTOM};
vAlignmentPane = new UIButtonGroup<Integer>(vAlignmentIconArray, vAlignment);
vAlignmentPane.setAllToolTips(new String[]{Inter.getLocText("FR-Designer-StyleAlignment_Tooltips_Top"), Inter.getLocText("FR-Designer-StyleAlignment_Tooltips_Center"), Inter.getLocText("FR-Designer-StyleAlignment_Tooltips_Bottom")});

16
designer_base/src/com/fr/design/gui/style/BorderPane.java

@ -82,10 +82,10 @@ public class BorderPane extends AbstractBasicStylePane implements GlobalNameObse
new Component[]{null, null},
new Component[]{new UILabel(Inter.getLocText("FR-Designer_Color") + " ", SwingConstants.LEFT), currentLineColorPane},
new Component[]{null, null},
new Component[]{new UILabel(Inter.getLocText("FR-Designer_outBorder") + " ", SwingConstants.LEFT), outerToggleButton = new UIToggleButton(BaseUtils.readIcon("com/fr/design/images/m_format/out.png"))},
new Component[]{new UILabel(Inter.getLocText("FR-Designer_outBorder") + " ", SwingConstants.LEFT), outerToggleButton = new UIToggleButton(new Icon[]{BaseUtils.readIcon("com/fr/design/images/m_format/out.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/out_white.png")}, false)},
new Component[]{null, externalPane},
new Component[]{null, null},
new Component[]{new UILabel(Inter.getLocText("FR-Designer_inBorder") + " ", SwingConstants.LEFT), innerToggleButton = new UIToggleButton(BaseUtils.readIcon("com/fr/design/images/m_format/in.png"))},
new Component[]{new UILabel(Inter.getLocText("FR-Designer_inBorder") + " ", SwingConstants.LEFT), innerToggleButton = new UIToggleButton(new Icon[]{BaseUtils.readIcon("com/fr/design/images/m_format/in.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/in_white.png")}, false)},
new Component[]{null, insidePane},
new Component[]{null, null}
};
@ -125,12 +125,12 @@ public class BorderPane extends AbstractBasicStylePane implements GlobalNameObse
};
private void initButtonsWithIcon() {
topToggleButton = new UIToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/top.png"));
leftToggleButton = new UIToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/left.png"));
bottomToggleButton = new UIToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/bottom.png"));
rightToggleButton = new UIToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/right.png"));
horizontalToggleButton = new UIToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/horizontal.png"));
verticalToggleButton = new UIToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/vertical.png"));
topToggleButton = new UIToggleButton(new Icon[]{BaseUtils.readIcon("/com/fr/base/images/dialog/border/top.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/top_white.png")}, false);
leftToggleButton = new UIToggleButton(new Icon[]{BaseUtils.readIcon("/com/fr/base/images/dialog/border/left.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/left_white.png")}, false);
bottomToggleButton = new UIToggleButton(new Icon[]{BaseUtils.readIcon("/com/fr/base/images/dialog/border/bottom.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bottom_white.png")}, false);
rightToggleButton = new UIToggleButton(new Icon[]{BaseUtils.readIcon("/com/fr/base/images/dialog/border/right.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/right_white.png")}, false);
horizontalToggleButton = new UIToggleButton(new Icon[]{BaseUtils.readIcon("/com/fr/base/images/dialog/border/horizontal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/horizontal_white.png")}, false);
verticalToggleButton = new UIToggleButton(new Icon[]{BaseUtils.readIcon("/com/fr/base/images/dialog/border/vertical.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/vertical_white.png")}, false);
this.currentLineCombo = new LineComboBox(CoreConstants.UNDERLINE_STYLE_ARRAY);
this.currentLineColorPane = new NewColorSelectBox(100);
}

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;
}

BIN
designer_base/src/com/fr/design/images/m_format/cellstyle/bottom_white.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 B

BIN
designer_base/src/com/fr/design/images/m_format/cellstyle/defaultAlignment_white.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 B

BIN
designer_base/src/com/fr/design/images/m_format/cellstyle/h_s_normal_white.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 B

BIN
designer_base/src/com/fr/design/images/m_format/cellstyle/horizontal_white.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 B

BIN
designer_base/src/com/fr/design/images/m_format/cellstyle/in_white.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

BIN
designer_base/src/com/fr/design/images/m_format/cellstyle/italic.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 221 B

After

Width:  |  Height:  |  Size: 226 B

BIN
designer_base/src/com/fr/design/images/m_format/cellstyle/italic_white.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 158 B

After

Width:  |  Height:  |  Size: 190 B

BIN
designer_base/src/com/fr/design/images/m_format/cellstyle/left_white.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 B

BIN
designer_base/src/com/fr/design/images/m_format/cellstyle/out_white.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 B

BIN
designer_base/src/com/fr/design/images/m_format/cellstyle/right_white.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

BIN
designer_base/src/com/fr/design/images/m_format/cellstyle/top_white.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 B

BIN
designer_base/src/com/fr/design/images/m_format/cellstyle/v_center_normal_white.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 B

BIN
designer_base/src/com/fr/design/images/m_format/cellstyle/v_down_normal_white.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 B

BIN
designer_base/src/com/fr/design/images/m_format/cellstyle/v_top_normal_white.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 B

BIN
designer_base/src/com/fr/design/images/m_format/cellstyle/vertical_white.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 B

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;
}
}
}

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();
}
};
}

5
designer_form/src/com/fr/design/mainframe/widget/UITreeComboBox.java

@ -121,6 +121,11 @@ public class UITreeComboBox extends UIComboBox {
protected ComboPopup createPopup() {
return new TreePopup(comboBox);
}
@Override
public void paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus) {
paintCurrentValue(g, bounds, hasFocus, 3);
}
}
class MotifJTreeComboBoxUI extends MotifComboBoxUI{

5
designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java

@ -238,12 +238,15 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane {
public void fireValueChanged() {
XCreator creator = getXCreatorDedicated();
creator.firePropertyChange();
designer.fireTargetModified();
firePropertyEdit();
}
public String getIconPath() {
return StringUtils.EMPTY;
}
public void firePropertyEdit() {
designer.getEditListenerTable().fireCreatorModified(DesignerEvent.CREATOR_EDITED);
}
}

Loading…
Cancel
Save