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.
67 lines
1.9 KiB
67 lines
1.9 KiB
package com.fr.plugin.pane; |
|
|
|
import com.fr.design.designer.IntervalConstants; |
|
import com.fr.design.gui.ilable.UILabel; |
|
import com.fr.design.gui.itextarea.UITextArea; |
|
import com.fr.design.gui.itextfield.UITextField; |
|
import com.fr.design.layout.TableLayout; |
|
import com.fr.design.layout.TableLayoutHelper; |
|
import com.fr.design.widget.ui.AbstractDataModify; |
|
import com.fr.plugin.widget.ICEEditorWidget; |
|
|
|
import javax.swing.*; |
|
import java.awt.*; |
|
|
|
|
|
public class MyWidgetConfigPane extends AbstractDataModify<ICEEditorWidget> { |
|
UITextField ui = new UITextField(); |
|
|
|
public MyWidgetConfigPane() { |
|
//初始化配置界面 |
|
this.setLayout(new BorderLayout()); |
|
double f = TableLayout.FILL; |
|
double p = TableLayout.PREFERRED; |
|
Component[][] components = new Component[][]{ |
|
new Component[]{new UILabel("水印文字"), ui}, |
|
}; |
|
double[] rowSize = {p}; |
|
double[] columnSize = {p, f}; |
|
int[][] rowCount = {{1, 1}}; |
|
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W3, IntervalConstants.INTERVAL_L1); |
|
this.add(panel, BorderLayout.CENTER); |
|
} |
|
|
|
/** |
|
* 根据传递进来控件类,刷新当前的界面 |
|
* |
|
* @param iceEditorWidget |
|
*/ |
|
@Override |
|
public void populateBean(ICEEditorWidget iceEditorWidget) { |
|
String config1 = iceEditorWidget.getConfig1(); |
|
ui.setText(config1); |
|
} |
|
|
|
/** |
|
* 根据当前属性界面返回一个控件类 |
|
* |
|
* @return |
|
*/ |
|
@Override |
|
public ICEEditorWidget updateBean() { |
|
ICEEditorWidget iceEditorWidget = new ICEEditorWidget(); |
|
String config1 = ui.getText(); |
|
iceEditorWidget.setConfig1(config1); |
|
return iceEditorWidget; |
|
} |
|
|
|
/** |
|
* 标题 |
|
* |
|
* @return |
|
*/ |
|
@Override |
|
protected String title4PopupWindow() { |
|
return "ICEConfig"; |
|
} |
|
}
|
|
|