Browse Source

修改方法名

master
zack 9 years ago
parent
commit
47f779ac70
  1. 2
      designer/src/com/fr/design/widget/WidgetPane.java
  2. 6
      designer_base/src/com/fr/design/fun/WidgetDesignHandler.java

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

@ -71,7 +71,7 @@ public class WidgetPane extends BasicPane implements ItemListener {
Widget selectedItem = editorTypeComboBox.getCellWidget(); Widget selectedItem = editorTypeComboBox.getCellWidget();
WidgetDesignHandler handler = ExtraDesignClassManager.getInstance().getWidgetDesignHandler(); WidgetDesignHandler handler = ExtraDesignClassManager.getInstance().getWidgetDesignHandler();
if (handler != null) { if (handler != null) {
handler.dealWithWidget(oldWidget, selectedItem); handler.transferWidgetProperties(oldWidget, selectedItem);
} }
if (e.getItem() instanceof Item && ((Item) e.getItem()).getValue() instanceof WidgetConfig) { if (e.getItem() instanceof Item && ((Item) e.getItem()).getValue() instanceof WidgetConfig) {
populate(selectedItem); populate(selectedItem);

6
designer_base/src/com/fr/design/fun/WidgetDesignHandler.java

@ -11,12 +11,12 @@ import com.fr.stable.fun.Level;
public interface WidgetDesignHandler extends Level { public interface WidgetDesignHandler extends Level {
String XML_TAG = "WidgetDesignHandler"; String XML_TAG = "WidgetDesignHandler";
int CURRENT_LEVEL = 1; int CURRENT_LEVEL = 1;
/** /**
* 控件设置的时候对原控件和新控件的一些特殊处理比如属性的传递默认属性的设置等 * 传递控件共有属性
* *
* @param oldWidget 老控件 * @param oldWidget 老控件
* @param newWidget 新控件 * @param newWidget 新控件
* @return 处理后的控件
*/ */
void dealWithWidget(Widget oldWidget, Widget newWidget); void transferWidgetProperties(Widget oldWidget, Widget newWidget);
} }

Loading…
Cancel
Save