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.
56 lines
1.6 KiB
56 lines
1.6 KiB
package com.tptj.demo.hg.submit.provider; |
|
|
|
import com.fr.design.beans.BasicBeanPane; |
|
import com.fr.design.gui.ilable.UILabel; |
|
import com.fr.design.gui.itextfield.UITextField; |
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
import com.fr.design.layout.TableLayout; |
|
import com.fr.design.layout.TableLayoutHelper; |
|
import com.fr.stable.StringUtils; |
|
|
|
import javax.swing.*; |
|
import java.awt.*; |
|
|
|
/** |
|
* @author 秃破天际 |
|
* @version 10.0 |
|
* Created by 秃破天际 on 2021-05-18 |
|
**/ |
|
public class DemoSubmitPane extends BasicBeanPane<DemoSubmit> { |
|
private UITextField w_key; |
|
private UITextField w_value; |
|
|
|
public DemoSubmitPane(){ |
|
w_key = new UITextField(); |
|
w_value = new UITextField(); |
|
setLayout(FRGUIPaneFactory.createM_BorderLayout()); |
|
JPanel pane = TableLayoutHelper.createTableLayoutPane( |
|
new Component[][]{ |
|
{new UILabel("key:"), w_key}, |
|
{new UILabel("value:"), w_value} |
|
}, |
|
new double[]{TableLayout.PREFERRED,TableLayout.PREFERRED}, |
|
new double[]{ TableLayout.PREFERRED,TableLayout.FILL} |
|
); |
|
add( pane, BorderLayout.NORTH ); |
|
} |
|
|
|
@Override |
|
public void populateBean(DemoSubmit obj ) { |
|
w_key.setText(obj.getKey()); |
|
w_value.setText(obj.getValue()); |
|
} |
|
|
|
@Override |
|
public DemoSubmit updateBean() { |
|
DemoSubmit obj = new DemoSubmit(); |
|
obj.setKey(w_key.getText()); |
|
obj.setValue(w_value.getText()); |
|
return obj; |
|
} |
|
|
|
@Override |
|
protected String title4PopupWindow() { |
|
return StringUtils.EMPTY; |
|
} |
|
}
|
|
|