Browse Source

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

* commit 'af3abbb485f92689f4c7fc0f53898d6c183e75bd':
  CHART-2792 uicontrollistpane
final/10.0
zheng 6 years ago
parent
commit
37cbee672b
  1. 7
      designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java
  2. 5
      designer-base/src/main/java/com/fr/design/gui/controlpane/UIListControlPane.java
  3. 8
      designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java
  4. 19
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartUIListControlPane.java
  5. 10
      designer-chart/src/main/java/com/fr/van/chart/designer/other/VanChartConditionAttrContentPane.java
  6. 10
      designer-chart/src/main/java/com/fr/van/chart/designer/other/VanChartConditionListControlPane.java
  7. 3
      designer-chart/src/main/java/com/fr/van/chart/designer/style/background/AlertLineListControlPane.java
  8. 3
      designer-chart/src/main/java/com/fr/van/chart/designer/style/background/BackgroundListControlPane.java
  9. 3
      designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartStackedAndAxisListControlPane.java

7
designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java

@ -1,6 +1,5 @@
package com.fr.design.gui.controlpane; package com.fr.design.gui.controlpane;
import com.fr.base.chart.BasePlot;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.gui.controlpane.shortcutfactory.ShortCutFactory; import com.fr.design.gui.controlpane.shortcutfactory.ShortCutFactory;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
@ -49,7 +48,6 @@ import java.awt.event.WindowEvent;
abstract class UIControlPane extends JControlPane { abstract class UIControlPane extends JControlPane {
private UIToolbar topToolBar; private UIToolbar topToolBar;
protected Window popupEditDialog; protected Window popupEditDialog;
protected BasePlot plot;
private static final int TOP_TOOLBAR_HEIGHT = 20; private static final int TOP_TOOLBAR_HEIGHT = 20;
private static final int TOP_TOOLBAR_WIDTH = 156; // 可能因为用了tablelayout,要比其他地方多一个像素,看起来才正常 private static final int TOP_TOOLBAR_WIDTH = 156; // 可能因为用了tablelayout,要比其他地方多一个像素,看起来才正常
private static final int TOP_TOOLBAR_WIDTH_SHORT = 76; private static final int TOP_TOOLBAR_WIDTH_SHORT = 76;
@ -58,11 +56,6 @@ abstract class UIControlPane extends JControlPane {
super(); super();
} }
UIControlPane(BasePlot plot) {
super();
this.plot = plot;
}
public abstract void saveSettings(); public abstract void saveSettings();
@Override @Override

5
designer-base/src/main/java/com/fr/design/gui/controlpane/UIListControlPane.java

@ -1,6 +1,5 @@
package com.fr.design.gui.controlpane; package com.fr.design.gui.controlpane;
import com.fr.base.chart.BasePlot;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.icontainer.UIScrollPane;
@ -55,10 +54,6 @@ public abstract class UIListControlPane extends UIControlPane implements ListCon
} }
public UIListControlPane(BasePlot plot) {
super(plot);
}
private ListControlPaneHelper getHelper() { private ListControlPaneHelper getHelper() {
if (helper == null) { if (helper == null) {
helper = ListControlPaneHelper.newInstance(this); helper = ListControlPaneHelper.newInstance(this);

8
designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java

@ -14,7 +14,6 @@ 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.designer.TargetComponent; import com.fr.design.designer.TargetComponent;
import com.fr.design.fun.HyperlinkProvider; import com.fr.design.fun.HyperlinkProvider;
import com.fr.design.gui.HyperlinkFilterHelper;
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.imenutable.UIMenuNameableCreator; import com.fr.design.gui.imenutable.UIMenuNameableCreator;
@ -23,8 +22,6 @@ 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.design.module.DesignModuleFactory; import com.fr.design.module.DesignModuleFactory;
import com.fr.log.FineLoggerFactory;
import com.fr.general.NameObject; import com.fr.general.NameObject;
import com.fr.js.EmailJavaScript; import com.fr.js.EmailJavaScript;
import com.fr.js.FormHyperlinkProvider; import com.fr.js.FormHyperlinkProvider;
@ -35,6 +32,7 @@ import com.fr.js.NameJavaScriptGroup;
import com.fr.js.ParameterJavaScript; import com.fr.js.ParameterJavaScript;
import com.fr.js.ReportletHyperlink; import com.fr.js.ReportletHyperlink;
import com.fr.js.WebHyperlink; import com.fr.js.WebHyperlink;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.ListMap; 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;
@ -93,7 +91,7 @@ public class VanChartHyperLinkPane extends VanChartUIListControlPane {
} }
protected Map<String, BaseFormula> getHyperLinkEditorMap() { protected Map<String, BaseFormula> getHyperLinkEditorMap() {
return plot.getHyperLinkEditorMap(); return getPlot().getHyperLinkEditorMap();
} }
/** /**
@ -147,7 +145,7 @@ public class VanChartHyperLinkPane extends VanChartUIListControlPane {
} }
public void populate(Plot plot) { public void populate(Plot plot) {
this.plot = plot; setPlot(plot);
HashMap paneMap = getHyperlinkMap(plot); HashMap paneMap = getHyperlinkMap(plot);
//安装平台内打开插件时,添加相应按钮 //安装平台内打开插件时,添加相应按钮

19
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartUIListControlPane.java

@ -1,6 +1,5 @@
package com.fr.van.chart.designer.component; package com.fr.van.chart.designer.component;
import com.fr.base.chart.BasePlot;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.design.event.UIObserver; import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener; import com.fr.design.event.UIObserverListener;
@ -13,7 +12,6 @@ import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.stable.Nameable; import com.fr.stable.Nameable;
import com.fr.van.chart.designer.TableLayout4VanChartHelper; import com.fr.van.chart.designer.TableLayout4VanChartHelper;
@ -38,15 +36,18 @@ import java.awt.event.ActionListener;
public abstract class VanChartUIListControlPane extends UIListControlPane implements UIObserver { public abstract class VanChartUIListControlPane extends UIListControlPane implements UIObserver {
private UIObserverListener uiObserverListener; private UIObserverListener uiObserverListener;
private Plot plot;//update用
public VanChartUIListControlPane() { protected Plot getPlot() {
super(); return plot;
this.setBorder(null);
iniListener();
} }
public VanChartUIListControlPane(BasePlot plot) { protected void setPlot(Plot plot) {
super(plot); this.plot = plot;
}
public VanChartUIListControlPane() {
super();
this.setBorder(null); this.setBorder(null);
iniListener(); iniListener();
} }
@ -116,7 +117,7 @@ public abstract class VanChartUIListControlPane extends UIListControlPane implem
if (isPopulating) { if (isPopulating) {
return; return;
} }
update((Plot) plot); update(getPlot());
fireChanged();//图表属性改变,响应事件 fireChanged();//图表属性改变,响应事件
} }

10
designer-chart/src/main/java/com/fr/van/chart/designer/other/VanChartConditionAttrContentPane.java

@ -27,10 +27,16 @@ public class VanChartConditionAttrContentPane extends AbstractConditionAttrConte
populateBean(plot, collection, showPane); populateBean(plot, collection, showPane);
} }
public void populateBean(Plot plot, ConditionCollection collection, Class<? extends ConditionAttributesPane> showPane){ public void populateBean(final Plot plot, ConditionCollection collection, Class<? extends ConditionAttributesPane> showPane) {
if (conditionPane == null) { if (conditionPane == null) {
conditionPane = new VanChartConditionListControlPane(plot); conditionPane = new VanChartConditionListControlPane() {
@Override
protected Plot getPlot() {
return plot;
}
};
} }
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());

10
designer-chart/src/main/java/com/fr/van/chart/designer/other/VanChartConditionListControlPane.java

@ -1,6 +1,5 @@
package com.fr.van.chart.designer.other; package com.fr.van.chart.designer.other;
import com.fr.base.chart.BasePlot;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.ConditionAttr; import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.chart.chartglyph.ConditionCollection; import com.fr.chart.chartglyph.ConditionCollection;
@ -9,7 +8,6 @@ import com.fr.design.beans.BasicBeanPane;
import com.fr.design.condition.ConditionAttributesPane; import com.fr.design.condition.ConditionAttributesPane;
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.general.NameObject; import com.fr.general.NameObject;
import com.fr.stable.Nameable; import com.fr.stable.Nameable;
import com.fr.van.chart.designer.component.VanChartUIListControlPane; import com.fr.van.chart.designer.component.VanChartUIListControlPane;
@ -23,10 +21,6 @@ import java.lang.reflect.InvocationTargetException;
*/ */
public class VanChartConditionListControlPane extends VanChartUIListControlPane { public class VanChartConditionListControlPane extends VanChartUIListControlPane {
public VanChartConditionListControlPane(BasePlot plot) {
super(plot);
}
public void populate(Nameable[] nameableArray, Class<? extends ConditionAttributesPane> showPane) { public void populate(Nameable[] nameableArray, Class<? extends ConditionAttributesPane> showPane) {
initComponentPane(); initComponentPane();
this.setBorder(null); this.setBorder(null);
@ -37,7 +31,7 @@ public class VanChartConditionListControlPane extends VanChartUIListControlPane
@Override @Override
public NameableCreator[] createNameableCreators() { public NameableCreator[] createNameableCreators() {
return new NameObjectCreator[]{new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Condition_Attributes"), ConditionAttr.class, ChartTypeInterfaceManager.getInstance().getPlotConditionPane((Plot) plot).getClass())}; return new NameObjectCreator[]{new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Condition_Attributes"), ConditionAttr.class, ChartTypeInterfaceManager.getInstance().getPlotConditionPane(getPlot()).getClass())};
} }
@ -45,7 +39,7 @@ public class VanChartConditionListControlPane extends VanChartUIListControlPane
Constructor<? extends BasicBeanPane> constructor = null; Constructor<? extends BasicBeanPane> constructor = null;
try { try {
constructor = creator.getUpdatePane().getConstructor(Plot.class); constructor = creator.getUpdatePane().getConstructor(Plot.class);
return constructor.newInstance(plot); return constructor.newInstance(getPlot());
} catch (InstantiationException e) { } catch (InstantiationException e) {
throw new RuntimeException(e); throw new RuntimeException(e);

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

@ -5,7 +5,6 @@ import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.controlpane.NameableCreator; import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.gui.controlpane.ShortCut4JControlPane; import com.fr.design.gui.controlpane.ShortCut4JControlPane;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.NameObject; import com.fr.general.NameObject;
import com.fr.plugin.chart.attr.DefaultAxisHelper; import com.fr.plugin.chart.attr.DefaultAxisHelper;
import com.fr.plugin.chart.attr.axis.VanChartAlertValue; import com.fr.plugin.chart.attr.axis.VanChartAlertValue;
@ -47,7 +46,7 @@ public class AlertLineListControlPane extends VanChartUIListControlPane {
} }
public void populate(Plot plot) { public void populate(Plot plot) {
this.plot = plot; setPlot(plot);
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();

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

@ -5,7 +5,6 @@ import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.controlpane.NameableCreator; import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.gui.controlpane.ShortCut4JControlPane; import com.fr.design.gui.controlpane.ShortCut4JControlPane;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.NameObject; import com.fr.general.NameObject;
import com.fr.plugin.chart.attr.DefaultAxisHelper; import com.fr.plugin.chart.attr.DefaultAxisHelper;
import com.fr.plugin.chart.attr.axis.VanChartAlertValue; import com.fr.plugin.chart.attr.axis.VanChartAlertValue;
@ -49,7 +48,7 @@ public class BackgroundListControlPane extends VanChartUIListControlPane {
} }
public void populate(Plot plot) { public void populate(Plot plot) {
this.plot = plot; setPlot(plot);
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();

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

@ -6,7 +6,6 @@ import com.fr.chart.chartglyph.ConditionCollection;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.controlpane.NameableCreator; import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.gui.controlpane.ShortCut4JControlPane; import com.fr.design.gui.controlpane.ShortCut4JControlPane;
import com.fr.general.NameObject; import com.fr.general.NameObject;
import com.fr.plugin.chart.attr.DefaultAxisHelper; import com.fr.plugin.chart.attr.DefaultAxisHelper;
import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot; import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot;
@ -47,7 +46,7 @@ public class VanChartStackedAndAxisListControlPane extends VanChartUIListControl
} }
public void populate(VanChartRectanglePlot plot) { public void populate(VanChartRectanglePlot plot) {
this.plot = plot; setPlot(plot);
String[] axisXNames = DefaultAxisHelper.getXAxisNames(plot); String[] axisXNames = DefaultAxisHelper.getXAxisNames(plot);
String[] axisYNames = DefaultAxisHelper.getYAxisNames(plot); String[] axisYNames = DefaultAxisHelper.getYAxisNames(plot);

Loading…
Cancel
Save