Browse Source

修改老图表部分面板问题

按照最新设计,处理连续弹窗问题
修改9.0新图表bug
master
mengao 7 years ago
parent
commit
59bd1b50ab
  1. 8
      designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java
  2. 5
      designer_chart/src/com/fr/design/chart/report/MapDataPane.java
  3. 31
      designer_chart/src/com/fr/design/chart/report/MapTableDataSinglePane.java
  4. 2
      designer_chart/src/com/fr/design/chart/series/PlotSeries/MapGroupExtensionPane.java
  5. 4
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/DatabaseTableDataPane.java
  6. 5
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartAccColorPane.java
  7. 21
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartCategoryPane.java
  8. 3
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java
  9. 21
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/datasheet/ChartDatasheetPane.java
  10. 9
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/MeterSeriesPane.java
  11. 13
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java
  12. 94
      designer_chart/src/com/fr/plugin/chart/custom/component/VanChartHyperLinkPane.java
  13. 27
      designer_chart/src/com/fr/plugin/chart/designer/other/HyperlinkMapFactory.java

8
designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java

@ -34,7 +34,7 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH
private UIToolbar toolBar; private UIToolbar toolBar;
private UIToolbar topToolBar; private UIToolbar topToolBar;
protected PopupEditDialog popupEditDialog; protected Window popupEditDialog;
// peter:这是整体的一个cardLayout Pane // peter:这是整体的一个cardLayout Pane
protected CardLayout cardLayout; protected CardLayout cardLayout;
@ -124,7 +124,7 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH
cardPane.add(selectLabel, "SELECT"); cardPane.add(selectLabel, "SELECT");
cardPane.add(controlUpdatePane, "EDIT"); cardPane.add(controlUpdatePane, "EDIT");
if (isNewStyle()) { if (isNewStyle()) {
popupEditDialog = new PopupEditDialog(cardPane); getPopupEditDialog(cardPane);
this.add(getLeftPane(), BorderLayout.CENTER); this.add(getLeftPane(), BorderLayout.CENTER);
this.setBorder(BorderFactory.createEmptyBorder(10, 10, 15, 15)); this.setBorder(BorderFactory.createEmptyBorder(10, 10, 15, 15));
} else { } else {
@ -139,6 +139,10 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH
this.checkButtonEnabled(); this.checkButtonEnabled();
} }
protected void getPopupEditDialog (JPanel cardPane) {
popupEditDialog = new PopupEditDialog(cardPane);
}
protected abstract JPanel createControlUpdatePane(); protected abstract JPanel createControlUpdatePane();
protected JPanel getLeftPane() { protected JPanel getLeftPane() {

5
designer_chart/src/com/fr/design/chart/report/MapDataPane.java

@ -1,7 +1,6 @@
package com.fr.design.chart.report; package com.fr.design.chart.report;
import com.fr.base.chart.chartdata.TopDefinitionProvider; import com.fr.base.chart.chartdata.TopDefinitionProvider;
import com.fr.chart.chartdata.TopDefinition;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartdata.MapMoreLayerReportDefinition; import com.fr.chart.chartdata.MapMoreLayerReportDefinition;
@ -9,11 +8,11 @@ import com.fr.chart.chartdata.MapMoreLayerTableDefinition;
import com.fr.chart.chartdata.MapSingleLayerReportDefinition; import com.fr.chart.chartdata.MapSingleLayerReportDefinition;
import com.fr.chart.chartdata.MapSingleLayerTableDefinition; import com.fr.chart.chartdata.MapSingleLayerTableDefinition;
import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.gui.frpane.UIComboBoxPane; import com.fr.design.gui.frpane.UIComboBoxPane;
import com.fr.design.gui.ilable.BoldFontTextLabel; import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.mainframe.chart.gui.data.DataContentsPane; import com.fr.design.mainframe.chart.gui.data.DataContentsPane;
import com.fr.design.dialog.BasicScrollPane;
import com.fr.general.Inter; import com.fr.general.Inter;
import javax.swing.*; import javax.swing.*;
@ -88,7 +87,7 @@ public class MapDataPane extends DataContentsPane {
protected void initLayout() { protected void initLayout() {
this.setLayout(new BorderLayout(0, 6)); this.setLayout(new BorderLayout(0, 6));
JPanel northPane = new JPanel(new FlowLayout(FlowLayout.LEFT)); JPanel northPane = new JPanel(new FlowLayout(FlowLayout.LEFT));
northPane.add(new BoldFontTextLabel(Inter.getLocText("Map Show Type") + ":")); northPane.add(new BoldFontTextLabel(Inter.getLocText("FR-Chart-Map_ShowWay") + ":"));
northPane.add(jcb); northPane.add(jcb);
this.add(northPane, BorderLayout.NORTH); this.add(northPane, BorderLayout.NORTH);
this.add(cardPane, BorderLayout.CENTER); this.add(cardPane, BorderLayout.CENTER);

31
designer_chart/src/com/fr/design/chart/report/MapTableDataSinglePane.java

@ -1,27 +1,11 @@
package com.fr.design.chart.report; package com.fr.design.chart.report;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.ArrayList;
import java.util.List;
import javax.swing.JComponent;
import javax.swing.JPanel;
import javax.swing.JTable;
import javax.swing.SwingConstants;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import com.fr.base.Utils; import com.fr.base.Utils;
import com.fr.chart.chartdata.MapSingleLayerTableDefinition; import com.fr.chart.chartdata.MapSingleLayerTableDefinition;
import com.fr.chart.chartdata.SeriesDefinition; import com.fr.chart.chartdata.SeriesDefinition;
import com.fr.data.impl.NameTableData; import com.fr.data.impl.NameTableData;
import com.fr.design.data.tabledata.wrapper.TableDataWrapper;
import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.data.tabledata.wrapper.TableDataWrapper;
import com.fr.design.event.UIObserver; import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener; import com.fr.design.event.UIObserverListener;
import com.fr.design.gui.frpane.UICorrelationPane; import com.fr.design.gui.frpane.UICorrelationPane;
@ -33,6 +17,15 @@ import com.fr.design.mainframe.chart.gui.data.DatabaseTableDataPane;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.*;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.*;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.ArrayList;
import java.util.List;
/** /**
* 单层地图时: 数据集 定义界面 * 单层地图时: 数据集 定义界面
* *
@ -60,6 +53,10 @@ public class MapTableDataSinglePane extends FurtherBasicBeanPane<MapSingleLayerT
UILabel label = new UILabel(Inter.getLocText("Select_Data_Set") + ":", SwingConstants.RIGHT); UILabel label = new UILabel(Inter.getLocText("Select_Data_Set") + ":", SwingConstants.RIGHT);
northPane.add(fromTableData = new DatabaseTableDataPane(label) { northPane.add(fromTableData = new DatabaseTableDataPane(label) {
@Override
protected void setBorder () {
this.setBorder(BorderFactory.createEmptyBorder());
}
@Override @Override
protected void userEvent() { protected void userEvent() {
refreshAreaNameBox(); refreshAreaNameBox();

2
designer_chart/src/com/fr/design/chart/series/PlotSeries/MapGroupExtensionPane.java

File diff suppressed because one or more lines are too long

4
designer_chart/src/com/fr/design/mainframe/chart/gui/data/DatabaseTableDataPane.java

@ -41,10 +41,12 @@ public class DatabaseTableDataPane extends BasicPane{
pane.add(reviewButton,BorderLayout.EAST); pane.add(reviewButton,BorderLayout.EAST);
this.add(pane,BorderLayout.CENTER); this.add(pane,BorderLayout.CENTER);
setBorder ();
}
protected void setBorder () {
this.setBorder(BorderFactory.createEmptyBorder(0,24,0,15)); this.setBorder(BorderFactory.createEmptyBorder(0,24,0,15));
} }
/** /**
* 返回选中的数据源. * 返回选中的数据源.
*/ */

5
designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartAccColorPane.java

@ -1,6 +1,7 @@
package com.fr.design.mainframe.chart.gui.style; package com.fr.design.mainframe.chart.gui.style;
import com.fr.chart.base.ChartConstants; import com.fr.chart.base.ChartConstants;
import com.fr.design.dialog.BasicPane;
import com.fr.design.event.UIObserver; import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener; import com.fr.design.event.UIObserverListener;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
@ -9,11 +10,9 @@ import com.fr.design.style.color.ColorSelectConfigManager;
import com.fr.design.style.color.ColorSelectDetailPane; import com.fr.design.style.color.ColorSelectDetailPane;
import com.fr.design.style.color.ColorSelectDialog; import com.fr.design.style.color.ColorSelectDialog;
import com.fr.design.style.color.ColorSelectable; import com.fr.design.style.color.ColorSelectable;
import com.fr.design.dialog.BasicPane;
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener; import javax.swing.event.ChangeListener;
import java.awt.*; import java.awt.*;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.awt.event.MouseListener; import java.awt.event.MouseListener;
@ -73,7 +72,7 @@ public class ChartAccColorPane extends BasicPane implements MouseListener, UIObs
} }
Paint oldPaint = g2d.getPaint(); Paint oldPaint = g2d.getPaint();
g2d.setPaint(new Color(212, 212, 216)); g2d.setPaint(new Color(212, 212, 216));
g2d.fillRect(0, 0, (int)bounds.getWidth(), (int)bounds.getHeight()); g2d.fillRect(0, 0, WIDTH*ROWCOUNT, WIDTH*4);
g2d.setPaint(oldPaint); g2d.setPaint(oldPaint);
int y = 0; int y = 0;

21
designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartCategoryPane.java

@ -1,12 +1,5 @@
package com.fr.design.mainframe.chart.gui.style.axis; package com.fr.design.mainframe.chart.gui.style.axis;
import java.awt.BorderLayout;
import java.awt.Component;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.JSeparator;
import com.fr.chart.chartattr.Axis; import com.fr.chart.chartattr.Axis;
import com.fr.chart.chartattr.Bar2DPlot; import com.fr.chart.chartattr.Bar2DPlot;
import com.fr.chart.chartattr.CategoryAxis; import com.fr.chart.chartattr.CategoryAxis;
@ -15,10 +8,18 @@ import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.style.FormatPane; import com.fr.design.gui.style.FormatPane;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.style.*; import com.fr.design.mainframe.chart.gui.style.ChartAxisLabelPane;
import com.fr.design.mainframe.chart.gui.style.ChartAxisLineStylePane;
import com.fr.design.mainframe.chart.gui.style.ChartAxisTitleNoFormulaPane;
import com.fr.design.mainframe.chart.gui.style.ChartAxisTitlePane;
import com.fr.design.mainframe.chart.gui.style.ChartAxisValueTypePane;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.designer.component.format.FormatPaneWithOutFont;
import com.fr.stable.Constants; import com.fr.stable.Constants;
import com.fr.design.utils.gui.GUICoreUtils;
import javax.swing.*;
import java.awt.*;
public class ChartCategoryPane extends ChartAxisUsePane<Axis>{ public class ChartCategoryPane extends ChartAxisUsePane<Axis>{
@ -46,7 +47,7 @@ public class ChartCategoryPane extends ChartAxisUsePane<Axis>{
axisValuePane = new ChartAxisValueTypePane(); axisValuePane = new ChartAxisValueTypePane();
axisLineStylePane = new ChartAxisLineStylePane(); axisLineStylePane = new ChartAxisLineStylePane();
formatPane = new FormatPane(); formatPane = new FormatPaneWithOutFont();
axisLabelPane = new ChartAxisLabelPane(); axisLabelPane = new ChartAxisLabelPane();
axisReversed = new UICheckBox(Inter.getLocText("AxisReversed")); axisReversed = new UICheckBox(Inter.getLocText("AxisReversed"));
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());

3
designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java

@ -25,6 +25,7 @@ import com.fr.design.mainframe.chart.gui.style.ChartAxisTitleNoFormulaPane;
import com.fr.design.mainframe.chart.gui.style.ChartAxisTitlePane; import com.fr.design.mainframe.chart.gui.style.ChartAxisTitlePane;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.designer.component.format.FormatPaneWithOutFont;
import com.fr.stable.Constants; import com.fr.stable.Constants;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -74,7 +75,7 @@ public class ChartValuePane extends ChartAxisUsePane<Axis>{
zeroPane = aliagnZero4Second(); zeroPane = aliagnZero4Second();
axisReversed = new UICheckBox(Inter.getLocText("FR-Designer_AxisReversed")); axisReversed = new UICheckBox(Inter.getLocText("FR-Designer_AxisReversed"));
unitCombox = new UIComboBox(ChartConstants.UNIT_I18N_VALUES); unitCombox = new UIComboBox(ChartConstants.UNIT_I18N_VALUES);
formatPane = new FormatPane(); formatPane = new FormatPaneWithOutFont();
axisLabelPane = new ChartAxisLabelPane(); axisLabelPane = new ChartAxisLabelPane();
dataPane = createDataDefinePane(); dataPane = createDataDefinePane();

21
designer_chart/src/com/fr/design/mainframe/chart/gui/style/datasheet/ChartDatasheetPane.java

@ -1,18 +1,11 @@
package com.fr.design.mainframe.chart.gui.style.datasheet; package com.fr.design.mainframe.chart.gui.style.datasheet;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JPanel;
import javax.swing.JSeparator;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.DataSheet; import com.fr.chart.chartglyph.DataSheet;
import com.fr.design.constants.LayoutConstants; import com.fr.design.constants.LayoutConstants;
import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.style.FormatPane; import com.fr.design.gui.style.FormatPane;
@ -21,10 +14,15 @@ import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.PaneTitleConstants; import com.fr.design.mainframe.chart.PaneTitleConstants;
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane; import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane;
import com.fr.design.mainframe.chart.gui.style.axis.ChartAxisPane; import com.fr.design.mainframe.chart.gui.style.axis.ChartAxisPane;
import com.fr.design.dialog.BasicScrollPane; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.FRFont; import com.fr.general.FRFont;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.plugin.chart.designer.component.format.FormatPaneWithNormalType;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class ChartDatasheetPane extends BasicScrollPane<Chart>{ public class ChartDatasheetPane extends BasicScrollPane<Chart>{
private static final long serialVersionUID = -4854070113748783014L; private static final long serialVersionUID = -4854070113748783014L;
@ -48,8 +46,7 @@ public class ChartDatasheetPane extends BasicScrollPane<Chart>{
double[] rowSize = { p, p, p, p}; double[] rowSize = { p, p, p, p};
isDatasheetVisable = new UICheckBox(Inter.getLocText("Chart_Show_Data_Sheet")); isDatasheetVisable = new UICheckBox(Inter.getLocText("Chart_Show_Data_Sheet"));
textAttrPane = new ChartTextAttrPane(); textAttrPane = new ChartTextAttrPane();
formatPane = new FormatPane(); formatPane = new FormatPaneWithNormalType();
formatPane.setForDataSheet();
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{null,textAttrPane}, new Component[]{null,textAttrPane},
new Component[]{new JSeparator(),null}, new Component[]{new JSeparator(),null},

9
designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/MeterSeriesPane.java

@ -54,7 +54,14 @@ public class MeterSeriesPane extends AbstractPlotSeriesPane {
} }
protected UIColorPickerPane createColorPickerPane(){ protected UIColorPickerPane createColorPickerPane(){
return new ColorPickerPaneWithFormula("meterString"); return new ColorPickerPaneWithFormula("meterString"){
protected double getEditAreaWidth () {
return 120;
}
protected int getColorgroupMarginLeft () {
return 20;
}
};
} }

13
designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java

@ -186,7 +186,7 @@ public class UIColorPickerPane extends BasicPane implements UIObserver {
}; };
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; double e = getEditAreaWidth ();
double d = TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH; double d = TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH;
double[] columnSize = {d, e}; double[] columnSize = {d, e};
double[] rowSize = {p}; double[] rowSize = {p};
@ -209,7 +209,10 @@ public class UIColorPickerPane extends BasicPane implements UIObserver {
this.textFieldList = this.getTextFieldList(); this.textFieldList = this.getTextFieldList();
refreshGroupPane(colors, getValueArray(number)); refreshGroupPane(colors, getValueArray(number));
}
protected double getEditAreaWidth () {
return TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
} }
protected ArrayList getTextFieldList(){ protected ArrayList getTextFieldList(){
@ -560,6 +563,10 @@ public class UIColorPickerPane extends BasicPane implements UIObserver {
return null; return null;
} }
protected int getColorgroupMarginLeft () {
return COLORGROUP_MARGIN_LEFT;
}
private LayoutManager layoutMeter = new LayoutManager() { private LayoutManager layoutMeter = new LayoutManager() {
@Override @Override
public void removeLayoutComponent(Component comp) { public void removeLayoutComponent(Component comp) {
@ -580,8 +587,8 @@ public class UIColorPickerPane extends BasicPane implements UIObserver {
public void layoutContainer(Container parent) { public void layoutContainer(Container parent) {
upControlPane.setBounds(MARGIN_LEFT, MARGIN_TOP, UPCONTROLPANE_WIDTH, upControlPane.getPreferredSize().height + MARGIN_TOP); upControlPane.setBounds(MARGIN_LEFT, MARGIN_TOP, UPCONTROLPANE_WIDTH, upControlPane.getPreferredSize().height + MARGIN_TOP);
stagePanel.setBounds(MARGIN_LEFT, upControlPane.getPreferredSize().height + LAYOUR_DET + MARGIN_TOP, UPCONTROLPANE_WIDTH, stagePanel.getPreferredSize().height); stagePanel.setBounds(MARGIN_LEFT, upControlPane.getPreferredSize().height + LAYOUR_DET + MARGIN_TOP, UPCONTROLPANE_WIDTH, stagePanel.getPreferredSize().height);
colorGroup.setBounds(COLORGROUP_MARGIN_LEFT, 2 * MARGIN_TOP + upControlPane.getPreferredSize().height + stagePanel.getPreferredSize().height + 2 * LAYOUR_DET, colorGroup.getPreferredSize().width, colorGroup.getPreferredSize().height + upControlPane.getPreferredSize().height); colorGroup.setBounds( getColorgroupMarginLeft (), 2 * MARGIN_TOP + upControlPane.getPreferredSize().height + stagePanel.getPreferredSize().height + 2 * LAYOUR_DET, colorGroup.getPreferredSize().width, colorGroup.getPreferredSize().height + upControlPane.getPreferredSize().height);
textGroup.setBounds(colorGroup.getPreferredSize().width + COLORGROUP_MARGIN_LEFT, upControlPane.getPreferredSize().height + stagePanel.getPreferredSize().height + 2 * LAYOUR_DET + MARGIN_TOP, textGroup.getPreferredSize().width, textGroup.getPreferredSize().height); textGroup.setBounds(colorGroup.getPreferredSize().width + getColorgroupMarginLeft (), upControlPane.getPreferredSize().height + stagePanel.getPreferredSize().height + 2 * LAYOUR_DET + MARGIN_TOP, textGroup.getPreferredSize().width, textGroup.getPreferredSize().height);
} }
@Override @Override

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

@ -12,8 +12,12 @@ import com.fr.design.fun.HyperlinkProvider;
import com.fr.design.gui.controlpane.NameObjectCreator; import com.fr.design.gui.controlpane.NameObjectCreator;
import com.fr.design.gui.controlpane.NameableCreator; import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.gui.controlpane.UIListControlPane; import com.fr.design.gui.controlpane.UIListControlPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.imenutable.UIMenuNameableCreator; import com.fr.design.gui.imenutable.UIMenuNameableCreator;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.module.DesignModuleFactory; import com.fr.design.module.DesignModuleFactory;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.general.NameObject; import com.fr.general.NameObject;
import com.fr.js.EmailJavaScript; import com.fr.js.EmailJavaScript;
@ -31,6 +35,10 @@ import com.fr.stable.ListMap;
import com.fr.stable.Nameable; import com.fr.stable.Nameable;
import com.fr.stable.bridge.StableFactory; import com.fr.stable.bridge.StableFactory;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
@ -116,6 +124,10 @@ public class VanChartHyperLinkPane extends UIListControlPane {
} }
public void populate(Plot plot) { public void populate(Plot plot) {
//特殊处理,使用instanceof判断,处理连续弹窗问题
if (SwingUtilities.getWindowAncestor(this) instanceof JDialog) {
popupEditDialog = new HyperDialog(cardPane);
}
this.plot = plot; this.plot = plot;
HashMap paneMap = getHyperlinkMap(plot); HashMap paneMap = getHyperlinkMap(plot);
@ -229,4 +241,86 @@ public class VanChartHyperLinkPane extends UIListControlPane {
return null; return null;
} }
protected void popupEditDialog(Point mousePos) {
//特殊处理,处理连续弹窗情况
if (SwingUtilities.getWindowAncestor(this) instanceof JDialog) {
GUICoreUtils.centerWindow(popupEditDialog);
popupEditDialog.setVisible(true);
return;
}
super.popupEditDialog(mousePos);
}
// 点击"编辑"按钮,弹出面板
protected class HyperDialog extends JDialog {
private JComponent editPane;
private static final int WIDTH = 570;
private static final int HEIGHT = 490;
private UIButton okButton, cancelButton;
HyperDialog(JComponent pane) {
super(DesignerContext.getDesignerFrame(), true);
pane.setBorder(BorderFactory.createEmptyBorder(20, 10, 10, 10));
this.editPane = pane;
JPanel editPaneWrapper = new JPanel(new BorderLayout());
editPaneWrapper.add(editPane, BorderLayout.CENTER);
this.getContentPane().add(editPaneWrapper, BorderLayout.CENTER);
this.getContentPane().add(createControlButtonPane(), BorderLayout.SOUTH);
setSize(WIDTH, HEIGHT);
this.setVisible(false);
}
private JPanel createControlButtonPane() {
JPanel controlPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
JPanel buttonsPane = new JPanel(new FlowLayout(FlowLayout.LEFT, 10, 0));
controlPane.add(buttonsPane, BorderLayout.EAST);
//确定
addOkButton(buttonsPane);
//取消
addCancelButton(buttonsPane);
controlPane.setBorder(BorderFactory.createEmptyBorder(10,0,10,0));
return controlPane;
}
private void addCancelButton(JPanel buttonsPane) {
cancelButton = new UIButton(Inter.getLocText("Cancel"));
buttonsPane.add(cancelButton);
cancelButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
doCancel();
}
});
}
private void addOkButton(JPanel buttonsPane) {
okButton = new UIButton(Inter.getLocText("OK"));
buttonsPane.add(okButton);
okButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
doOK();
}
});
}
public void doOK() {
saveSettings();
setVisible(false);
}
public void doCancel() {
setVisible(false);
}
}
} }

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

@ -12,13 +12,25 @@ import com.fr.design.chart.series.SeriesCondition.impl.ChartHyperRelateFloatLink
import com.fr.design.chart.series.SeriesCondition.impl.FormHyperlinkPane; import com.fr.design.chart.series.SeriesCondition.impl.FormHyperlinkPane;
import com.fr.design.editor.ValueEditorPane; import com.fr.design.editor.ValueEditorPane;
import com.fr.design.editor.ValueEditorPaneFactory; import com.fr.design.editor.ValueEditorPaneFactory;
import com.fr.design.editor.editor.*; import com.fr.design.editor.editor.BooleanEditor;
import com.fr.design.editor.editor.ConstantsEditor;
import com.fr.design.editor.editor.DateEditor;
import com.fr.design.editor.editor.DoubleEditor;
import com.fr.design.editor.editor.Editor;
import com.fr.design.editor.editor.FormulaEditor;
import com.fr.design.editor.editor.IntegerEditor;
import com.fr.design.editor.editor.TextEditor;
import com.fr.design.hyperlink.ReportletHyperlinkPane; import com.fr.design.hyperlink.ReportletHyperlinkPane;
import com.fr.design.hyperlink.WebHyperlinkPane; import com.fr.design.hyperlink.WebHyperlinkPane;
import com.fr.design.javascript.JavaScriptImplPane; import com.fr.design.javascript.JavaScriptImplPane;
import com.fr.design.javascript.ParameterJavaScriptPane; import com.fr.design.javascript.ParameterJavaScriptPane;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.js.*; import com.fr.js.EmailJavaScript;
import com.fr.js.FormHyperlinkProvider;
import com.fr.js.JavaScriptImpl;
import com.fr.js.ParameterJavaScript;
import com.fr.js.ReportletHyperlink;
import com.fr.js.WebHyperlink;
import com.fr.plugin.chart.area.VanChartAreaPlot; import com.fr.plugin.chart.area.VanChartAreaPlot;
import com.fr.plugin.chart.bubble.BubblePlotType; import com.fr.plugin.chart.bubble.BubblePlotType;
import com.fr.plugin.chart.bubble.VanChartBubblePlot; import com.fr.plugin.chart.bubble.VanChartBubblePlot;
@ -28,16 +40,16 @@ import com.fr.plugin.chart.custom.type.CustomStyle;
import com.fr.plugin.chart.drillmap.VanChartDrillMapPlot; import com.fr.plugin.chart.drillmap.VanChartDrillMapPlot;
import com.fr.plugin.chart.funnel.VanChartFunnelPlot; import com.fr.plugin.chart.funnel.VanChartFunnelPlot;
import com.fr.plugin.chart.gantt.VanChartGanttPlot; import com.fr.plugin.chart.gantt.VanChartGanttPlot;
import com.fr.plugin.chart.type.GaugeStyle;
import com.fr.plugin.chart.gauge.VanChartGaugePlot; import com.fr.plugin.chart.gauge.VanChartGaugePlot;
import com.fr.plugin.chart.heatmap.VanChartHeatMapPlot; import com.fr.plugin.chart.heatmap.VanChartHeatMapPlot;
import com.fr.plugin.chart.line.VanChartLinePlot; import com.fr.plugin.chart.line.VanChartLinePlot;
import com.fr.plugin.chart.type.MapType;
import com.fr.plugin.chart.map.VanChartMapPlot; import com.fr.plugin.chart.map.VanChartMapPlot;
import com.fr.plugin.chart.multilayer.VanChartMultiPiePlot; import com.fr.plugin.chart.multilayer.VanChartMultiPiePlot;
import com.fr.plugin.chart.scatter.VanChartScatterPlot; import com.fr.plugin.chart.scatter.VanChartScatterPlot;
import com.fr.plugin.chart.structure.VanChartStructurePlot; import com.fr.plugin.chart.structure.VanChartStructurePlot;
import com.fr.plugin.chart.treemap.VanChartTreeMapPlot; import com.fr.plugin.chart.treemap.VanChartTreeMapPlot;
import com.fr.plugin.chart.type.GaugeStyle;
import com.fr.plugin.chart.type.MapType;
import com.fr.plugin.chart.wordcloud.VanChartWordCloudPlot; import com.fr.plugin.chart.wordcloud.VanChartWordCloudPlot;
import java.util.ArrayList; import java.util.ArrayList;
@ -771,6 +783,13 @@ public class HyperlinkMapFactory {
public static class VAN_CHART extends ChartHyperRelateCellLinkPane{ public static class VAN_CHART extends ChartHyperRelateCellLinkPane{
} }
public static class VAN_CHART_MULTICATEGORY extends ChartHyperRelateCellLinkPane{
@Override
protected ValueEditorPane getValueEditorPane() {
return getMultiCategoryEditorPane();
}
}
public static class VAN_CHART_SCATTER extends ChartHyperRelateCellLinkPane{ public static class VAN_CHART_SCATTER extends ChartHyperRelateCellLinkPane{
@Override @Override
protected ValueEditorPane getValueEditorPane() { protected ValueEditorPane getValueEditorPane() {

Loading…
Cancel
Save