Browse Source

Merge pull request #2758 in DESIGN/design from feature/10.0 to research/10.0

* commit '0245039aa34f8b3546ad73f22b897bddd9f4da09':
  CHART-16481 增加空判断
  REPORT-40971 添加条件属性选择数据列,选项中的模板数据集会是别的模板的
  CHART-16369 甘特图数据点条件属性
research/10.0
superman 4 years ago
parent
commit
91535e8c2d
  1. 2
      designer-base/src/main/java/com/fr/design/condition/ObjectLiteConditionPane.java
  2. 38
      designer-base/src/main/java/com/fr/design/editor/ValueEditorPaneFactory.java
  3. 8
      designer-base/src/main/java/com/fr/design/editor/editor/ColumnSelectedEditor.java
  4. 2
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartBaseAxisPane.java
  5. 6
      designer-chart/src/main/java/com/fr/van/chart/gantt/designer/other/VanChartGanttConditionPane.java

2
designer-base/src/main/java/com/fr/design/condition/ObjectLiteConditionPane.java

@ -77,7 +77,7 @@ public class ObjectLiteConditionPane extends LiteConditionPane<ObjectCondition>
} }
}); });
conditionValuePane = ValueEditorPaneFactory.createAllValueEditorPane(); conditionValuePane = ValueEditorPaneFactory.createAllValueEditorPaneWithGlobalListener();
Component[][] components = { { new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_ConditionB_Operator") + ":"), new UILabel() }, Component[][] components = { { new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_ConditionB_Operator") + ":"), new UILabel() },
{ conditionOPComboBox, conditionValuePane } }; { conditionOPComboBox, conditionValuePane } };

38
designer-base/src/main/java/com/fr/design/editor/ValueEditorPaneFactory.java

@ -19,17 +19,18 @@ import com.fr.design.editor.editor.TextEditor;
import com.fr.design.editor.editor.WidgetNameEditor; import com.fr.design.editor.editor.WidgetNameEditor;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itableeditorpane.ParameterTableModel; import com.fr.design.gui.itableeditorpane.ParameterTableModel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.*; import java.awt.BorderLayout;
import java.awt.*;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import javax.swing.JPanel;
public class ValueEditorPaneFactory { public class ValueEditorPaneFactory {
@ -155,6 +156,16 @@ public class ValueEditorPaneFactory {
return createValueEditorPane(allEditors(), StringUtils.EMPTY, StringUtils.EMPTY); return createValueEditorPane(allEditors(), StringUtils.EMPTY, StringUtils.EMPTY);
} }
/**
* 带有所有编辑器的ValueEditorPane
* 同时需要注册全局监听的编辑器注册下监听
*
* @return 值编辑器面板
*/
public static ValueEditorPane createAllValueEditorPaneWithGlobalListener() {
return createValueEditorPane(allEditorsWithGlobalListener(), StringUtils.EMPTY, StringUtils.EMPTY);
}
/** /**
* 创建不带公式面板的pane * 创建不带公式面板的pane
* *
@ -359,6 +370,29 @@ public class ValueEditorPaneFactory {
}; };
} }
/**
* 所有类型的编辑器
* 同时注册需要的监听
*
* @return 值编辑器
*/
public static Editor<?>[] allEditorsWithGlobalListener() {
FormulaEditor formulaEditor = new FormulaEditor(Toolkit.i18nText("Fine-Design_Basic_Parameter_Formula"));
ColumnSelectedEditor columnSelectedEditor = new ColumnSelectedEditor();
columnSelectedEditor.registerDSChangeListener();
return new Editor[]{
new TextEditor(),
new IntegerEditor(),
new DoubleEditor(),
new DateEditor(true, Toolkit.i18nText("Fine-Design_Basic_Date")),
new BooleanEditor(),
formulaEditor,
new ParameterEditor(),
new ColumnRowEditor(Toolkit.i18nText("Fine-Design_Basic_Cell")),
columnSelectedEditor,
};
}
/** /**
* 不带公式编辑器 * 不带公式编辑器
* *

8
designer-base/src/main/java/com/fr/design/editor/editor/ColumnSelectedEditor.java

@ -3,6 +3,7 @@ package com.fr.design.editor.editor;
import com.fr.design.data.DesignTableDataManager; import com.fr.design.data.DesignTableDataManager;
import com.fr.data.SimpleDSColumn; import com.fr.data.SimpleDSColumn;
import com.fr.design.data.datapane.TableDataComboBox; import com.fr.design.data.datapane.TableDataComboBox;
import com.fr.design.data.tabledata.Prepare4DataSourceChange;
import com.fr.design.data.tabledata.wrapper.TableDataWrapper; import com.fr.design.data.tabledata.wrapper.TableDataWrapper;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
@ -22,7 +23,7 @@ import java.util.regex.Pattern;
* @author zhou * @author zhou
* @since 2012-3-29下午6:05:08 * @since 2012-3-29下午6:05:08
*/ */
public class ColumnSelectedEditor extends Editor<SimpleDSColumn> { public class ColumnSelectedEditor extends Editor<SimpleDSColumn> implements Prepare4DataSourceChange {
TableDataComboBox tableDataComboBox; TableDataComboBox tableDataComboBox;
private UIComboBox columnNameComboBox; private UIComboBox columnNameComboBox;
protected String[] columnNames; protected String[] columnNames;
@ -107,4 +108,9 @@ public class ColumnSelectedEditor extends Editor<SimpleDSColumn> {
tableDataComboBox.setSelectedItem(null); tableDataComboBox.setSelectedItem(null);
columnNameComboBox.setSelectedItem(null); columnNameComboBox.setSelectedItem(null);
} }
@Override
public void registerDSChangeListener() {
tableDataComboBox.registerGlobalDSChangeListener();
}
} }

