Browse Source

修改

master
zack 9 years ago
parent
commit
652c0d21ae
  1. 13
      designer/src/com/fr/design/widget/WidgetPane.java

13
designer/src/com/fr/design/widget/WidgetPane.java

@ -75,18 +75,17 @@ public class WidgetPane extends BasicPane implements ItemListener {
*/ */
public void itemStateChanged(ItemEvent e) { public void itemStateChanged(ItemEvent e) {
if (e.getStateChange() == ItemEvent.SELECTED) { if (e.getStateChange() == ItemEvent.SELECTED) {
if (e.getItem() instanceof Item && ((Item) e.getItem()).getValue() instanceof WidgetConfig) { setOldWidget(update());
Widget newWidget = editorTypeComboBox.getCellWidget();
populate(editorTypeComboBox.getCellWidget());
return;
}
if (shouldFireSelectedEvent) {
Widget selectedItem = editorTypeComboBox.getCellWidget(); Widget selectedItem = editorTypeComboBox.getCellWidget();
WidgetDesignHandler handler = ExtraDesignClassManager.getInstance().getWidgetDesignHandler(); WidgetDesignHandler handler = ExtraDesignClassManager.getInstance().getWidgetDesignHandler();
if (handler != null) { if (handler != null) {
selectedItem = handler.dealWithWidget(getOldWidget(), selectedItem); selectedItem = handler.dealWithWidget(getOldWidget(), selectedItem);
} }
if (e.getItem() instanceof Item && ((Item) e.getItem()).getValue() instanceof WidgetConfig) {
populate(selectedItem);
return;
}
if (shouldFireSelectedEvent) {
populateWidgetConfig(selectedItem); populateWidgetConfig(selectedItem);
} }
} }

Loading…
Cancel
Save