Browse Source

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

* commit '74485a2dfc57e929359db073428cfa86c6ae5cbb':
  类型界面开接口
  CHART-2216 空间 光照 dierta0.1  阻塞
master
superman 7 years ago
parent
commit
271eee1303
  1. 6
      designer_base/src/com/fr/design/gui/frpane/UINumberDragPane.java
  2. 25
      designer_chart/src/com/fr/extended/chart/ExtendedTypePane.java

6
designer_base/src/com/fr/design/gui/frpane/UINumberDragPane.java

@ -30,8 +30,12 @@ public class UINumberDragPane extends BasicBeanPane<Double> 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);

25
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<T extends AbstractChart> 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

Loading…
Cancel
Save