|
|
@ -3,7 +3,6 @@ package com.fr.design.widget.ui.btn; |
|
|
|
import java.awt.Component; |
|
|
|
import java.awt.Component; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.form.ui.FreeButton; |
|
|
|
import com.fr.form.ui.FreeButton; |
|
|
|
import com.fr.widgettheme.util.WidgetThemeDesignerUtils; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 自定义按钮 |
|
|
|
* 自定义按钮 |
|
|
@ -17,7 +16,7 @@ public class FreeButtonDetailPane extends AbstractExtraButtonPane<FreeButton> { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected Component createCenterPane() { |
|
|
|
protected Component createCenterPane() { |
|
|
|
buttonSytleDefinedPane = creatButtonSytleDefinedPane(); |
|
|
|
buttonSytleDefinedPane = new ButtonSytleDefinedPane(); |
|
|
|
return createExtraPane(buttonSytleDefinedPane); |
|
|
|
return createExtraPane(buttonSytleDefinedPane); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -28,17 +27,13 @@ public class FreeButtonDetailPane extends AbstractExtraButtonPane<FreeButton> { |
|
|
|
|
|
|
|
|
|
|
|
public void populate(FreeButton button) { |
|
|
|
public void populate(FreeButton button) { |
|
|
|
super.populate(button); |
|
|
|
super.populate(button); |
|
|
|
if (buttonSytleDefinedPane != null) { |
|
|
|
|
|
|
|
buttonSytleDefinedPane.populate(button); |
|
|
|
buttonSytleDefinedPane.populate(button); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public FreeButton update() { |
|
|
|
public FreeButton update() { |
|
|
|
FreeButton button = super.update(); |
|
|
|
FreeButton button = super.update(); |
|
|
|
if (buttonSytleDefinedPane != null) { |
|
|
|
|
|
|
|
buttonSytleDefinedPane.update(button); |
|
|
|
buttonSytleDefinedPane.update(button); |
|
|
|
} |
|
|
|
|
|
|
|
return button; |
|
|
|
return button; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -46,13 +41,4 @@ public class FreeButtonDetailPane extends AbstractExtraButtonPane<FreeButton> { |
|
|
|
public Class classType() { |
|
|
|
public Class classType() { |
|
|
|
return FreeButton.class; |
|
|
|
return FreeButton.class; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 自定义按钮控件开启控件显示增强时,原有的buttonSytleDefinedPane会被保留 |
|
|
|
|
|
|
|
* 内容和控件增强的pane重复,且不生效。其他控件目前不存在这种情况,因此要在实现这里做个判断 |
|
|
|
|
|
|
|
* 如果开启控件增强,原有的ButtonSytleDefinedPane不展示,创建时返回null |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private ButtonSytleDefinedPane creatButtonSytleDefinedPane() { |
|
|
|
|
|
|
|
return WidgetThemeDesignerUtils.enableWidgetEnhance() ? null : new ButtonSytleDefinedPane(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |