forked from hugh/demo-hyperlink-provider
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.
58 lines
1.6 KiB
58 lines
1.6 KiB
4 years ago
|
package com.tptj.demo.hg.hyperlink.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-17
|
||
|
**/
|
||
|
public class DemoHyperlinkPane extends BasicBeanPane<DemoHyperlink> {
|
||
|
|
||
|
private UITextField w_key;
|
||
|
private UITextField w_value;
|
||
|
|
||
|
public DemoHyperlinkPane(){
|
||
|
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(DemoHyperlink link ) {
|
||
|
w_key.setText(link.getKey());
|
||
|
w_value.setText(link.getValue());
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public DemoHyperlink updateBean() {
|
||
|
DemoHyperlink link = new DemoHyperlink();
|
||
|
link.setKey(w_key.getText());
|
||
|
link.setValue(w_value.getText());
|
||
|
return link;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
protected String title4PopupWindow() {
|
||
|
return StringUtils.EMPTY;
|
||
|
}
|
||
|
}
|