Browse Source

Merge branch 'release/9.0' of http://www.finedevelop.com:2015/scm/~plough/design into release/9.0

master
plough 7 years ago
parent
commit
17344f757d
  1. 31
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/CategoryPlotMoreCateTableDataContentPane.java
  2. 23
      designer_chart/src/com/fr/design/mainframe/chart/gui/type/AbstractChartTypePane.java
  3. 27
      designer_chart/src/com/fr/plugin/chart/designer/data/VanChartMoreCateReportDataContentPane.java
  4. 27
      designer_chart/src/com/fr/plugin/chart/designer/data/VanChartMoreCateTableDataContentPane.java
  5. 3
      designer_chart/src/com/fr/plugin/chart/heatmap/designer/type/VanChartHeatMapTypePane.java
  6. 3
      designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapPlotPane.java

31
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.base.chart.chartdata.TopDefinitionProvider;
import com.fr.chart.chartattr.Bar2DPlot; import com.fr.chart.chartattr.Bar2DPlot;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartdata.NormalTableDataDefinition; import com.fr.chart.chartdata.NormalTableDataDefinition;
import com.fr.design.event.UIObserver; import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener; import com.fr.design.event.UIObserverListener;
@ -26,6 +27,7 @@ import java.util.List;
/** /**
* 多分类轴 的数据集定义界面. * 多分类轴 的数据集定义界面.
*
* @author kunsnat E-mail:kunsnat@gmail.com * @author kunsnat E-mail:kunsnat@gmail.com
* @version 创建时间2013-9-3 上午10:00:28 * @version 创建时间2013-9-3 上午10:00:28
*/ */
@ -42,6 +44,10 @@ public class CategoryPlotMoreCateTableDataContentPane extends CategoryPlotTableD
private UIObserverListener uiobListener = null; private UIObserverListener uiobListener = null;
public List<UIComboBox> getBoxList() {
return boxList;
}
public CategoryPlotMoreCateTableDataContentPane() { public CategoryPlotMoreCateTableDataContentPane() {
// do nothing // do nothing
} }
@ -59,8 +65,8 @@ public class CategoryPlotMoreCateTableDataContentPane extends CategoryPlotTableD
addButton.setPreferredSize(new Dimension(20, COMBOX_HEIGHT)); addButton.setPreferredSize(new Dimension(20, COMBOX_HEIGHT));
categoryPane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{categoryCombox, addButton, null, categoryLabel, null})); categoryPane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{categoryCombox, addButton, null, categoryLabel, null}));
categoryPane.setBorder(BorderFactory.createEmptyBorder(0,24,10,15));
categoryPane.setBorder(BorderFactory.createEmptyBorder(0,24,10,15));
boxPane = new JPanel(); boxPane = new JPanel();
boxPane.setLayout(new BoxLayout(boxPane, BoxLayout.Y_AXIS)); boxPane.setLayout(new BoxLayout(boxPane, BoxLayout.Y_AXIS));
@ -90,7 +96,7 @@ public class CategoryPlotMoreCateTableDataContentPane extends CategoryPlotTableD
checkSeriseUse(categoryCombox.getSelectedItem() != null); checkSeriseUse(categoryCombox.getSelectedItem() != null);
makeToolTipUse(categoryCombox); makeToolTipUse(categoryCombox);
checkAddButton(); checkComponent();
} }
}); });
} }
@ -130,14 +136,14 @@ public class CategoryPlotMoreCateTableDataContentPane extends CategoryPlotTableD
boxPane.add(buttonPane); boxPane.add(buttonPane);
boxList.add(combox); boxList.add(combox);
checkAddButton(); checkComponent();
delButton.addActionListener(new ActionListener() { delButton.addActionListener(new ActionListener() {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
boxPane.remove(buttonPane); boxPane.remove(buttonPane);
boxList.remove(combox); boxList.remove(combox);
checkAddButton(); checkComponent();
relayoutPane(); relayoutPane();
} }
}); });
@ -151,6 +157,10 @@ public class CategoryPlotMoreCateTableDataContentPane extends CategoryPlotTableD
addButton.setEnabled(size < 2 && categoryCombox.getSelectedItem() != null); addButton.setEnabled(size < 2 && categoryCombox.getSelectedItem() != null);
} }
protected void checkComponent() {
checkAddButton();
}
private void relayoutPane() { private void relayoutPane() {
this.revalidate(); this.revalidate();
} }
@ -158,12 +168,13 @@ public class CategoryPlotMoreCateTableDataContentPane extends CategoryPlotTableD
/** /**
* 检查 某些Box是否可用 * 检查 某些Box是否可用
*
* @param hasUse 是否使用. * @param hasUse 是否使用.
*/ */
public void checkBoxUse(boolean hasUse) { public void checkBoxUse(boolean hasUse) {
super.checkBoxUse(hasUse); super.checkBoxUse(hasUse);
checkAddButton(); checkComponent();
} }
protected void refreshBoxListWithSelectTableData(List list) { protected void refreshBoxListWithSelectTableData(List list) {
@ -194,6 +205,7 @@ public class CategoryPlotMoreCateTableDataContentPane extends CategoryPlotTableD
/** /**
* 更新 多分类相关界面 * 更新 多分类相关界面
*
* @param collection * @param collection
*/ */
public void populateBean(ChartCollection collection) { public void populateBean(ChartCollection collection) {
@ -217,15 +229,22 @@ public class CategoryPlotMoreCateTableDataContentPane extends CategoryPlotTableD
/** /**
* 保存多分类界面到collection * 保存多分类界面到collection
*
* @param collection * @param collection
*/ */
public void updateBean(ChartCollection collection) { public void updateBean(ChartCollection collection) {
super.updateBean(collection); super.updateBean(collection);
TopDefinitionProvider top = collection.getSelectedChart().getFilterDefinition(); TopDefinitionProvider top = collection.getSelectedChart().getFilterDefinition();
Plot plot = collection.getSelectedChart().getPlot();
if (top instanceof NormalTableDataDefinition) { if (top instanceof NormalTableDataDefinition) {
NormalTableDataDefinition normal = (NormalTableDataDefinition) top; NormalTableDataDefinition normal = (NormalTableDataDefinition) top;
normal.clearMoreCate(); normal.clearMoreCate();
updateMoreCate(normal, plot);
}
}
protected void updateMoreCate(NormalTableDataDefinition normal, Plot plot) {
for (int i = 0, size = boxList.size(); i < size; i++) { for (int i = 0, size = boxList.size(); i < size; i++) {
UIComboBox box = boxList.get(i); UIComboBox box = boxList.get(i);
if (box.getSelectedItem() != null) { if (box.getSelectedItem() != null) {
@ -233,5 +252,5 @@ public class CategoryPlotMoreCateTableDataContentPane extends CategoryPlotTableD
} }
} }
} }
}
} }

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

@ -4,8 +4,18 @@ import com.fr.base.ChartPreStyleManagerProvider;
import com.fr.base.ChartPreStyleServerManager; import com.fr.base.ChartPreStyleServerManager;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.background.ColorBackground; import com.fr.base.background.ColorBackground;
import com.fr.chart.base.*; import com.fr.chart.base.AttrContents;
import com.fr.chart.chartattr.*; import com.fr.chart.base.AttrFillStyle;
import com.fr.chart.base.ChartConstants;
import com.fr.chart.base.ChartPreStyle;
import com.fr.chart.base.DataSeriesCondition;
import com.fr.chart.base.TextAttr;
import com.fr.chart.chartattr.Axis;
import com.fr.chart.chartattr.CategoryPlot;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Legend;
import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartattr.Title;
import com.fr.chart.chartglyph.ConditionAttr; import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.chart.charttypes.BarIndependentChart; import com.fr.chart.charttypes.BarIndependentChart;
import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.beans.FurtherBasicBeanPane;
@ -43,6 +53,7 @@ public abstract class AbstractChartTypePane extends FurtherBasicBeanPane<Chart>{
protected List<ChartImagePane> styleList; protected List<ChartImagePane> styleList;
protected JPanel stylePane; //样式布局的面板 protected JPanel stylePane; //样式布局的面板
private JPanel typePane;
protected abstract String[] getTypeIconPath(); protected abstract String[] getTypeIconPath();
protected abstract String[] getTypeTipName(); protected abstract String[] getTypeTipName();
protected abstract String[] getTypeLayoutPath(); protected abstract String[] getTypeLayoutPath();
@ -70,7 +81,7 @@ public abstract class AbstractChartTypePane extends FurtherBasicBeanPane<Chart>{
checkDemosBackground(); checkDemosBackground();
JPanel typePane = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(4); typePane = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(4);
for(int i = 0; i < typeDemo.size(); i++) { for(int i = 0; i < typeDemo.size(); i++) {
ChartImagePane tmp = typeDemo.get(i); ChartImagePane tmp = typeDemo.get(i);
typePane.add(tmp); typePane.add(tmp);
@ -133,7 +144,7 @@ public abstract class AbstractChartTypePane extends FurtherBasicBeanPane<Chart>{
} }
//子类覆盖 //子类覆盖
protected Plot getSelectedClonedPlot(){ protected <T extends Plot> T getSelectedClonedPlot(){
return null; return null;
} }
@ -586,6 +597,10 @@ public abstract class AbstractChartTypePane extends FurtherBasicBeanPane<Chart>{
&& chart.getPlot().getPlotStyle() != ChartConstants.STYLE_NONE; && chart.getPlot().getPlotStyle() != ChartConstants.STYLE_NONE;
} }
protected JPanel getTypePane(){
return typePane;
}
public Chart getDefaultChart() { public Chart getDefaultChart() {
return BarIndependentChart.barChartTypes[0]; return BarIndependentChart.barChartTypes[0];
} }

27
designer_chart/src/com/fr/plugin/chart/designer/data/VanChartMoreCateReportDataContentPane.java

@ -27,27 +27,24 @@ public class VanChartMoreCateReportDataContentPane extends CategoryPlotMoreCateR
} }
protected void updateMoreCate(NormalReportDataDefinition reportDefinition, Plot plot) { protected void updateMoreCate(NormalReportDataDefinition reportDefinition, Plot plot) {
//todo@shine9.0 super.updateMoreCate(reportDefinition, plot);
// super.updateMoreCate(reportDefinition, plot); ((VanChartPlot) plot).setCategoryNum(getFormualList().size() + 1);
// ((VanChartPlot) plot).setCategoryNum(getFormualList().size() + 1); if (!getFormualList().isEmpty()) {
// if (!getFormualList().isEmpty()) { plot.getDataSheet().setVisible(false);
// plot.getDataSheet().setVisible(false); }
// }
} }
protected void checkComponent() { protected void checkComponent() {
//todo@shine9.0 super.checkComponent();
// super.checkComponent(); checkBoxList(isSupportMultiCategory);
// checkBoxList(isSupportMultiCategory);
} }
private void checkBoxList(boolean isSupportMulticategory) { private void checkBoxList(boolean isSupportMulticategory) {
//todo@shine9.0 if (getFormualList().size() != 0) {
// if (getFormualList().size() != 0) { for (int i = 0; i < getFormualList().size(); i++) {
// for (int i = 0; i < getFormualList().size(); i++) { getFormualList().get(i).setEnabled(isSupportMulticategory);
// getFormualList().get(i).setEnabled(isSupportMulticategory); }
// } }
// }
} }
} }

