Browse Source

Merge pull request #1011 in BA/design from CHART/design:dev to dev

* commit 'c4d276fce91eca87251c67199af00d77a82b1e50':
  修改换行符
  修改下接口返回类型
  还原代码
  地图远程设计的时候在写文件的时候更新mapAttr
  代码修改
  安装平台内打开插件,图表超链中添加相应的按钮
  修改老图表那边数据处理逻辑的一些问题 修改多分类轴bug 添加多分类时监控刷新的处理
  去掉没用到的引用
  修改返回类型
  将Table中的返回类型ArrayList<UIComboBox>改为List<UIComboBox>。
  多分类轴整体代码,第一次提交
  fix
  修改pmd错误
  修复pmd错误
  修改pmd问题
  修复bug:条件显示里设置条件内容为数据列,把对应的数据集删掉后,点击设置的条件属性,页面打不开
  pmd
  删除标签位置
master
superman 7 years ago
parent
commit
8ba9343645
  1. 1
      build.performance.gradle
  2. 12
      designer_base/src/com/fr/design/editor/editor/ColumnSelectedEditor.java
  3. 9
      designer_base/src/com/fr/design/gui/controlpane/AbstractNameableCreator.java
  4. 3
      designer_base/src/com/fr/design/gui/controlpane/NameableCreator.java
  5. 485
      designer_chart/src/com/fr/design/chart/series/PlotSeries/MapGroupExtensionPane.java
  6. 45
      designer_chart/src/com/fr/design/chart/series/PlotSeries/MapImageEditPane.java
  7. 29
      designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/DataLabelPane.java
  8. 23
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotMoreCateReportDataContentPane.java
  9. 33
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/CategoryPlotMoreCateTableDataContentPane.java
  10. 11
      designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartInteractivePane.java
  11. 2
      designer_chart/src/com/fr/design/mainframe/chart/gui/type/AbstractChartTypePane.java

1
build.performance.gradle

@ -15,6 +15,7 @@ task appletJar<<{
fileset(dir:"${basicDir}/chart/build/classes/main")
fileset(dir:"${basicDir}/report/build/classes/main")
fileset(dir:"${basicDir}/platform/build/classes/main")
fileset(dir:"${basicDir}/performance/build/classes/main")
}
unjar(src:"${libDir}/3rd.jar",dest:"./tmp")
unjar(src:"${libDir}/servlet-api.jar",dest:"./tmp")

12
designer_base/src/com/fr/design/editor/editor/ColumnSelectedEditor.java

