Browse Source

Merge pull request #184 in DESIGN/design from ~ZHENG/c-design:release/10.0 to release/10.0

* commit '56bd32b5ed03cf9a9c1a4671595876e83dbd54ee':
  CHART-2144 910
  CHART-1882 910
  CHART-1844 910
  CHART-1922 910
  CHART-1748 910
  CHART-2105 910
  CHART-1824 910
master
zheng 6 years ago
parent
commit
20d966beb1
  1. 19
      designer-base/src/com/fr/design/actions/core/ActionFactory.java
  2. 3
      designer-base/src/com/fr/design/condition/ConditionAttributesPane.java
  3. 2
      designer-chart/src/com/fr/design/chart/ChartDesignerActivator.java
  4. BIN
      designer-chart/src/com/fr/design/images/EmptyChart.png
  5. BIN
      designer-chart/src/com/fr/design/images/us_emptydata.png
  6. BIN
      designer-chart/src/com/fr/design/images/zh_emptydata.png
  7. 46
      designer-chart/src/com/fr/design/module/ChartEmptyDataStyleAction.java
  8. 242
      designer-chart/src/com/fr/design/module/ChartEmptyDataStylePane.java
  9. 7
      designer-chart/src/com/fr/van/chart/column/VanChartCustomStackAndAxisConditionPane.java
  10. 19
      designer-chart/src/com/fr/van/chart/designer/other/VanChartInteractivePane.java
  11. 10
      designer-chart/src/com/fr/van/chart/designer/style/background/AlertLineListControlPane.java
  12. 10
      designer-chart/src/com/fr/van/chart/designer/style/background/BackgroundListControlPane.java
  13. 6
      designer-chart/src/com/fr/van/chart/designer/style/series/VanChartStackedAndAxisListControlPane.java
  14. 7
      designer-chart/src/com/fr/van/chart/map/designer/type/VanChartMapSourceChoosePane.java
  15. BIN
      designer-chart/src/com/fr/van/chart/map/images/marker-icon.png
  16. BIN
      designer-chart/src/com/fr/van/chart/map/images/marker-iconx2.png
  17. 5
      designer-realize/src/com/fr/start/Designer.java

19
designer-base/src/com/fr/design/actions/core/ActionFactory.java

