Browse Source

update

master
Fangjie Hu 8 years ago
parent
commit
b21956c279
  1. 17
      designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java

17
designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java

@ -173,17 +173,21 @@ public class ChartTypePane extends AbstractChartAttrPane{
//第一步就是重构cardNames //第一步就是重构cardNames
cardNames = ChartTypeInterfaceManager.getInstance().getTitle4PopupWindow(chartID); cardNames = ChartTypeInterfaceManager.getInstance().getTitle4PopupWindow(chartID);
//重构下拉框选项 //重构下拉框选项
reactorComboBox();
//重新选择选中的下拉项
chartID = chart.getChartID();
String plotID = chart.getPlot().getPlotID();
Object item = ChartTypeInterfaceManager.getInstance().getTitle4PopupWindow(chartID, plotID);
jcb.setSelectedItem(item);
}
private void reactorComboBox() {
FlexibleComboBox fcb = (FlexibleComboBox)jcb; FlexibleComboBox fcb = (FlexibleComboBox)jcb;
fcb.setItemEvenType(ItemEventType.REACTOR); fcb.setItemEvenType(ItemEventType.REACTOR);
fcb.removeAllItems(); fcb.removeAllItems();
for (int i = 0; i < this.cardNames.length; i++) { for (int i = 0; i < this.cardNames.length; i++) {
fcb.addItem(cardNames[i]); fcb.addItem(cardNames[i]);
} }
//重新选择选中的下拉项
chartID = chart.getChartID();
String plotID = chart.getPlot().getPlotID();
Object item = ChartTypeInterfaceManager.getInstance().getTitle4PopupWindow(chartID, plotID);
jcb.setSelectedItem(item);
fcb.setItemEvenType(ItemEventType.DEFAULT); fcb.setItemEvenType(ItemEventType.DEFAULT);
} }
@ -236,9 +240,8 @@ public class ChartTypePane extends AbstractChartAttrPane{
*/ */
public void populate(ChartCollection collection) { public void populate(ChartCollection collection) {
Chart chart = collection.getSelectedChart(); Chart chart = collection.getSelectedChart();
chartTypePane.populateBean(chart);
buttonPane.populateBean(collection); buttonPane.populateBean(collection);
chartTypePane.populateBean(chart);
} }
/** /**

Loading…
Cancel
Save