@ -36,8 +36,12 @@ public class ColumnSelectedEditor extends Editor<SimpleDSColumn> {
@Override
public void itemStateChanged(ItemEvent e) {
TableDataWrapper tableDataWrapper = tableDataComboBox.getSelectedItem();
if (tableDataWrapper == null) {
return;
}
//这边需要重新初始化columnNames, 否则nameList长度和columnNames长度不同导致出錯。
List<String> nameList = tableDataComboBox.getSelectedItem().calculateColumnNameList();
List<String> nameList = tableDataWrapper.calculateColumnNameList();
columnNames = new String[nameList.size()];
columnNames = tableDataComboBox.getSelectedItem().calculateColumnNameList().toArray(columnNames);
columnNameComboBox.removeAllItems();
@ -64,7 +68,7 @@ public class ColumnSelectedEditor extends Editor<SimpleDSColumn> {
dsColumn.setDsName(tableDataWrappe.getTableDataName());
TableDataColumn column;
String columnExp = (String) this.columnNameComboBox.getSelectedItem();
if (StringUtils.isNotBlank(columnExp) && (columnExp.length() > 0 && columnExp.charAt(0) == '#') && !columnExp.endsWith("#")) {
if (StringUtils.isNotBlank(columnExp) && checkColumnExp(columnExp)) {
String number = columnExp.substring(1);
Pattern pattern = Pattern.compile("[^\\d]");
if (pattern.matcher(number).find()) {
@ -80,6 +84,10 @@ public class ColumnSelectedEditor extends Editor<SimpleDSColumn> {
return dsColumn;
}
private boolean checkColumnExp (String columnExp) {
return (columnExp.length() > 0 && columnExp.charAt(0) == '#') && !columnExp.endsWith("#");
}
public String getIconName() {
return "ds_column";
}

9
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.*;
@ -70,6 +71,14 @@ public abstract class AbstractNameableCreator implements NameableCreator {
return this.clazzOfEditor;
}
/**
* get clazzOfObject
* @return clazzOfObject
*/
public Class <? extends JavaScript> getHyperlink() {
return this.clazzOfObject;
}
/**
*
* @param ob

3
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.*;
@ -17,6 +18,8 @@ public interface NameableCreator {
public Class<? extends BasicBeanPane> getUpdatePane();
public Class <? extends JavaScript> getHyperlink();
public Object acceptObject2Populate(Object ob);
public void saveUpdatedBean(ListModelElement wrapper, Object bean);

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

File diff suppressed because one or more lines are too long

45
designer_chart/src/com/fr/design/chart/series/PlotSeries/MapImageEditPane.java

@ -1,34 +1,13 @@
package com.fr.design.chart.series.PlotSeries;
import java.awt.AlphaComposite;
import java.awt.BasicStroke;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import java.awt.geom.GeneralPath;
import java.util.*;
import javax.swing.BoxLayout;
import javax.swing.DefaultListModel;
import javax.swing.JComponent;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import com.fr.base.*;
import com.fr.base.BaseUtils;
import com.fr.base.Utils;
import com.fr.chart.base.MapSvgAttr;
import com.fr.chart.base.MapSvgXMLHelper;
import com.fr.chart.chartglyph.MapShapeValue;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.dialog.UIDialog;
import com.fr.design.event.ChangeEvent;
import com.fr.design.event.ChangeListener;
import com.fr.design.gui.icontainer.UIScrollPane;
@ -37,13 +16,23 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itable.UISelectTable;
import com.fr.design.gui.itable.UITableNoOptionUI;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.dialog.UIDialog;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.stable.CoreGraphHelper;
import com.fr.stable.StringUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import javax.swing.*;
import java.awt.*;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import java.awt.geom.GeneralPath;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
/**
* 地图 图片编辑界面 选中图片 编辑. 支持鼠标选中等事件

29
designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/DataLabelPane.java

@ -96,7 +96,7 @@ public class DataLabelPane extends TooltipContentsPane {
}
delimiterBox.setPreferredSize(new Dimension(70, 20));
JPanel boxPane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane();
boxPane.add(new UILabel(Inter.getLocText("Form-Delimiter") + ":"));
boxPane.add(new UILabel(Inter.getLocText("FR-Designer_Dismenber") + ":"));
boxPane.add(delimiterBox);
return boxPane;
}
@ -111,34 +111,9 @@ public class DataLabelPane extends TooltipContentsPane {
}
protected JPanel createJPanel4Position() {
// 标签位置:上下左右中.
bottomButton = new UIRadioButton(Inter.getLocText("StyleAlignment-Bottom"));
leftButton = new UIRadioButton(Inter.getLocText("StyleAlignment-Left"));
rigtButton = new UIRadioButton(Inter.getLocText("StyleAlignment-Right"));
topButton = new UIRadioButton(Inter.getLocText("StyleAlignment-Top"));
centerButton = new UIRadioButton(Inter.getLocText("Center"));
ButtonGroup bg = new ButtonGroup();
bg.add(bottomButton);
bg.add(leftButton);
bg.add(rigtButton);
bg.add(topButton);
bg.add(centerButton);
topButton.setSelected(true);
JPanel buttonPane = FRGUIPaneFactory.createLeftFlowZeroGapBorderPane();
buttonPane.add(new UILabel(Inter.getLocText(new String[]{"Label", "Layout"}) + ":"));
buttonPane.add(bottomButton);
buttonPane.add(leftButton);
buttonPane.add(rigtButton);
buttonPane.add(topButton);
buttonPane.add(centerButton);
return buttonPane;
return null;
}
public void populate(AttrContents seriesAttrContents) {
super.populate(seriesAttrContents);
String dataLabel = seriesAttrContents.getSeriesLabel();

23
designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotMoreCateReportDataContentPane.java

@ -5,6 +5,7 @@ import com.fr.base.Utils;
import com.fr.base.chart.chartdata.TopDefinitionProvider;
import com.fr.chart.chartattr.Bar2DPlot;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartdata.NormalReportDataDefinition;
import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener;
@ -21,6 +22,7 @@ import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.List;
/**
@ -37,6 +39,10 @@ public class CategoryPlotMoreCateReportDataContentPane extends CategoryPlotRepor
private ArrayList<TinyFormulaPane> formualList = new ArrayList<TinyFormulaPane>();
private UIObserverListener uiobListener = null;
public List<TinyFormulaPane> getFormualList() {
return formualList;
}
public CategoryPlotMoreCateReportDataContentPane() {
}
@ -105,13 +111,13 @@ public class CategoryPlotMoreCateReportDataContentPane extends CategoryPlotRepor
public void actionPerformed(ActionEvent e) {
boxPane.remove(newButtonPane);
formualList.remove(pane);
checkAddButton();
checkComponent();
relayoutPane();
}
});
delButton.registerChangeListener(uiobListener);
checkAddButton();
checkComponent();
relayoutPane();
return pane;
@ -122,6 +128,10 @@ public class CategoryPlotMoreCateReportDataContentPane extends CategoryPlotRepor
addButton.setEnabled(size < 2);
}
protected void checkComponent() {
checkAddButton();
}
private void relayoutPane() {
this.revalidate();
}
@ -168,15 +178,20 @@ public class CategoryPlotMoreCateReportDataContentPane extends CategoryPlotRepor
super.updateBean(collection);
TopDefinitionProvider definition = collection.getSelectedChart().getFilterDefinition();
Plot plot = collection.getSelectedChart().getPlot();
if (definition instanceof NormalReportDataDefinition) {
NormalReportDataDefinition reportDefinition = (NormalReportDataDefinition) definition;
reportDefinition.clearMoreCate();
updateMoreCate(reportDefinition, plot);
for(int i = 0, size = formualList.size(); i < size; i++) {
}
}
protected void updateMoreCate(NormalReportDataDefinition reportDefinition, Plot plot) {
for (int i = 0, size = formualList.size(); i < size; i++) {
TinyFormulaPane pane = formualList.get(i);
reportDefinition.addMoreCate(canBeFormula(pane.updateBean()));
}
}
}
}

33
designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/CategoryPlotMoreCateTableDataContentPane.java

@ -4,6 +4,7 @@ import com.fr.base.BaseUtils;
import com.fr.base.chart.chartdata.TopDefinitionProvider;
import com.fr.chart.chartattr.Bar2DPlot;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartdata.NormalTableDataDefinition;
import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener;
@ -42,6 +43,10 @@ public class CategoryPlotMoreCateTableDataContentPane extends CategoryPlotTableD
private UIObserverListener uiobListener = null;
public List<UIComboBox> getBoxList() {
return boxList;
}
public CategoryPlotMoreCateTableDataContentPane() {
// do nothing
}
@ -87,7 +92,7 @@ public class CategoryPlotMoreCateTableDataContentPane extends CategoryPlotTableD
checkSeriseUse(categoryCombox.getSelectedItem() != null);
makeToolTipUse(categoryCombox);
checkAddButton();
checkComponent();
}
});
}
@ -127,14 +132,14 @@ public class CategoryPlotMoreCateTableDataContentPane extends CategoryPlotTableD
boxPane.add(buttonPane);
boxList.add(combox);
checkAddButton();
checkComponent();
delButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
boxPane.remove(buttonPane);
boxList.remove(combox);
checkAddButton();
checkComponent();
relayoutPane();
}
});
@ -148,6 +153,10 @@ public class CategoryPlotMoreCateTableDataContentPane extends CategoryPlotTableD
addButton.setEnabled(size < 2 && categoryCombox.getSelectedItem() != null);
}
protected void checkComponent() {
checkAddButton();
}
private void relayoutPane() {
this.revalidate();
}
@ -160,7 +169,7 @@ public class CategoryPlotMoreCateTableDataContentPane extends CategoryPlotTableD
public void checkBoxUse(boolean hasUse) {
super.checkBoxUse(hasUse);
checkAddButton();
checkComponent();
}
protected void refreshBoxListWithSelectTableData(List list) {
@ -220,15 +229,21 @@ public class CategoryPlotMoreCateTableDataContentPane extends CategoryPlotTableD
super.updateBean(collection);
TopDefinitionProvider top = collection.getSelectedChart().getFilterDefinition();
if(top instanceof NormalTableDataDefinition) {
NormalTableDataDefinition normal = (NormalTableDataDefinition)top;
Plot plot = collection.getSelectedChart().getPlot();
if (top instanceof NormalTableDataDefinition) {
NormalTableDataDefinition normal = (NormalTableDataDefinition) top;
normal.clearMoreCate();
for(int i = 0, size = boxList.size(); i < size; i++) {
updateMoreCate(normal, plot);
}
}
protected void updateMoreCate(NormalTableDataDefinition normal, Plot plot) {
for (int i = 0, size = boxList.size(); i < size; i++) {
UIComboBox box = boxList.get(i);
if(box.getSelectedItem() != null) {
if (box.getSelectedItem() != null) {
normal.addMoreCate(box.getSelectedItem().toString());
}
}
}
}
}

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

@ -12,6 +12,7 @@ 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;
@ -21,6 +22,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;
@ -53,6 +56,7 @@ 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;
@ -655,6 +659,13 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
private void populateHyperlink(Plot plot) {
HashMap paneMap = renewMapWithPlot(plot);
//安装平台内打开插件时,添加相应按钮
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);
superLink.refreshMenuAndAddMenuAction(list);

2
designer_chart/src/com/fr/design/mainframe/chart/gui/type/AbstractChartTypePane.java

@ -133,7 +133,7 @@ public abstract class AbstractChartTypePane extends FurtherBasicBeanPane<Chart>{
}
//子类覆盖
protected Plot getSelectedClonedPlot(){
protected <T extends Plot> T getSelectedClonedPlot(){
return null;
}

Loading…
Cancel
Save