forked from fanruan/design
Browse Source
* commit 'fdf468ecf326fd24c86c9a7a530fba853dcf9e87': CQ-9 没有装插件的设计打开带有插件控件的表单时,需要能正确的打开并提示master
superman
8 years ago
3 changed files with 36 additions and 1 deletions
@ -0,0 +1,28 @@ |
|||||||
|
package com.fr.design.designer.creator; |
||||||
|
|
||||||
|
import com.fr.form.ui.ErrorMarker; |
||||||
|
import com.fr.form.ui.Widget; |
||||||
|
import com.fr.stable.StringUtils; |
||||||
|
|
||||||
|
import java.awt.*; |
||||||
|
|
||||||
|
/** |
||||||
|
* Created by richie on 2017/6/28. |
||||||
|
*/ |
||||||
|
public class ErrorCreator extends NullCreator { |
||||||
|
|
||||||
|
public ErrorCreator(Widget widget, Dimension initSize) { |
||||||
|
super(widget, initSize); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
@Override |
||||||
|
protected String showText() { |
||||||
|
ErrorMarker marker = (ErrorMarker)toData(); |
||||||
|
String text = marker.getWidgetValue().getDisplayValue(); |
||||||
|
if (StringUtils.isEmpty(text)) { |
||||||
|
return super.showText(); |
||||||
|
} |
||||||
|
return text; |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue