Package javafx.scene.control

Examples of javafx.scene.control.Label


            TableCell cell = new TableCell() {
                @Override
                public void updateItem(Object item, boolean empty) {
                    if (item != null && !empty && item instanceof EncryptedNode) {
                        EncryptedNode node = (EncryptedNode) item;
                        Label label_cell = new Label();
                        label_cell.setId("generic_label");
                        try {
                            switch (column) {
                                case 0: {
                                    label_cell.setId("name_label");
                                    String t = node.getProperties().get("title");
                                    if (_IMPOSSIBLE_TITLE_.equals(t)) {
                                        label_cell.setText("...");
                                    } else {
                                        label_cell.setText(t);
                                    }
                                    break;
                                }
                                case 1: {
                                    sensibleInit(label_cell, node, "user_type", "user_name_value");
                                    break;
                                }
                                case 2: {
                                    label_cell.setText(node.getProperties().get("url_value"));
                                    break;
                                }
                                case 3: {
                                    label_cell.setText(node.getProperties().get("email_value"));
                                    break;
                                }
                                case 4: {
                                    sensibleInit(label_cell, node, "password1_type", "password1_value");
                                    break;
View Full Code Here


        PASS_TXT.setOnAction(eh);

        //--------------------------------------------------------------------//
        //--------------------------------------------------------------------//
        //--------------------------------------------------------------------//
        Label tips_login = (Label) getFromCacheNode("tips_login");
        tips_login.setText("");

        /**
         * Effetti grafici per rendere la GUI piu' gradevole.
         */
        stage.show();
        EffectFX.fadeOut(root_login, 1500).play();

        initial_x = stage.getX();
        initial_y = stage.getY();
        //--------------------------------------------------------------------//
        //--------------------------------------------------------------------//
        //--------------------------------------------------------------------//
        tips_login.setText("Tips: " + tips());
        EffectFX.fadeOut(tips_login, 2200).play();

        log("SCENE initial_x: " + initial_x);
        log("SCENE initial_y: " + initial_y);
        log("SCENE Width    : " + scene.getWidth());
        log("SCENE Height   : " + scene.getHeight());

        if (!isValidMakiDirectory()) {
            Label message_lbl = (Label) getFromCacheNode("message_lbl");
            message_lbl.setText(RBLoader.ll(
                    "First run please type your username (min 3) and password (min 8)."));
            EffectFX.arrowIndication(USER_TXT);
            EffectFX.arrowIndication(PASS_TXT);
        }
    }
View Full Code Here

         */
        // Recupero i valori inseriti
        master_username = USER_TXT.getText();
        master_password = PASS_TXT.getText();

        final Label message_lbl = (Label) getFromCacheNode("message_lbl");
        message_lbl.setText("");

        /**
         * Username non deve essere nullo o vuoto, e la password deve avere
         * almeno un numero maggiore uguale a MIN_PASS_LEN.
         */
        if (master_username == null || master_username.length() < Constants.MIN_USER_LEN) {

            USER_TXT.requestFocus();
            EffectFX.fadeOut(message_lbl, 100).play();
            EffectFX.arrowIndicationError(USER_TXT);
            message_lbl.setText(RBLoader.ll("Warning: incorrect User name value."));
            return;

        } else if (master_password == null || master_password.length() < Constants.MIN_PASS_LEN) {

            PASS_TXT.requestFocus();
            EffectFX.fadeOut(message_lbl, 100).play();
            EffectFX.arrowIndicationError(PASS_TXT);
            message_lbl.setText(RBLoader.ll("Warning: incorrect Password length, min 8 character."));
            return;

        }

        if (!maki_file_key.exists()) {
            InternalPopupMessage.create("maki_first_run_ask_retype_master_password", null, main_pane.getCenterNode(), new AnswerPopupValueMessage<String>() {

                @Override
                public void onOk(String value) {
                    savePoint();
                    if (master_password != null && value != null && master_password.equals(value)) {
                        login(USER_TXT, PASS_TXT, message_lbl);
                    } else {
                        EffectFX.neonEffect(username_lbl, Color.WHITE);
                        EffectFX.neonEffect(masterpwd_lbl, Color.WHITE);
                        PASS_TXT.setText("");
                        PASS_TXT.requestFocus();
                        EffectFX.fadeOut(message_lbl, 100).play();
                        EffectFX.arrowIndicationError(PASS_TXT);
                        message_lbl.setText(RBLoader.ll("Error: incorrect value. Please check your caps lock."));
                    }
                }

                @Override
                public void onCancel() {
View Full Code Here

        class BookmarkComboList extends ListCell<Item> {

            private final Label label;

            BookmarkComboList() {
                label = new Label();
            }
View Full Code Here

        /**
         * Con l'utility getFromCacheNode e' possibile caricare un oggetto
         * grafico, precedentemente inserito tramite l'apposita classe
         * controller.
         */
        Label username_lbl = (Label) getFromCacheNode("username_lbl");
        Label masterpwd_lbl = (Label) getFromCacheNode("masterpwd_lbl");

        EffectFX.neonEffect(username_lbl, Color.WHITE);
        EffectFX.neonEffect(masterpwd_lbl, Color.WHITE);

        /**
         * Se e' possibile per default il campo username e' impostato con il
         * valore della property "user.name".
         */
        final TextField USER_TXT = (TextField) getFromCacheNode("user_txt");

        String def_user = "";
        try {
            def_user = System.getProperty("user.name");
            if (def_user == null || def_user.length() == 0) {
                def_user = "";
            }
        } catch (Exception exc) {
        }
        USER_TXT.setText(def_user);

        /**
         * Carico i vari vaori del login, ed imposto gli eventi da gestire.
         */
        final PasswordField PASS_TXT = (PasswordField) getFromCacheNode("pass_txt");

        PASS_TXT.setText("");
        PASS_TXT.requestFocus();

        if (DEBUG) {
            PASS_TXT.setText("1234567890");
        }

        btn_exit = (Button) getFromCacheNode("exit_btn");
        btn_exit.setFocusTraversable(false);
        btn_exit.setOnAction((ActionEvent e) -> {
            UtilityFX.sysExit(__EXIT_NO_ERROR__);
        });

        login_btn = (Button) getFromCacheNode("login_btn");
        login_btn.setFocusTraversable(false);

        EventHandler<ActionEvent> eh = (ActionEvent event) -> {
            try {
                checkLogin(USER_TXT, PASS_TXT);
            } catch (Exception ex) {
                ex.printStackTrace();
            }
        };

        login_btn.setOnAction(eh);
        USER_TXT.setOnAction(eh);
        PASS_TXT.setOnAction(eh);

        //--------------------------------------------------------------------//
        //--------------------------------------------------------------------//
        //--------------------------------------------------------------------//
        Label tips_login = (Label) getFromCacheNode("tips_login");
        tips_login.setText("");

        /**
         * Effetti grafici per rendere la GUI piu' gradevole.
         */
        stage.show();
        EffectFX.fadeOut(root_login, 1500).play();

        initial_x = stage.getX();
        initial_y = stage.getY();
        //--------------------------------------------------------------------//
        //--------------------------------------------------------------------//
        //--------------------------------------------------------------------//
        tips_login.setText("Tips: " + tips());
        EffectFX.fadeOut(tips_login, 2200).play();

        log("SCENE initial_x: " + initial_x);
        log("SCENE initial_y: " + initial_y);
        log("SCENE Width    : " + scene.getWidth());
        log("SCENE Height   : " + scene.getHeight());

        if (!isValidMakiDirectory()) {
            Label message_lbl = (Label) getFromCacheNode("message_lbl");
            message_lbl.setText(RBLoader.ll(
                    "First run please type your username (min 3 chars) and password (min 8 chars)."));
            EffectFX.arrowIndication(USER_TXT);
            EffectFX.arrowIndication(PASS_TXT);
        }
    }
View Full Code Here

         */
        // Recupero i valori inseriti
        master_username = USER_TXT.getText();
        master_password = PASS_TXT.getText();

        final Label message_lbl = (Label) getFromCacheNode("message_lbl");
        message_lbl.setText("");

        /**
         * Username non deve essere nullo o vuoto, e la password deve avere
         * almeno un numero maggiore uguale a MIN_PASS_LEN.
         */
        if (master_username == null || master_username.length() < Constants.MIN_USER_LEN) {

            USER_TXT.requestFocus();
            EffectFX.fadeOut(message_lbl, 100).play();
            EffectFX.arrowIndicationError(USER_TXT);
            message_lbl.setText(RBLoader.ll("Warning: incorrect User name value."));
            return;

        } else if (master_password == null || master_password.length() < Constants.MIN_PASS_LEN) {

            PASS_TXT.requestFocus();
            EffectFX.fadeOut(message_lbl, 100).play();
            EffectFX.arrowIndicationError(PASS_TXT);
            message_lbl.setText(RBLoader.ll("Warning: incorrect Password length, min 8 character."));
            return;

        }

        /**
         * Se arrivo fino a questo punto, allora posso supporre che la password
         * e username siano corretti, quindi tento di decifrare il file e se ci
         * riesco, carico i plugin.
         */
        Task<Void> task = new Task<Void>() {
            private void printMsgLogin(final String message) {
                Platform.runLater(() -> {
                    try {

                        PASS_TXT.setDisable(false);
                        USER_TXT.setDisable(false);
                        btn_exit.setDisable(false);
                        login_btn.setDisable(false);

                        EffectFX.fadeOut(message_lbl, 100).play();
                        message_lbl.setText(RBLoader.ll(message));

                    } catch (Exception ex) {
                        ex.printStackTrace();
                    }
                });
            }

            @Override
            protected Void call() throws Exception {

                try {

                    Platform.runLater(() -> {
                        try {

                            PASS_TXT.setDisable(true);
                            USER_TXT.setDisable(true);
                            btn_exit.setDisable(true);
                            login_btn.setDisable(true);

                            EffectFX.fadeOut(message_lbl, 100).play();
                            message_lbl.setText(
                                    RBLoader.ll(
                                            "Please wait, while checking your username "
                                            + "and password."));

                        } catch (Exception ex) {
                            ex.printStackTrace();
                        }
                    });

                    enc_map = decodeEncFileMap();

                } catch (BaseApplicationException exc) {
                    printMsgLogin(exc.getMessage());
                    return null;
                } catch (Exception exc) {
                    UtilityFX.sysExit(__EXIT_ERROR_WRG_DECRYPT_FILE__);
                    return null;
                }

                Platform.runLater(() -> {
                    try {

                        EffectFX.fadeOut(message_lbl, 100).play();
                        message_lbl.setText(
                                RBLoader.ll(
                                        "Please wait, username and password "
                                        + "correct. Loading values."));

                    } catch (Exception ex) {
View Full Code Here

        return img;
    }

    public static Label sep() {
        Label label = sep(5.0, 5.0);
        return label;
    }
View Full Code Here

        Label label = sep(5.0, 5.0);
        return label;
    }

    public static Label sep(double w, double h) {
        Label label = new Label("");
        label.setAlignment(Pos.CENTER);
        label.setPrefSize(w, h);
        label.setMaxSize(label.getPrefWidth(), label.getPrefHeight());
        label.setMinSize(label.getPrefWidth(), label.getHeight());
        return label;
    }
View Full Code Here

    public InternalPopupMessage setHeader(String h_message) {
        if (h_message == null) {
            return this;
        }
        header = new Label();
        header.setAlignment(Pos.CENTER);
        header.setFont(new Font("Arial", 16));
        if (h_message.length() > 48) {
            h_message = h_message.substring(0, 48);
        }
View Full Code Here

    public InternalPopupMessage setContent(String center_message) {
        if (center_message == null) {
            return this;
        }
        content = new Label();
        content.setWrapText(true);
        content.setTextAlignment(TextAlignment.JUSTIFY);
        content.setFont(new Font("Arial", 14));
        content.setText(RBLoader.ll(center_message));
        return this;
View Full Code Here

TOP

Related Classes of javafx.scene.control.Label

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.