@ -50,6 +50,7 @@ public class ActionFactory {
private static ConcurrentMap<Class, Class<? extends QuickEditor>> cellEditorClass = new ConcurrentHashMap<>(); private static ConcurrentMap<Class, Class<? extends QuickEditor>> cellEditorClass = new ConcurrentHashMap<>();
private static UpdateAction chartPreStyleAction = null; private static UpdateAction chartPreStyleAction = null;
private static UpdateAction chartEmptyDataStyleAction = null;
private static UpdateAction chartMapEditorAction = null; private static UpdateAction chartMapEditorAction = null;
private ActionFactory() { private ActionFactory() {
@ -159,6 +160,24 @@ public class ActionFactory {
return chartMapEditorAction; return chartMapEditorAction;
} }
/**
* 注册图表的 空数据提示样式.
*
* @param action 注册的图表空数据提示样式action
*/
public static void registerChartEmptyDataStyleAction(UpdateAction action) {
chartEmptyDataStyleAction = action;
}
/**
* 图表空数据提示样式Action
*
* @return 图表空数据提示样式Action
*/
public static UpdateAction getChartEmptyDataStyleAction() {
return chartEmptyDataStyleAction;
}
/** /**
* 获取图表集合类 * 获取图表集合类

3
designer-base/src/com/fr/design/condition/ConditionAttributesPane.java

@ -11,10 +11,12 @@ import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import javax.swing.*; import javax.swing.*;
import java.awt.Dimension;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
public abstract class ConditionAttributesPane<T> extends BasicBeanPane<T> { public abstract class ConditionAttributesPane<T> extends BasicBeanPane<T> {
private static final int MIN_HEIGHT = 60;
protected CellHighlightAddMenuDef menuDef; protected CellHighlightAddMenuDef menuDef;
protected JPanel selectedItemPane; protected JPanel selectedItemPane;
@ -61,6 +63,7 @@ public abstract class ConditionAttributesPane<T> extends BasicBeanPane<T> {
JScrollPane selectedItemScrollPane = new JScrollPane(); JScrollPane selectedItemScrollPane = new JScrollPane();
selectedItemScrollPane.setViewportView(selectedItemPane); selectedItemScrollPane.setViewportView(selectedItemPane);
selectedItemScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); selectedItemScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
selectedItemScrollPane.setMinimumSize(new Dimension((int) selectedItemScrollPane.getPreferredSize().getWidth(), MIN_HEIGHT));
propertyChangePane.add(selectedItemScrollPane); propertyChangePane.add(selectedItemScrollPane);
} }

2
designer-chart/src/com/fr/design/chart/ChartDesignerActivator.java

@ -6,6 +6,7 @@ import com.fr.design.actions.core.ActionFactory;
import com.fr.design.chart.gui.ChartComponent; import com.fr.design.chart.gui.ChartComponent;
import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.mainframe.ChartPropertyPane; import com.fr.design.mainframe.ChartPropertyPane;
import com.fr.design.module.ChartEmptyDataStyleAction;
import com.fr.design.module.ChartHyperlinkGroup; import com.fr.design.module.ChartHyperlinkGroup;
import com.fr.design.module.ChartPreStyleAction; import com.fr.design.module.ChartPreStyleAction;
import com.fr.design.module.DesignModuleFactory; import com.fr.design.module.DesignModuleFactory;
@ -38,6 +39,7 @@ public class ChartDesignerActivator extends Activator {
DesignModuleFactory.registerChartPropertyPaneClass(ChartPropertyPane.class); DesignModuleFactory.registerChartPropertyPaneClass(ChartPropertyPane.class);
ActionFactory.registerChartPreStyleAction(new ChartPreStyleAction()); ActionFactory.registerChartPreStyleAction(new ChartPreStyleAction());
ActionFactory.registerChartEmptyDataStyleAction(new ChartEmptyDataStyleAction());
ActionFactory.registerChartMapEditorAction(new ChartMapEditorAction()); ActionFactory.registerChartMapEditorAction(new ChartMapEditorAction());
ActionFactory.registerChartCollection(ChartCollection.class); ActionFactory.registerChartCollection(ChartCollection.class);

BIN
designer-chart/src/com/fr/design/images/EmptyChart.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 B

BIN
designer-chart/src/com/fr/design/images/us_emptydata.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
designer-chart/src/com/fr/design/images/zh_emptydata.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

46
designer-chart/src/com/fr/design/module/ChartEmptyDataStyleAction.java

@ -0,0 +1,46 @@
package com.fr.design.module;
import com.fr.design.actions.UpdateAction;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.DesignerFrame;
import com.fr.general.IOUtils;
import com.fr.general.Inter;
import java.awt.event.ActionEvent;
/**
* Created by mengao on 2017/11/23.
* 空数据配置action
*/
public class ChartEmptyDataStyleAction extends UpdateAction {
public ChartEmptyDataStyleAction() {
this.setSmallIcon(IOUtils.readIcon("com/fr/design/images/EmptyChart.png"));
this.setName(Inter.getLocText("FR-Designer_Chart_Empty_Data"));
}
@Override
public void actionPerformed(ActionEvent e) {
DesignerFrame designerFrame = DesignerContext.getDesignerFrame();
final ChartEmptyDataStylePane pane = new ChartEmptyDataStylePane();
BasicDialog dialog = pane.showWindow(designerFrame);
dialog.addDialogActionListener(new DialogActionAdapter() {
@Override
public void doOk() {
pane.updateBean();
}
@Override
public void doCancel() {
//直接关闭弹出框
}
});
pane.populateBean();
dialog.setVisible(true);
}
}

242
designer-chart/src/com/fr/design/module/ChartEmptyDataStylePane.java

@ -0,0 +1,242 @@
package com.fr.design.module;
import com.fr.base.BaseUtils;
import com.fr.base.ChartEmptyDataStyleConf;
import com.fr.design.gui.frpane.AbstractAttrNoScrollPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ibutton.UIRadioButton;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.DesignerFrame;
import com.fr.design.style.background.image.ImageFileChooser;
import com.fr.design.style.background.image.ImagePreviewPane;
import com.fr.design.utils.ImageUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.GeneralContext;
import com.fr.general.IOUtils;
import com.fr.general.Inter;
import com.fr.stable.CoreGraphHelper;
import com.fr.stable.StringUtils;
import javax.swing.BorderFactory;
import javax.swing.ButtonGroup;
import javax.swing.JFileChooser;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.SwingWorker;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.GridLayout;
import java.awt.Image;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
/**
* Created by mengao on 2017/11/23.
*/
public class ChartEmptyDataStylePane extends AbstractAttrNoScrollPane {
private static final int WIDTH = 150;
private static final int HEIGHT = 20;
private static final int FIVE = 5;
private static final int TEN = 10;
private static final int THIRTY = 30;
private static Image DEFAULT_EMPTY_DATA_IMAGE;
private UIButtonGroup emptyData;
private UIRadioButton defaultRadioButton;
private UIRadioButton customRadioButton;
private UIButton selectPictureButton;
private ImagePreviewPane previewPane;
private ImageFileChooser imageFileChooser;
private Image emptyDataImage = DEFAULT_EMPTY_DATA_IMAGE;
private SwingWorker<Void, Void> imageWorker;
static {
DEFAULT_EMPTY_DATA_IMAGE = GeneralContext.isChineseEnv() ? IOUtils.readImage("com/fr/design/images/zh_emptydata.png")
: IOUtils.readImage("com/fr/design/images/us_emptydata.png");
}
@Override
protected JPanel createContentPane() {
JPanel content = new JPanel(new BorderLayout());
content.add(creatNorthPane(), BorderLayout.NORTH);
content.add(creatCenterPane(), BorderLayout.CENTER);
return content;
}
private JPanel creatNorthPane() {
emptyData = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Open"), Inter.getLocText("Plugin-ChartF_Close")});
emptyData.setSelectedIndex(0);
emptyData.setPreferredSize(new Dimension(WIDTH, HEIGHT));
emptyData.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
checkEmptyDataStyle();
repaintPreviewPane();
}
});
UILabel promptContent = new UILabel(Inter.getLocText("FR-Designer_Tip_Content"));
JPanel northPane = GUICoreUtils.createFlowPane(new Component[]{promptContent, emptyData}, FlowLayout.LEFT, TEN, 0);
northPane.setBorder(BorderFactory.createEmptyBorder(0, FIVE, 0, 0));
return northPane;
}
private JPanel creatCenterPane() {
JPanel centerPane = new JPanel(FRGUIPaneFactory.createBorderLayout());
// preview pane
JPanel previewContainerPane = FRGUIPaneFactory.createBorderLayout_L_Pane();
centerPane.add(previewContainerPane, BorderLayout.CENTER);
JPanel previewOwnerPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_Preview"));
previewOwnerPane.setLayout(new BorderLayout());
previewContainerPane.add(previewOwnerPane, BorderLayout.CENTER);
previewContainerPane.add(initSelectFilePane(), BorderLayout.EAST);
previewPane = new ImagePreviewPane();
previewOwnerPane.add(new JScrollPane(previewPane));
// init image file chooser.
imageFileChooser = new ImageFileChooser();
imageFileChooser.setMultiSelectionEnabled(false);
return centerPane;
}
public JPanel initSelectFilePane() {
JPanel selectFilePane = FRGUIPaneFactory.createBorderLayout_L_Pane();
selectFilePane.setBorder(BorderFactory.createEmptyBorder(TEN, FIVE, 0, THIRTY));
defaultRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_DEFAULT"));
customRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer-Widget-Style_Custom"));
ButtonGroup buttonGroup = new ButtonGroup();
defaultRadioButton.setSelected(true);
buttonGroup.add(defaultRadioButton);
buttonGroup.add(customRadioButton);
defaultRadioButton.addActionListener(getLayoutActionListener());
customRadioButton.addActionListener(getLayoutActionListener());
JPanel jp = new JPanel(new GridLayout(3, 1, 0, TEN));
jp.add(defaultRadioButton);
jp.add(customRadioButton);
selectPictureButton = new UIButton(
Inter.getLocText("FR-Designer_Background_Image_Select"));
selectPictureButton.addActionListener(getSelectPictureActionListener());
jp.add(selectPictureButton);
selectFilePane.add(jp, BorderLayout.NORTH);
return selectFilePane;
}
private ActionListener getLayoutActionListener() {
return new ActionListener() {
public void actionPerformed(ActionEvent evt) {
emptyDataImage = null;
checkCustomImage();
repaintPreviewPane();
}
};
}
/**
* Select picture.
*/
private ActionListener getSelectPictureActionListener() {
return new ActionListener() {
public void actionPerformed(ActionEvent evt) {
int returnVal = imageFileChooser.showOpenDialog(ChartEmptyDataStylePane.this);
if (returnVal != JFileChooser.CANCEL_OPTION) {
final File selectedFile = imageFileChooser.getSelectedFile();
if (selectedFile != null && selectedFile.isFile()) {
previewPane.showLoading();
if (imageWorker != null && !imageWorker.isDone()) {
imageWorker = null;
}
imageWorker = new SwingWorker<Void, Void>() {
@Override
protected Void doInBackground() throws Exception {
emptyDataImage = imageFileChooser.isCheckSelected() ? ImageUtils.defaultImageCompress(selectedFile) : BaseUtils.readImage(selectedFile.getPath());
CoreGraphHelper.waitForImage(emptyDataImage);
repaintPreviewPane();
return null;
}
};
imageWorker.execute();
} else {
previewPane.setImage(null);
}
}
}
};
}
private void checkEmptyDataStyle() {
boolean b = emptyData.getSelectedIndex() == 0;
defaultRadioButton.setEnabled(b);
customRadioButton.setEnabled(b);
selectPictureButton.setEnabled(b);
}
private void checkCustomImage() {
selectPictureButton.setVisible(customRadioButton.isSelected());
}
private void repaintPreviewPane() {
emptyDataImage = customRadioButton.isSelected() ? emptyDataImage : DEFAULT_EMPTY_DATA_IMAGE;
previewPane.setImage(emptyData.getSelectedIndex() == 0 ? emptyDataImage : null);
previewPane.repaint();
}
@Override
public String getIconPath() {
return StringUtils.EMPTY;
}
@Override
public String title4PopupWindow() {
return Inter.getLocText("FR-Designer_Chart_Empty_Data");
}
public void populateBean() {
ChartEmptyDataStyleConf manager = ChartEmptyDataStyleConf.getInstance();
emptyData.setSelectedIndex(manager.isOpenEmptyDataStyle() == true ? 0 : 1);
customRadioButton.setSelected(manager.isCustomEmptyDataStyle());
emptyDataImage = manager.getEmptyDataImage();
checkEmptyDataStyle();
checkCustomImage();
repaintPreviewPane();
}
public void updateBean() {
ChartEmptyDataStyleConf manager = ChartEmptyDataStyleConf.getInstance();
manager.setOpenEmptyDataStyle(emptyData.getSelectedIndex() == 0);
manager.setCustomEmptyDataStyle(customRadioButton.isSelected());
manager.setEmptyDataImage(emptyDataImage);
// 通知报表整个刷新.
DesignerFrame frame = DesignerContext.getDesignerFrame();
if (frame != null) {
frame.repaint();
}
}
}

