From 08a74da8d5b08f757a78c4255e096d573ee6d509 Mon Sep 17 00:00:00 2001 From: zheng Date: Thu, 19 Apr 2018 14:32:25 +0800 Subject: [PATCH 1/2] =?UTF-8?q?CHART-2216=20=E7=A9=BA=E9=97=B4=20=E5=85=89?= =?UTF-8?q?=E7=85=A7=20dierta0.1=20=20=E9=98=BB=E5=A1=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/gui/frpane/UINumberDragPane.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/gui/frpane/UINumberDragPane.java b/designer_base/src/com/fr/design/gui/frpane/UINumberDragPane.java index a4c394ceb..891320afc 100644 --- a/designer_base/src/com/fr/design/gui/frpane/UINumberDragPane.java +++ b/designer_base/src/com/fr/design/gui/frpane/UINumberDragPane.java @@ -30,8 +30,12 @@ public class UINumberDragPane extends BasicBeanPane implements GlobalNam } public UINumberDragPane(double minValue, double maxValue) { + this(minValue, maxValue, 1); + } + + public UINumberDragPane(double minValue, double maxValue, double dierta) { dragBar = new NumberDragBar((int) minValue, (int) maxValue); - spinner = new UISpinner(minValue, maxValue, 1, minValue); + spinner = new UISpinner(minValue, maxValue, dierta, minValue); spinner.setGlobalName(Inter.getLocText("StyleAlignment-Text_Rotation")); this.setLayout(new BorderLayout(4, 0)); this.add(spinner, BorderLayout.EAST); From 1ed01bae031b22073c3df8f3ca6aebae6b294a18 Mon Sep 17 00:00:00 2001 From: zheng Date: Thu, 19 Apr 2018 20:19:07 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E5=BC=80=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/extended/chart/ExtendedTypePane.java | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/designer_chart/src/com/fr/extended/chart/ExtendedTypePane.java b/designer_chart/src/com/fr/extended/chart/ExtendedTypePane.java index 60b0223ef..a1375938d 100644 --- a/designer_chart/src/com/fr/extended/chart/ExtendedTypePane.java +++ b/designer_chart/src/com/fr/extended/chart/ExtendedTypePane.java @@ -3,11 +3,12 @@ package com.fr.extended.chart; import com.fr.chart.chartattr.Chart; import com.fr.chart.charttypes.ChartTypeManager; import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; +import com.fr.design.mainframe.chart.gui.type.ChartImagePane; /** * Created by shine on 2018/3/5. */ -public class ExtendedTypePane extends AbstractChartTypePane { +public class ExtendedTypePane extends AbstractChartTypePane { @Override protected String[] getTypeIconPath() { @@ -19,12 +20,34 @@ public class ExtendedTypePane extends AbstractChartTypePane { return new String[0]; } + protected int getTypeIndex(T chart) { + return 0; + } + + protected void setType(T chart, int index) { + } + @Override public void populateBean(Chart chart) { + if (getTypeIconPath().length > 0) { + for (ChartImagePane imagePane : typeDemo) { + imagePane.isPressing = false; + } + typeDemo.get(getTypeIndex((T) chart)).isPressing = true; + checkDemosBackground(); + } } @Override public void updateBean(Chart chart) { + if (getTypeIconPath().length > 0) { + for (int index = 0, len = typeDemo.size(); index < len; index++) { + if (typeDemo.get(index).isPressing) { + setType((T) chart, index); + return; + } + } + } } @Override