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 a4c394ceb7..891320afc2 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); diff --git a/designer_chart/src/com/fr/extended/chart/ExtendedTypePane.java b/designer_chart/src/com/fr/extended/chart/ExtendedTypePane.java index 60b0223ef1..a1375938d5 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