2
designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartBaseAxisPane.java

@ -584,6 +584,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
} }
protected void checkLabelGapPane() { protected void checkLabelGapPane() {
if (labelGapPane != null) {
boolean visible = true; boolean visible = true;
if (showLabelDisplay() && labelDisplayPane != null && labelDisplayComboBox != null) { if (showLabelDisplay() && labelDisplayPane != null && labelDisplayComboBox != null) {
@ -592,6 +593,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
labelGapPane.setVisible(visible); labelGapPane.setVisible(visible);
} }
}
protected void checkLabelGapValuePane() { protected void checkLabelGapValuePane() {
if (labelGapValuePane != null && labelGapStyle != null) { if (labelGapValuePane != null && labelGapStyle != null) {

6
designer-chart/src/main/java/com/fr/van/chart/gantt/designer/other/VanChartGanttConditionPane.java

@ -19,6 +19,7 @@ import com.fr.van.chart.designer.other.condition.item.VanChartTooltipConditionPa
import com.fr.van.chart.designer.style.tooltip.VanChartPlotTooltipNoCheckPane; import com.fr.van.chart.designer.style.tooltip.VanChartPlotTooltipNoCheckPane;
import com.fr.van.chart.designer.style.tooltip.VanChartPlotTooltipPane; import com.fr.van.chart.designer.style.tooltip.VanChartPlotTooltipPane;
import javax.swing.JPanel;
import java.awt.Dimension; import java.awt.Dimension;
/** /**
@ -55,6 +56,11 @@ public class VanChartGanttConditionPane extends DataSeriesConditionPane {
((AttrGanttTooltipContent) attrGanttTooltip.getContent()).getDurationFormat().setEnable(true); ((AttrGanttTooltipContent) attrGanttTooltip.getContent()).getDurationFormat().setEnable(true);
return attrGanttTooltip; return attrGanttTooltip;
} }
@Override
protected JPanel createDisplayStrategy(Plot plot) {
return null;
}
}; };
} }

Loading…
Cancel
Save