Package nfc.sample.virtual.target.buttons

Examples of nfc.sample.virtual.target.buttons.MsbConfig


        int vgap = (int) (Display.getHeight() - 120) / 2;
        int x1= hgap;
        int x2= x1 + 120 + hgap;
        int y = (int) (vgap * 0.75);
       
        MsbConfig sc_btn_config = new MsbConfig();
        MsbState sc_btn_state = new MsbState(Constants.SC_BTN_STATE, "Emulate Smart Card", "Emulate Smart Card");
        sc_btn_state.setbmp_focused(sc_focused);
        sc_btn_state.setbmp_unfocused(sc_unfocused);
        sc_btn_state.setbmp_clicked(sc_clicked);
        sc_btn_state.setbmp_unclicked(sc_focused);
        sc_btn_config.addState(sc_btn_state);
        msbf_sc = new MultiStateButtonField(sc_btn_config, new EmulateScCommand(), 0, Field.FIELD_HCENTER);
        btn_row.add(msbf_sc,x1,y);

        MsbConfig sr_btn_config = new MsbConfig();
        MsbState sr_btn_state = new MsbState(Constants.SR_BTN_STATE, "Emulate Reader", "Emulate Reader");
        sr_btn_state.setbmp_focused(sr_focused);
        sr_btn_state.setbmp_unfocused(sr_unfocused);
        sr_btn_state.setbmp_clicked(sr_clicked);
        sr_btn_state.setbmp_unclicked(sr_focused);
        sr_btn_config.addState(sr_btn_state);
        msbf_sr = new MultiStateButtonField(sr_btn_config, new EmulateSrCommand(), 0, Field.FIELD_HCENTER);
        btn_row.add(msbf_sr,x2,y);

        msbf_sc.setFocusListener(focus_listener);
        msbf_sr.setFocusListener(focus_listener);
View Full Code Here

TOP

Related Classes of nfc.sample.virtual.target.buttons.MsbConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.