Package nfc.sample.nfctransaction.ui.buttons

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


        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);
        mgr.add(user_message, user_message_x, user_message_y);
View Full Code Here


*/

public class Iso7816Command extends AlwaysExecutableCommand {

    public void execute(ReadOnlyCommandMetadata metadata, Object context) {
        MultiStateButtonField btn = (MultiStateButtonField) context;
        if(btn.getMsbState() == Constants.BTN_SELECT_OFF) {
            Utilities.log("XXXX " + Thread.currentThread().getName() + " ISO 7816-4 command exiting because button is in OFF state");
            return;
        }
        Settings settings = Settings.getInstance();
        NfcTransScreen screen = NfcTransScreen.getInstance();
View Full Code Here

TOP

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

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.