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.
48 lines
1.1 KiB
48 lines
1.1 KiB
package com.tptj.demo.hg.present.kind.provider; |
|
|
|
import com.fr.design.beans.FurtherBasicBeanPane; |
|
import com.fr.design.gui.icombobox.UIComboBox; |
|
|
|
import java.awt.*; |
|
|
|
/** |
|
* @author 秃破天际 |
|
* @version 10.0 |
|
* Created by 秃破天际 on 2021-04-29 |
|
**/ |
|
public class DemoPane extends FurtherBasicBeanPane<DemoPresent> { |
|
private UIComboBox w_type; |
|
|
|
public DemoPane(){ |
|
w_type = new UIComboBox(new String[]{"txt","img"}); |
|
this.setLayout(new BorderLayout()); |
|
this.add(w_type, BorderLayout.NORTH); |
|
} |
|
|
|
@Override |
|
public boolean accept(Object o) { |
|
return o instanceof DemoPresent; |
|
} |
|
|
|
@Override |
|
public void reset() { |
|
populateBean( new DemoPresent() ); |
|
} |
|
|
|
@Override |
|
public String title4PopupWindow() { |
|
return "Demo Present"; |
|
} |
|
|
|
@Override |
|
public void populateBean( DemoPresent obj ) { |
|
w_type.setSelectedItem( obj.getType() ); |
|
} |
|
|
|
@Override |
|
public DemoPresent updateBean() { |
|
DemoPresent obj = new DemoPresent(); |
|
obj.setType( (String) w_type.getSelectedItem() ); |
|
return obj; |
|
} |
|
}
|
|
|