27
designer_chart/src/com/fr/plugin/chart/designer/data/VanChartMoreCateTableDataContentPane.java

@ -28,27 +28,24 @@ public class VanChartMoreCateTableDataContentPane extends CategoryPlotMoreCateTa
} }
protected void updateMoreCate(NormalTableDataDefinition normal, Plot plot) { protected void updateMoreCate(NormalTableDataDefinition normal, Plot plot) {
//todo@shine9.0 super.updateMoreCate(normal, plot);
// super.updateMoreCate(normal, plot); ((VanChartPlot) plot).setCategoryNum(getBoxList().size() + 1);
// ((VanChartPlot) plot).setCategoryNum(getBoxList().size() + 1); if (!getBoxList().isEmpty()) {
// if (!getBoxList().isEmpty()) { plot.getDataSheet().setVisible(false);
// plot.getDataSheet().setVisible(false); }
// }
} }
protected void checkComponent() { protected void checkComponent() {
//todo@shine9.0 super.checkComponent();
// super.checkComponent(); checkBoxList(isSupportMultiCategory);
// checkBoxList(isSupportMultiCategory);
} }
private void checkBoxList(boolean isSupportMulticategory) { private void checkBoxList(boolean isSupportMulticategory) {
//todo@shine9.0 if (getBoxList().size() != 0) {
// if (getBoxList().size() != 0) { for (int i = 0; i < getBoxList().size(); i++) {
// for (int i = 0; i < getBoxList().size(); i++) { getBoxList().get(i).setEnabled(isSupportMulticategory);
// getBoxList().get(i).setEnabled(isSupportMulticategory); }
// } }
// }
} }
} }

