|
|
@ -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); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|