Package javax.microedition.lcdui

Examples of javax.microedition.lcdui.CommandListener


                ResourceConstants.SR_SUSPEND_ALERT_MSG, null);

            AlertTimer.start();


            CommandListener ignoring = new CommandListener() {
                public void commandAction(Command c, Displayable d) {}
            };

            suspendAlert = new SystemAlert(getDisp(token), title,
                message, null, AlertType.WARNING);
View Full Code Here


        choice.append(Resources.get(Resources.SINGLE_ENTRY), null);
    }

    protected void setData(String option) {
        if (parentScreen instanceof CommandListener) {
            CommandListener commandListener = (CommandListener)parentScreen;
            String title = getTitle();
            if (option.equals(Resources.get(Resources.ALL_RECURRENCES))) {
                if (title.equals(Resources.get(Resources.EDIT_RECURRENCE))) {
                    commandListener.commandAction(Commands.getEditAllCommand(), this);
                }
                else if (title.equals(Resources.get(Resources.DELETE_RECURRENCE))) {
                    commandListener.commandAction(Commands.getDeleteAllCommand(), this);
                }
            }
            else if (option.equals(Resources.get(Resources.SINGLE_ENTRY))) {
                if (title.equals(Resources.get(Resources.EDIT_RECURRENCE))) {
                    commandListener.commandAction(Commands.getEditSingleCommand(), this);
                }
                else if (title.equals(Resources.get(Resources.DELETE_RECURRENCE))) {
                    commandListener.commandAction(Commands.getDeleteSingleCommand(), this);
                }
            }
        }
    }
View Full Code Here

                                                                            getCallWithChoice(),
                                                                            getPauseCharTextField(),
                                                                            getGVNumberTextField() });
            changeSettingsMenu.addCommand(getSaveSettingsCmd());
            changeSettingsMenu.addCommand(getBackCmd());
            changeSettingsMenu.setCommandListener(new CommandListener() {

                public void commandAction(Command command, Displayable displayable) {
                    if(command == saveSettingsCmd)
                    {
                        try {
View Full Code Here

    public static Form getChangeSettingsMenu() {
        if (changeSettingsMenu == null) {
            changeSettingsMenu = new Form("Change Settings", new Item[] { getUsernameTextField(), getPasswordTextField(), getCallFromTextField(), getIntervalTextField() });//GEN-BEGIN:|233-getter|1|233-postInit
            changeSettingsMenu.addCommand(getSaveSettingsCmd());
            changeSettingsMenu.addCommand(getBackCmd());
            changeSettingsMenu.setCommandListener(new CommandListener() {

                public void commandAction(Command command, Displayable displayable) {
                    if(command == saveSettingsCmd)
                    {
                        try {
View Full Code Here

   
   
    // private stuff
   
    private void doDismiss() {
        CommandListener commandListener = getCommandListener();
        if (commandListener == null) {
            switchToNextDisplayable(); // @deprecated - works only if
                                       // appropriate setters were called and no command listener
                                       // was assigned to this component
        } else {
            commandListener.commandAction(DISMISS_COMMAND,this);
        }
    }
View Full Code Here

    }
   
    // private stuff   
    // private stuff
    private void doAction() {
        CommandListener cl = getCommandListener();
        if (cl != null) {
            if ((task != null) && task.hasFailed()) {
                cl.commandAction(FAILURE_COMMAND,this);
            } else {
                // task didn't failed - success !!!
                cl.commandAction(SUCCESS_COMMAND,this);
            }
        } else {
            // old behavior - now deprecated
            if ((task != null) && task.hasFailed() && (failureDisplayble != null))  {
                switchToDisplayable(getDisplay(), failureAlert, failureDisplayble);
View Full Code Here

TOP

Related Classes of javax.microedition.lcdui.CommandListener

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.