Package javax.microedition.lcdui

Examples of javax.microedition.lcdui.Alert


    public void timeSystemShortOnTime(boolean isBlack, int millisLeft) {
        snd.playShortOnTime();
    }

    public void timeSystemTimeout(boolean isBlack) {
        Alert a = new Alert(T._("Game timer"), (isBlack ? T._("Black") : T._("White")) + T._(" timeout!"), null, AlertType.INFO);
        a.setTimeout(Alert.FOREVER);
        display.setCurrent(a, gobanCanvas);
    }
View Full Code Here


                    os.close();
                    //#ifdef debug
                    System.out.println("DONE");
                    //#endif

                    Alert a = new Alert(T._("Save"), T._("Done"), null, AlertType.INFO);
                    display.setCurrent(a, gobanCanvas);
                } catch (Exception e) {
                    onError(T._("Save"), e);
                }
            }
View Full Code Here

        //#endif
        onError(title, e.toString());
    }

    private void onError(String title, String text) {
        Alert a = new Alert(title, text, null, AlertType.ERROR);
        a.setTimeout(Alert.FOREVER);
        display.setCurrent(a, gobanCanvas);
        //game.board.print();
    }
View Full Code Here

    public void igMenuNextProblem() {
        if (probEnum != null) {
            if (probEnum.hasMoreElements())
                setProblem(probEnum.nextElement());
            else {
                Alert alert = new Alert(T._("Problem solving"),
                        T._("End of enumeration, start with new filter."),
                        null, AlertType.INFO);
                display.setCurrent(alert, menuScreen.getProblemFilterForm());
            }
        }
View Full Code Here

    public void igMenuPrevProblem() {
        if (probEnum != null) {
            if (probEnum.current() > 0)
                setProblem(probEnum.prevElement());
            else {
                Alert alert = new Alert(T._("Problem solving"),
                        T._("Start of enumeration reached."),
                        null, AlertType.INFO);
                display.setCurrent(alert);
            }
        }
View Full Code Here

    public void timeSystemShortOnTime(boolean isBlack, int millisLeft) {
        snd.playShortOnTime();
    }

    public void timeSystemTimeout(boolean isBlack) {
        Alert a = new Alert(T._("Game timer"), (isBlack ? T._("Black") : T._("White")) + T._(" timeout!"), null, AlertType.INFO);
        a.setTimeout(Alert.FOREVER);
        display.setCurrent(a, gobanCanvas);
    }
View Full Code Here

            InputStream is = getClass().getResourceAsStream(file);
            Player p = Manager.createPlayer(is, "audio/x-wav");
            p.start();
        } catch (Exception e) {
            //#ifdef debug
            Alert a = new Alert("Exception", e.toString(), null, AlertType.INFO);
            a.setTimeout(Alert.FOREVER);
            display.setCurrent(a);
            //#endif
        }
    }
View Full Code Here

        long mainTime = Integer.parseInt(newGameMainTime.getString()) * 1000;
        long byoYomiTime = Integer.parseInt(newGameByoYomiTime.getString()) * 1000;
        int byoYomiAttr = Integer.parseInt(newGameByoYomiAttr.getString());

        if (alertText.length() > 0) {
            Alert alert = new Alert(T._("Error!"), alertText.toString(), null, AlertType.ERROR);
            alert.setTimeout(Alert.FOREVER);
            display.setCurrent(alert);
        } else
            listener.mainMenuNewGame(white, black, ruleSet, size, handicap, komi, timeSystem, mainTime, byoYomiTime, byoYomiAttr);
    }
View Full Code Here

        } catch (Exception x) {
            probError(T._("Unable to enumerate records!"), x, null);
            return;
        }
        if (e == null || !e.hasMoreElements()) {
            Alert alert = new Alert(T._("Problem solving"),
                    T._("Empty set, try widening criteria."),
                    null, AlertType.INFO);
            display.setCurrent(alert);
        } else
            listener.mainMenuSolveProblems(e);
View Full Code Here

        new Thread(new Runnable() {
            public void run() {
                try {
                    int n = pdb.addPath(path, true);
                    probUpdateFromPDB();
                    Alert alert = new Alert(T._("Add Path"), T._("") + n + T._(" problems added"), null, AlertType.INFO);
                    alert.setTimeout(Alert.FOREVER);
                    display.setCurrent(alert, goBack());
                } catch (Exception e) {
                    probError(T._("Unable to add path!"), e, goBack());
                }
            }
View Full Code Here

TOP

Related Classes of javax.microedition.lcdui.Alert

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.