3
designer_chart/src/com/fr/plugin/chart/heatmap/designer/type/VanChartHeatMapTypePane.java

@ -64,8 +64,7 @@ public class VanChartHeatMapTypePane extends VanChartMapPlotPane {
populateSourcePane(plot); populateSourcePane(plot);
boolean enabled = !CompatibleGEOJSONHelper.isDeprecated(plot.getGeoUrl()); boolean enabled = !CompatibleGEOJSONHelper.isDeprecated(plot.getGeoUrl());
//todo@shine9.0 GUICoreUtils.setEnabled(this.getTypePane(), enabled);
//GUICoreUtils.setEnabled(this.getTypePane(), enabled);
GUICoreUtils.setEnabled(this.getSourceChoosePane().getSourceComboBox(), enabled); GUICoreUtils.setEnabled(this.getSourceChoosePane().getSourceComboBox(), enabled);
checkDemosBackground(); checkDemosBackground();

3
designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapPlotPane.java

@ -93,8 +93,7 @@ public class VanChartMapPlotPane extends AbstractVanChartTypePane {
populateSourcePane(plot); populateSourcePane(plot);
boolean enabled = !CompatibleGEOJSONHelper.isDeprecated(plot.getGeoUrl()); boolean enabled = !CompatibleGEOJSONHelper.isDeprecated(plot.getGeoUrl());
//todo@shine9.0 GUICoreUtils.setEnabled(this.getTypePane(), enabled);
//GUICoreUtils.setEnabled(this.getTypePane(), enabled);
GUICoreUtils.setEnabled(this.sourceChoosePane.getSourceComboBox(), enabled); GUICoreUtils.setEnabled(this.sourceChoosePane.getSourceComboBox(), enabled);
checkDemosBackground(); checkDemosBackground();

Loading…
Cancel
Save