JSD-8806 VUE日期控件
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

65 lines
1.9 KiB

/*
* Copyright (C), 2018-2021
* Project: starter
* FileName: ConfigurationItemEditor
* Author: Louis
* Date: 2021/11/18 16:38
*/
package com.fr.plugin.hrjf.editors;
import com.fanruan.api.design.ui.component.UITextArea;
import com.fr.design.Exception.ValidationException;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.widget.editors.AbstractPropertyEditor;
import javax.swing.*;
import javax.swing.border.Border;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import java.awt.*;
/**
* <Function Description><br>
* <ConfigurationItemEditor>
*
* @author fr.open
* @since 1.0.0
*/
public class ConfigurationItemEditor extends AbstractPropertyEditor {
private static final int CONTENT_PANE_COLUMNS = 25;
private JPanel panel = FRGUIPaneFactory.createBorderLayout_S_Pane();
private UITextArea textField = new UITextArea(5, CONTENT_PANE_COLUMNS);
public ConfigurationItemEditor() {
this.panel.add(this.textField, "Center");
this.textField.setBorder((Border) null);
this.textField.getDocument().addDocumentListener(new DocumentListener() {
public void removeUpdate(DocumentEvent var1) {
ConfigurationItemEditor.this.firePropertyChanged();
}
public void insertUpdate(DocumentEvent var1) {
ConfigurationItemEditor.this.firePropertyChanged();
}
public void changedUpdate(DocumentEvent var1) {
ConfigurationItemEditor.this.firePropertyChanged();
}
});
}
public Object getValue() {
return this.textField.getText();
}
public void setValue(Object var1) {
this.textField.setText((String) var1);
}
public Component getCustomEditor() {
return this.textField;
}
public void validateValue() throws ValidationException {
}
}