Browse Source
Merge in DESIGN/design from ~HADES/design:feature/x to feature/x * commit 'd8f6332bd2c565c14c3062d7cfc86bc447edb714': MOBILE-34385 设计器文本控件移动端新增nfc输入feature/x
Hades
3 years ago
3 changed files with 77 additions and 72 deletions
@ -0,0 +1,61 @@
|
||||
package com.fr.design.widget.ui.designer.mobile.component; |
||||
|
||||
import com.fr.base.mobile.MobileScanCodeAttr; |
||||
import com.fr.design.beans.BasicBeanPane; |
||||
import com.fr.design.gui.icheckbox.UICheckBox; |
||||
import com.fr.design.i18n.Toolkit; |
||||
import com.fr.design.layout.FRGUIPaneFactory; |
||||
import java.awt.BorderLayout; |
||||
import java.awt.FlowLayout; |
||||
import javax.swing.JPanel; |
||||
|
||||
/** |
||||
* @author hades |
||||
* @version 11.0 |
||||
* Created by hades on 2021/12/15 |
||||
*/ |
||||
public class MobileTextFieldInputSettingPane extends BasicBeanPane<MobileScanCodeAttr> { |
||||
|
||||
private final UICheckBox manualInputCheckBox; |
||||
private final UICheckBox scanCodeCheckBox; |
||||
private final UICheckBox nfcInputCheckBox; |
||||
|
||||
public MobileTextFieldInputSettingPane() { |
||||
this.setLayout(FRGUIPaneFactory.createBorderLayout()); |
||||
JPanel settingPane = FRGUIPaneFactory.createVerticalFlowLayout_Pane(true, FlowLayout.LEADING, 0, 5); |
||||
manualInputCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Mobile_Manual_Input"), true); |
||||
scanCodeCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Mobile_Scan_Code_Input"), true); |
||||
nfcInputCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Mobile_NFC_Input"), false); |
||||
settingPane.add(manualInputCheckBox); |
||||
settingPane.add(scanCodeCheckBox); |
||||
settingPane.add(nfcInputCheckBox); |
||||
this.add(settingPane, BorderLayout.NORTH); |
||||
} |
||||
|
||||
@Override |
||||
public void populateBean(MobileScanCodeAttr ob) { |
||||
manualInputCheckBox.setSelected(ob.isSupportManual()); |
||||
scanCodeCheckBox.setSelected(ob.isSupportScan()); |
||||
nfcInputCheckBox.setSelected(ob.isSupportNFC()); |
||||
} |
||||
|
||||
@Override |
||||
public MobileScanCodeAttr updateBean() { |
||||
// do nothing
|
||||
return null; |
||||
} |
||||
|
||||
@Override |
||||
public void updateBean(MobileScanCodeAttr ob) { |
||||
ob.setSupportManual(manualInputCheckBox.isSelected()); |
||||
ob.setSupportScan(scanCodeCheckBox.isSelected()); |
||||
ob.setSupportNFC(nfcInputCheckBox.isSelected()); |
||||
} |
||||
|
||||
|
||||
@Override |
||||
protected String title4PopupWindow() { |
||||
return null; |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue