forked from fanruan/design
Browse Source
* commit '671513f3693da4a687b88c1c3bd861970118976c': REPORT-60561 全局自适应-样式细节优化 REPORT-60516 10.0release设计器打开cpt很慢 REPORT-56437 & REPORT-58955 国际化问题调整 REPORT-59475 控件校验错误提示支持公式 REPORT-59475 控件校验错误提示支持公式 REPORT-59476 && REPORT-59475 1、文本控件校验规则支持国际化 2、控件校验错误提示支持公式 REPORT-59166 韩文设计器设置条件属性 条件属性框体标题显示不全research/11.0
superman
3 years ago
21 changed files with 254 additions and 118 deletions
@ -0,0 +1,11 @@
|
||||
package com.fr.design.beans; |
||||
|
||||
import javax.swing.JComponent; |
||||
|
||||
public interface ErrorMsgTextFieldAdapter { |
||||
void setText(String str); |
||||
|
||||
String getText(); |
||||
|
||||
JComponent getErrorMsgTextField(); |
||||
} |
@ -0,0 +1,46 @@
|
||||
package com.fr.design.beans; |
||||
|
||||
import com.fr.design.gui.itextfield.UITextField; |
||||
|
||||
import javax.swing.JComponent; |
||||
import javax.swing.event.DocumentEvent; |
||||
import javax.swing.event.DocumentListener; |
||||
|
||||
public class UITextFieldAdapter implements ErrorMsgTextFieldAdapter { |
||||
private final UITextField uiTextField = new UITextField(); |
||||
|
||||
public UITextFieldAdapter(){ |
||||
addDocumentListener(); |
||||
} |
||||
@Override |
||||
public void setText(String str) { |
||||
uiTextField.setText(str); |
||||
} |
||||
|
||||
@Override |
||||
public String getText() { |
||||
return uiTextField.getText(); |
||||
} |
||||
|
||||
public void addDocumentListener() { |
||||
uiTextField.getDocument().addDocumentListener(new DocumentListener() { |
||||
|
||||
public void changedUpdate(DocumentEvent e) { |
||||
uiTextField.setToolTipText(uiTextField.getText()); |
||||
} |
||||
|
||||
public void insertUpdate(DocumentEvent e) { |
||||
uiTextField.setToolTipText(uiTextField.getText()); |
||||
} |
||||
|
||||
public void removeUpdate(DocumentEvent e) { |
||||
uiTextField.setToolTipText(uiTextField.getText()); |
||||
} |
||||
}); |
||||
} |
||||
|
||||
@Override |
||||
public JComponent getErrorMsgTextField() { |
||||
return uiTextField; |
||||
} |
||||
} |
@ -0,0 +1,11 @@
|
||||
package com.fr.design.fun; |
||||
|
||||
import com.fr.design.gui.frpane.RegFieldPane; |
||||
import com.fr.stable.fun.mark.Immutable; |
||||
|
||||
public interface RegPaneProvider extends Immutable { |
||||
int CURRENT_LEVEL = 1; |
||||
String XML_TAG = "RegPaneProvider"; |
||||
|
||||
RegFieldPane createRegPane(); |
||||
} |
@ -0,0 +1,11 @@
|
||||
package com.fr.design.fun; |
||||
|
||||
import com.fr.design.beans.ErrorMsgTextFieldAdapter; |
||||
import com.fr.stable.fun.mark.Immutable; |
||||
|
||||
public interface TextFieldAdapterProvider extends Immutable { |
||||
String XML_TAG = "ErrorMesPaneWrapperProvider"; |
||||
int CURRENT_LEVEL = 1; |
||||
|
||||
ErrorMsgTextFieldAdapter createTextFieldAdapter(); |
||||
} |
@ -0,0 +1,22 @@
|
||||
package com.fr.design.fun.impl; |
||||
|
||||
import com.fr.design.fun.RegPaneProvider; |
||||
import com.fr.stable.fun.mark.API; |
||||
|
||||
/** |
||||
* @author Joe |
||||
* 2021/10/8 15:19 |
||||
*/ |
||||
@API(level = RegPaneProvider.CURRENT_LEVEL) |
||||
public abstract class AbstractRegPaneProvider implements RegPaneProvider { |
||||
|
||||
@Override |
||||
public int currentAPILevel() { |
||||
return CURRENT_LEVEL; |
||||
} |
||||
|
||||
@Override |
||||
public int layerIndex() { |
||||
return DEFAULT_LAYER_INDEX; |
||||
} |
||||
} |
@ -0,0 +1,22 @@
|
||||
package com.fr.design.fun.impl; |
||||
|
||||
import com.fr.design.fun.TextFieldAdapterProvider; |
||||
import com.fr.stable.fun.mark.API; |
||||
|
||||
/** |
||||
* @author Joe |
||||
* 2021/10/8 15:17 |
||||
*/ |
||||
@API(level = TextFieldAdapterProvider.CURRENT_LEVEL) |
||||
public abstract class AbstractTextFieldAdapterProvider implements TextFieldAdapterProvider { |
||||
|
||||
@Override |
||||
public int currentAPILevel() { |
||||
return CURRENT_LEVEL; |
||||
} |
||||
|
||||
@Override |
||||
public int layerIndex() { |
||||
return DEFAULT_LAYER_INDEX; |
||||
} |
||||
} |
Loading…
Reference in new issue