7
designer-chart/src/com/fr/van/chart/column/VanChartCustomStackAndAxisConditionPane.java

@ -34,6 +34,8 @@ public class VanChartCustomStackAndAxisConditionPane extends BasicBeanPane<Condi
protected UIButtonGroup<Integer> isStacked; protected UIButtonGroup<Integer> isStacked;
protected UIButtonGroup<Integer> isPercentStacked; protected UIButtonGroup<Integer> isPercentStacked;
private ConditionAttr conditionAttr;
private LiteConditionPane liteConditionPane; private LiteConditionPane liteConditionPane;
public VanChartCustomStackAndAxisConditionPane() { public VanChartCustomStackAndAxisConditionPane() {
@ -97,6 +99,7 @@ public class VanChartCustomStackAndAxisConditionPane extends BasicBeanPane<Condi
} }
public void populateBean(ConditionAttr conditionAttr) { public void populateBean(ConditionAttr conditionAttr) {
this.conditionAttr = conditionAttr;
AttrSeriesStackAndAxis seriesStackAndAxis = (AttrSeriesStackAndAxis) conditionAttr.getExisted(AttrSeriesStackAndAxis.class); AttrSeriesStackAndAxis seriesStackAndAxis = (AttrSeriesStackAndAxis) conditionAttr.getExisted(AttrSeriesStackAndAxis.class);
XAxis = new UIButtonGroup<Integer>(seriesStackAndAxis.getXAxisNamesArray()); XAxis = new UIButtonGroup<Integer>(seriesStackAndAxis.getXAxisNamesArray());
YAxis = new UIButtonGroup<Integer>(seriesStackAndAxis.getYAxisNameArray()); YAxis = new UIButtonGroup<Integer>(seriesStackAndAxis.getYAxisNameArray());
@ -126,9 +129,7 @@ public class VanChartCustomStackAndAxisConditionPane extends BasicBeanPane<Condi
} }
public ConditionAttr updateBean() { public ConditionAttr updateBean() {
ConditionAttr conditionAttr = new ConditionAttr(); AttrSeriesStackAndAxis seriesStackAndAxis = (AttrSeriesStackAndAxis)conditionAttr.getExisted(AttrSeriesStackAndAxis.class); seriesStackAndAxis.setXAxisIndex(XAxis.getSelectedIndex());
AttrSeriesStackAndAxis seriesStackAndAxis = new AttrSeriesStackAndAxis();
seriesStackAndAxis.setXAxisIndex(XAxis.getSelectedIndex());
seriesStackAndAxis.setYAxisIndex(YAxis.getSelectedIndex()); seriesStackAndAxis.setYAxisIndex(YAxis.getSelectedIndex());
updateStackAndPercent(seriesStackAndAxis); updateStackAndPercent(seriesStackAndAxis);

19
designer-chart/src/com/fr/van/chart/designer/other/VanChartInteractivePane.java

@ -29,6 +29,8 @@ import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Component; import java.awt.Component;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
@ -165,6 +167,12 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
} }
axisRotation = new UIButtonGroup<Integer>(new String[]{Inter.getLocText("Plugin-ChartF_Open"), axisRotation = new UIButtonGroup<Integer>(new String[]{Inter.getLocText("Plugin-ChartF_Open"),
Inter.getLocText("Plugin-ChartF_Close")}); Inter.getLocText("Plugin-ChartF_Close")});
axisRotation.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
checkZoomEnabled();
}
});
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{null,null}, new Component[]{null,null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Reversal")),axisRotation} new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Reversal")),axisRotation}
@ -173,6 +181,15 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Axis"), panel); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Axis"), panel);
} }
private void checkZoomEnabled() {
if (zoomWidget != null && axisRotation != null) {
zoomWidget.setSelectedIndex(1);
checkZoomPane();
zoomWidget.setEnabled(axisRotation.getSelectedIndex() == 1);
}
}
protected String[] getNameArray() { protected String[] getNameArray() {
return new String[]{Inter.getLocText("ChartF-X_Axis"), Inter.getLocText("ChartF-Y_Axis") return new String[]{Inter.getLocText("ChartF-X_Axis"), Inter.getLocText("ChartF-Y_Axis")
,Inter.getLocText("Plugin-ChartF_XYAxis"),Inter.getLocText("Chart-Use_None")}; ,Inter.getLocText("Plugin-ChartF_XYAxis"),Inter.getLocText("Chart-Use_None")};
@ -275,6 +292,8 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
populateAutoRefresh((VanChart)chart); populateAutoRefresh((VanChart)chart);
populateHyperlink(plot); populateHyperlink(plot);
checkZoomEnabled();
} }

10
designer-chart/src/com/fr/van/chart/designer/style/background/AlertLineListControlPane.java

@ -51,7 +51,7 @@ public class AlertLineListControlPane extends VanChartUIListControlPane {
VanChartRectanglePlot rectanglePlot = (VanChartRectanglePlot) plot; VanChartRectanglePlot rectanglePlot = (VanChartRectanglePlot) plot;
List<VanChartAxis> xAxisList = rectanglePlot.getXAxisList(); List<VanChartAxis> xAxisList = rectanglePlot.getXAxisList();
List<VanChartAxis> yAxisList = rectanglePlot.getYAxisList(); List<VanChartAxis> yAxisList = rectanglePlot.getYAxisList();
String[] axisNames = DefaultAxisHelper.getAllAxisNames(xAxisList, yAxisList); String[] axisNames = DefaultAxisHelper.getAllAxisNames(rectanglePlot);
ChartNameObjectCreator[] creators = {new ChartNameObjectCreator(getAlertAxisName(axisNames), Inter.getLocText("Plugin-ChartF_AlertLine"), VanChartAlertValue.class, getAlertPaneClass())}; ChartNameObjectCreator[] creators = {new ChartNameObjectCreator(getAlertAxisName(axisNames), Inter.getLocText("Plugin-ChartF_AlertLine"), VanChartAlertValue.class, getAlertPaneClass())};
@ -63,7 +63,7 @@ public class AlertLineListControlPane extends VanChartUIListControlPane {
List<VanChartAlertValue> values = axis.getAlertValues(); List<VanChartAlertValue> values = axis.getAlertValues();
for (VanChartAlertValue alertValue : values) { for (VanChartAlertValue alertValue : values) {
alertValue.setAxisNamesArray(axisNames); alertValue.setAxisNamesArray(axisNames);
alertValue.setAxisName(axis.getAxisName()); alertValue.setAxisName(rectanglePlot.getXAxisName(axis));
nameObjects.add(new NameObject(alertValue.getAlertPaneSelectName(), alertValue)); nameObjects.add(new NameObject(alertValue.getAlertPaneSelectName(), alertValue));
} }
} }
@ -72,7 +72,7 @@ public class AlertLineListControlPane extends VanChartUIListControlPane {
List<VanChartAlertValue> values = axis.getAlertValues(); List<VanChartAlertValue> values = axis.getAlertValues();
for (VanChartAlertValue alertValue : values) { for (VanChartAlertValue alertValue : values) {
alertValue.setAxisNamesArray(axisNames); alertValue.setAxisNamesArray(axisNames);
alertValue.setAxisName(axis.getAxisName()); alertValue.setAxisName(rectanglePlot.getYAxisName(axis));
nameObjects.add(new NameObject(alertValue.getAlertPaneSelectName(), alertValue)); nameObjects.add(new NameObject(alertValue.getAlertPaneSelectName(), alertValue));
} }
} }
@ -93,7 +93,7 @@ public class AlertLineListControlPane extends VanChartUIListControlPane {
List<VanChartAlertValue> axisAlerts = new ArrayList<VanChartAlertValue>(); List<VanChartAlertValue> axisAlerts = new ArrayList<VanChartAlertValue>();
for (int i = 0; i < nameables.length; i++) { for (int i = 0; i < nameables.length; i++) {
VanChartAlertValue value = (VanChartAlertValue) ((NameObject) nameables[i]).getObject(); VanChartAlertValue value = (VanChartAlertValue) ((NameObject) nameables[i]).getObject();
if (ComparatorUtils.equals(value.getAxisName(), axis.getAxisName())) { if (ComparatorUtils.equals(value.getAxisName(), rectanglePlot.getXAxisName(axis))) {
value.setAlertPaneSelectName(nameables[i].getName()); value.setAlertPaneSelectName(nameables[i].getName());
axisAlerts.add(value); axisAlerts.add(value);
} }
@ -104,7 +104,7 @@ public class AlertLineListControlPane extends VanChartUIListControlPane {
List<VanChartAlertValue> axisAlerts = new ArrayList<VanChartAlertValue>(); List<VanChartAlertValue> axisAlerts = new ArrayList<VanChartAlertValue>();
for (int i = 0; i < nameables.length; i++) { for (int i = 0; i < nameables.length; i++) {
VanChartAlertValue value = (VanChartAlertValue) ((NameObject) nameables[i]).getObject(); VanChartAlertValue value = (VanChartAlertValue) ((NameObject) nameables[i]).getObject();
if (ComparatorUtils.equals(value.getAxisName(), axis.getAxisName())) { if (ComparatorUtils.equals(value.getAxisName(), rectanglePlot.getYAxisName(axis))) {
value.setAlertPaneSelectName(nameables[i].getName()); value.setAlertPaneSelectName(nameables[i].getName());
axisAlerts.add(value); axisAlerts.add(value);
} }

10
designer-chart/src/com/fr/van/chart/designer/style/background/BackgroundListControlPane.java

@ -53,7 +53,7 @@ public class BackgroundListControlPane extends VanChartUIListControlPane {
VanChartRectanglePlot rectanglePlot = (VanChartRectanglePlot) plot; VanChartRectanglePlot rectanglePlot = (VanChartRectanglePlot) plot;
List<VanChartAxis> xAxisList = rectanglePlot.getXAxisList(); List<VanChartAxis> xAxisList = rectanglePlot.getXAxisList();
List<VanChartAxis> yAxisList = rectanglePlot.getYAxisList(); List<VanChartAxis> yAxisList = rectanglePlot.getYAxisList();
String[] axisNames = DefaultAxisHelper.getAllAxisNames(xAxisList, yAxisList); String[] axisNames = DefaultAxisHelper.getAllAxisNames(rectanglePlot);
BackgroundNameObjectCreator[] creators = {new BackgroundNameObjectCreator(getCustomIntervalBackgroundAxisName(axisNames), Inter.getLocText("Plugin-ChartF_CustomIntervalBackground"), VanChartCustomIntervalBackground.class, getIntervalPaneClass())}; BackgroundNameObjectCreator[] creators = {new BackgroundNameObjectCreator(getCustomIntervalBackgroundAxisName(axisNames), Inter.getLocText("Plugin-ChartF_CustomIntervalBackground"), VanChartCustomIntervalBackground.class, getIntervalPaneClass())};
@ -66,7 +66,7 @@ public class BackgroundListControlPane extends VanChartUIListControlPane {
List<VanChartCustomIntervalBackground> customIntervalBackgrounds = axis.getCustomIntervalBackgroundArray(); List<VanChartCustomIntervalBackground> customIntervalBackgrounds = axis.getCustomIntervalBackgroundArray();
for (VanChartCustomIntervalBackground background : customIntervalBackgrounds) { for (VanChartCustomIntervalBackground background : customIntervalBackgrounds) {
background.setAxisNamesArray(axisNames); background.setAxisNamesArray(axisNames);
background.setAxisName(axis.getAxisName()); background.setAxisName(rectanglePlot.getXAxisName(axis));
nameObjects.add(new NameObject(background.getCustomIntervalBackgroundSelectName(), background)); nameObjects.add(new NameObject(background.getCustomIntervalBackgroundSelectName(), background));
} }
@ -75,7 +75,7 @@ public class BackgroundListControlPane extends VanChartUIListControlPane {
List<VanChartCustomIntervalBackground> customIntervalBackgrounds = axis.getCustomIntervalBackgroundArray(); List<VanChartCustomIntervalBackground> customIntervalBackgrounds = axis.getCustomIntervalBackgroundArray();
for (VanChartCustomIntervalBackground background : customIntervalBackgrounds) { for (VanChartCustomIntervalBackground background : customIntervalBackgrounds) {
background.setAxisNamesArray(axisNames); background.setAxisNamesArray(axisNames);
background.setAxisName(axis.getAxisName()); background.setAxisName(rectanglePlot.getYAxisName(axis));
nameObjects.add(new NameObject(background.getCustomIntervalBackgroundSelectName(), background)); nameObjects.add(new NameObject(background.getCustomIntervalBackgroundSelectName(), background));
} }
} }
@ -102,7 +102,7 @@ public class BackgroundListControlPane extends VanChartUIListControlPane {
if (!isDefaultIntervalBackground) { if (!isDefaultIntervalBackground) {
for (int i = 0; i < nameables.length; i++) { for (int i = 0; i < nameables.length; i++) {
VanChartCustomIntervalBackground value = (VanChartCustomIntervalBackground) ((NameObject) nameables[i]).getObject(); VanChartCustomIntervalBackground value = (VanChartCustomIntervalBackground) ((NameObject) nameables[i]).getObject();
if (ComparatorUtils.equals(value.getAxisName(), axis.getAxisName())) { if (ComparatorUtils.equals(value.getAxisName(), rectanglePlot.getXAxisName(axis))) {
value.setCustomIntervalBackgroundSelectName(nameables[i].getName()); value.setCustomIntervalBackgroundSelectName(nameables[i].getName());
axisCustomBackground.add(value); axisCustomBackground.add(value);
} }
@ -115,7 +115,7 @@ public class BackgroundListControlPane extends VanChartUIListControlPane {
if (!isDefaultIntervalBackground) { if (!isDefaultIntervalBackground) {
for (int i = 0; i < nameables.length; i++) { for (int i = 0; i < nameables.length; i++) {
VanChartCustomIntervalBackground value = (VanChartCustomIntervalBackground) ((NameObject) nameables[i]).getObject(); VanChartCustomIntervalBackground value = (VanChartCustomIntervalBackground) ((NameObject) nameables[i]).getObject();
if (ComparatorUtils.equals(value.getAxisName(), axis.getAxisName())) { if (ComparatorUtils.equals(value.getAxisName(), rectanglePlot.getYAxisName(axis))) {
value.setCustomIntervalBackgroundSelectName(nameables[i].getName()); value.setCustomIntervalBackgroundSelectName(nameables[i].getName());
axisCustomBackground.add(value); axisCustomBackground.add(value);
} }

6
designer-chart/src/com/fr/van/chart/designer/style/series/VanChartStackedAndAxisListControlPane.java

@ -49,10 +49,8 @@ public class VanChartStackedAndAxisListControlPane extends VanChartUIListControl
public void populate(VanChartRectanglePlot plot) { public void populate(VanChartRectanglePlot plot) {
this.plot = plot; this.plot = plot;
java.util.List<VanChartAxis> xAxisList = plot.getXAxisList(); String[] axisXNames = DefaultAxisHelper.getXAxisNames(plot);
java.util.List<VanChartAxis> yAxisList = plot.getYAxisList(); String[] axisYNames = DefaultAxisHelper.getYAxisNames(plot);
String[] axisXNames = DefaultAxisHelper.getAxisNames(xAxisList);
String[] axisYNames = DefaultAxisHelper.getAxisNames(yAxisList);
java.util.List<StackedAndAxisNameObjectCreator> menuList = new ArrayList<StackedAndAxisNameObjectCreator>(); java.util.List<StackedAndAxisNameObjectCreator> menuList = new ArrayList<StackedAndAxisNameObjectCreator>();
AttrSeriesStackAndAxis seriesStackAndAxis = new AttrSeriesStackAndAxis(); AttrSeriesStackAndAxis seriesStackAndAxis = new AttrSeriesStackAndAxis();

7
designer-chart/src/com/fr/van/chart/map/designer/type/VanChartMapSourceChoosePane.java

@ -1,7 +1,6 @@
package com.fr.van.chart.map.designer.type; package com.fr.van.chart.map.designer.type;
import com.fr.base.Parameter; import com.fr.base.Parameter;
import com.fr.base.ParameterHolder;
import com.fr.base.Utils; import com.fr.base.Utils;
import com.fr.design.event.UIObserver; import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener; import com.fr.design.event.UIObserverListener;
@ -599,12 +598,8 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver {
if (jTemplate == null){ if (jTemplate == null){
return new String[0]; return new String[0];
} }
String[] params = new String[0];
if(jTemplate.getTarget() instanceof ParameterHolder){
params = getParamsName(((ParameterHolder)jTemplate.getTarget()).getParameters());
}
return params; return getParamsName((jTemplate.getJTemplateParameters()));
} }
private String[] getParamsName(Parameter[] parameters) { private String[] getParamsName(Parameter[] parameters) {

BIN
designer-chart/src/com/fr/van/chart/map/images/marker-icon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

BIN
designer-chart/src/com/fr/van/chart/map/images/marker-iconx2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

5
designer-realize/src/com/fr/start/Designer.java

@ -7,7 +7,6 @@ import com.fr.design.actions.core.ActionFactory;
import com.fr.design.actions.file.WebPreviewUtils; import com.fr.design.actions.file.WebPreviewUtils;
import com.fr.design.actions.file.newReport.NewPolyReportAction; import com.fr.design.actions.file.newReport.NewPolyReportAction;
import com.fr.design.actions.file.newReport.NewWorkBookAction; import com.fr.design.actions.file.newReport.NewWorkBookAction;
import com.fr.design.actions.file.newReport.NewWorkBookXAction;
import com.fr.design.actions.server.ServerConfigManagerAction; import com.fr.design.actions.server.ServerConfigManagerAction;
import com.fr.design.actions.server.StyleListAction; import com.fr.design.actions.server.StyleListAction;
import com.fr.design.actions.server.WidgetManagerAction; import com.fr.design.actions.server.WidgetManagerAction;
@ -35,7 +34,6 @@ import com.fr.design.menu.MenuDef;
import com.fr.design.menu.SeparatorDef; import com.fr.design.menu.SeparatorDef;
import com.fr.design.menu.ShortCut; import com.fr.design.menu.ShortCut;
import com.fr.design.module.DesignModuleFactory; import com.fr.design.module.DesignModuleFactory;
import com.fr.design.utils.DesignUtils; import com.fr.design.utils.DesignUtils;
import com.fr.design.utils.concurrent.ThreadFactoryBuilder; import com.fr.design.utils.concurrent.ThreadFactoryBuilder;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
@ -205,6 +203,9 @@ public class Designer extends BaseDesigner {
if (ActionFactory.getChartPreStyleAction() != null) { if (ActionFactory.getChartPreStyleAction() != null) {
menuDef.addShortCut(ActionFactory.getChartPreStyleAction()); menuDef.addShortCut(ActionFactory.getChartPreStyleAction());
} }
if (ActionFactory.getChartEmptyDataStyleAction() != null) {
menuDef.addShortCut(ActionFactory.getChartEmptyDataStyleAction());
}
if (ActionFactory.getChartMapEditorAction() != null) { if (ActionFactory.getChartMapEditorAction() != null) {
menuDef.addShortCut(ActionFactory.getChartMapEditorAction()); menuDef.addShortCut(ActionFactory.getChartMapEditorAction());
} }

Loading…
Cancel
Save