Package nfc.sample.nfctransaction.ui.buttons

Examples of nfc.sample.nfctransaction.ui.buttons.MsbState


        // centre LEDs over the button columns
        mgr.add(nfc_led, x_centre_1 - (bmp_nfc_led_on.getWidth() / 2), 0);
        mgr.add(cem_led, x_centre_2 - (bmp_ce_led_on.getWidth() / 2), 0);
       
        MsbConfig config1 = new MsbConfig();
        MsbState ce_off = new MsbState(Constants.BTN_CE_OFF, "Switch card emulation OFF", "CE OFF");
        ce_off.setbmp_focused(ce_off_focused);
        ce_off.setbmp_unfocused(ce_off_unfocused);
        ce_off.setbmp_clicked(ce_off_clicked);
        ce_off.setbmp_unclicked(ce_off_unclicked);
        config1.addState(ce_off);
        MsbState ce_on = new MsbState(Constants.BTN_CE_ON, "Switch card emulation ON", "CE ON");
        ce_on.setbmp_focused(ce_on_focused);
        ce_on.setbmp_unfocused(ce_on_unfocused);
        ce_on.setbmp_clicked(ce_on_clicked);
        ce_on.setbmp_unclicked(ce_on_unclicked);
        config1.addState(ce_on);
        msbf_ce_on = new MultiStateButtonField(config1, new ToggleCeCommand(), 0, Field.FIELD_HCENTER);
        mgr.add(msbf_ce_on, x1, y1);

        MsbConfig config2 = new MsbConfig();
        MsbState clear = new MsbState(Constants.BTN_DEFAULT, "Clear last AID received field", "Clear");
        clear.setbmp_focused(clear_focused);
        clear.setbmp_unfocused(clear_unfocused);
        clear.setbmp_clicked(clear_clicked);
        clear.setbmp_unclicked(clear_unclicked);
        config2.addState(clear);
        msbf_clear = new MultiStateButtonField(config2, new ClearCommand(), 0, Field.FIELD_HCENTER);
        mgr.add(msbf_clear, x2, y1);

        MsbConfig config3 = new MsbConfig();
        MsbState select_on = new MsbState(Constants.BTN_DEFAULT, "Select applet", "Select");
        select_on.setbmp_focused(select_on_focused);
        select_on.setbmp_unfocused(select_on_unfocused);
        select_on.setbmp_clicked(select_on_clicked);
        select_on.setbmp_unclicked(select_on_unclicked);
        config3.addState(select_on);
        MsbState select_off = new MsbState(Constants.BTN_SELECT_OFF, "Select applet", "Select");
        select_off.setbmp_focused(select_off_focused);
        select_off.setbmp_unfocused(select_off_unfocused);
        select_off.setbmp_clicked(select_off_clicked);
        select_off.setbmp_unclicked(select_off_unclicked);
        config3.addState(select_off);
        Iso7816Command select_command = new Iso7816Command();
        msbf_select = new MultiStateButtonField(config3, select_command, 0, Field.FIELD_HCENTER);
        mgr.add(msbf_select, x1, y2);

        MsbConfig config4 = new MsbConfig();
        MsbState close = new MsbState(0, "Send to background", "Close");
        close.setbmp_focused(close_focused);
        close.setbmp_unfocused(close_unfocused);
        close.setbmp_clicked(close_clicked);
        close.setbmp_unclicked(close_unclicked);
        config4.addState(close);
        msbf_close = new MultiStateButtonField(config4, new CloseCommand(), 0, Field.FIELD_HCENTER);
        mgr.add(msbf_close, x2, y2);
       
        mgr.add(last_aids, last_aids_x, last_aids_y);
View Full Code Here

TOP

Related Classes of nfc.sample.nfctransaction.ui.buttons.MsbState

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.