Package fr.soleil.lib.project.swing.text

Examples of fr.soleil.lib.project.swing.text.ErrorTextField


                }
            });
            roiVisibilityBoxes[i].setBackground(roiColor);

            final int index = i;
            startTextFields[i] = new ErrorTextField("0");
            startTextFields[i].setErrorColor(getBackground());
            final int startTextFieldsIndex = i;

            startTextFields[i].addKeyListener(new KeyListener() {

                @Override
                public void keyPressed(KeyEvent e) {
                    // nothing to do
                }

                @Override
                public void keyReleased(KeyEvent e) {
                    try {
                        Double.parseDouble(startTextFields[startTextFieldsIndex].getText());
                    } catch (NumberFormatException e1) {
                        startTextFields[startTextFieldsIndex].setBackground(VALUE_ERROR_COLOR);
                    }
                }

                @Override
                public void keyTyped(KeyEvent e) {
                    // nothing to do
                }

            });

            startTextFields[i].getDocument().addDocumentListener(new DocumentListener() {
                @Override
                public void changedUpdate(DocumentEvent e) {
                    enableSetRoi(startTextFields[index]);
                }

                @Override
                public void insertUpdate(DocumentEvent e) {
                    enableSetRoi(startTextFields[index]);
                }

                @Override
                public void removeUpdate(DocumentEvent e) {
                    enableSetRoi(startTextFields[index]);
                }
            });

            endTextFields[i] = new ErrorTextField("0");
            endTextFields[i].setErrorColor(getBackground());
            final int endTextFieldsIndex = i;
            endTextFields[i].addKeyListener(new KeyListener() {

                @Override
View Full Code Here


                }
            });
            roiVisibilityBoxes[i].setBackground(roiColor);

            final int index = i;
            startTextFields[i] = new ErrorTextField("0");
            startTextFields[i].setErrorColor(getBackground());
            final int startTextFieldsIndex = i;

            startTextFields[i].addKeyListener(new KeyListener() {

                @Override
                public void keyPressed(KeyEvent e) {
                    // nothing to do
                }

                @Override
                public void keyReleased(KeyEvent e) {
                    try {
                        Double.parseDouble(startTextFields[startTextFieldsIndex].getText());
                    } catch (NumberFormatException e1) {
                        startTextFields[startTextFieldsIndex].setBackground(VALUE_ERROR_COLOR);
                    }
                }

                @Override
                public void keyTyped(KeyEvent e) {
                    // nothing to do
                }

            });

            startTextFields[i].getDocument().addDocumentListener(new DocumentListener() {
                @Override
                public void changedUpdate(DocumentEvent e) {
                    enableSetRoi(startTextFields[index]);
                }

                @Override
                public void insertUpdate(DocumentEvent e) {
                    enableSetRoi(startTextFields[index]);
                }

                @Override
                public void removeUpdate(DocumentEvent e) {
                    enableSetRoi(startTextFields[index]);
                }
            });

            endTextFields[i] = new ErrorTextField("0");
            endTextFields[i].setErrorColor(getBackground());
            final int endTextFieldsIndex = i;
            endTextFields[i].addKeyListener(new KeyListener() {

                @Override
View Full Code Here

                }
            });
            roiVisibilityBoxes[i].setBackground(roiColor);

            final int index = i;
            startTextFields[i] = new ErrorTextField("0");
            startTextFields[i].setErrorColor(getBackground());
            final int startTextFieldsIndex = i;

            startTextFields[i].addKeyListener(new KeyListener() {

                @Override
                public void keyPressed(KeyEvent e) {
                    // nothing to do
                }

                @Override
                public void keyReleased(KeyEvent e) {
                    try {
                        Double.parseDouble(startTextFields[startTextFieldsIndex].getText());
                    }
                    catch (NumberFormatException e1) {
                        startTextFields[startTextFieldsIndex].setBackground(VALUE_ERROR_COLOR);
                    }
                }

                @Override
                public void keyTyped(KeyEvent e) {
                    // nothing to do
                }

            });

            startTextFields[i].getDocument().addDocumentListener(new DocumentListener() {
                @Override
                public void changedUpdate(DocumentEvent e) {
                    enableSetRoi(startTextFields[index]);
                }

                @Override
                public void insertUpdate(DocumentEvent e) {
                    enableSetRoi(startTextFields[index]);
                }

                @Override
                public void removeUpdate(DocumentEvent e) {
                    enableSetRoi(startTextFields[index]);
                }
            });

            endTextFields[i] = new ErrorTextField("0");
            endTextFields[i].setErrorColor(getBackground());
            final int endTextFieldsIndex = i;
            endTextFields[i].addKeyListener(new KeyListener() {

                @Override
View Full Code Here

                }
            });
            roiVisibilityBoxes[i].setBackground(roiColor);

            final int index = i;
            startTextFields[i] = new ErrorTextField("0");
            startTextFields[i].setErrorColor(getBackground());
            final int startTextFieldsIndex = i;

            startTextFields[i].addKeyListener(new KeyListener() {

                @Override
                public void keyPressed(KeyEvent e) {
                    // nothing to do
                }

                @Override
                public void keyReleased(KeyEvent e) {
                    try {
                        Double.parseDouble(startTextFields[startTextFieldsIndex].getText());
                    }
                    catch (NumberFormatException e1) {
                        startTextFields[startTextFieldsIndex].setBackground(VALUE_ERROR_COLOR);
                    }
                }

                @Override
                public void keyTyped(KeyEvent e) {
                    // nothing to do
                }

            });

            startTextFields[i].getDocument().addDocumentListener(new DocumentListener() {
                @Override
                public void changedUpdate(DocumentEvent e) {
                    enableSetRoi(startTextFields[index]);
                }

                @Override
                public void insertUpdate(DocumentEvent e) {
                    enableSetRoi(startTextFields[index]);
                }

                @Override
                public void removeUpdate(DocumentEvent e) {
                    enableSetRoi(startTextFields[index]);
                }
            });

            endTextFields[i] = new ErrorTextField("0");
            endTextFields[i].setErrorColor(getBackground());
            final int endTextFieldsIndex = i;
            endTextFields[i].addKeyListener(new KeyListener() {

                @Override
View Full Code Here

                }
            });
            roiVisibilityBoxes[i].setBackground(roiColor);

            final int index = i;
            startTextFields[i] = new ErrorTextField("0");
            startTextFields[i].setErrorColor(getBackground());
            final int startTextFieldsIndex = i;

            startTextFields[i].addKeyListener(new KeyListener() {

                @Override
                public void keyPressed(KeyEvent e) {
                    // nothing to do
                }

                @Override
                public void keyReleased(KeyEvent e) {
                    try {
                        Double.parseDouble(startTextFields[startTextFieldsIndex].getText());
                    }
                    catch (NumberFormatException e1) {
                        startTextFields[startTextFieldsIndex].setBackground(VALUE_ERROR_COLOR);
                    }
                }

                @Override
                public void keyTyped(KeyEvent e) {
                    // nothing to do
                }

            });

            startTextFields[i].getDocument().addDocumentListener(new DocumentListener() {
                @Override
                public void changedUpdate(DocumentEvent e) {
                    enableSetRoi(startTextFields[index]);
                }

                @Override
                public void insertUpdate(DocumentEvent e) {
                    enableSetRoi(startTextFields[index]);
                }

                @Override
                public void removeUpdate(DocumentEvent e) {
                    enableSetRoi(startTextFields[index]);
                }
            });

            endTextFields[i] = new ErrorTextField("0");
            endTextFields[i].setErrorColor(getBackground());
            final int endTextFieldsIndex = i;
            endTextFields[i].addKeyListener(new KeyListener() {

                @Override
View Full Code Here

                }
            });
            roiVisibilityBoxes[i].setBackground(roiColor);

            final int index = i;
            startTextFields[i] = new ErrorTextField("0");
            startTextFields[i].setErrorColor(getBackground());
            final int startTextFieldsIndex = i;

            startTextFields[i].addKeyListener(new KeyListener() {

                @Override
                public void keyPressed(KeyEvent e) {
                    // nothing to do
                }

                @Override
                public void keyReleased(KeyEvent e) {
                    try {
                        Double.parseDouble(startTextFields[startTextFieldsIndex].getText());
                    }
                    catch (NumberFormatException e1) {
                        startTextFields[startTextFieldsIndex].setBackground(VALUE_ERROR_COLOR);
                    }
                }

                @Override
                public void keyTyped(KeyEvent e) {
                    // nothing to do
                }

            });

            startTextFields[i].getDocument().addDocumentListener(new DocumentListener() {
                @Override
                public void changedUpdate(DocumentEvent e) {
                    enableSetRoi(startTextFields[index]);
                }

                @Override
                public void insertUpdate(DocumentEvent e) {
                    enableSetRoi(startTextFields[index]);
                }

                @Override
                public void removeUpdate(DocumentEvent e) {
                    enableSetRoi(startTextFields[index]);
                }
            });

            endTextFields[i] = new ErrorTextField("0");
            endTextFields[i].setErrorColor(getBackground());
            final int endTextFieldsIndex = i;
            endTextFields[i].addKeyListener(new KeyListener() {

                @Override
View Full Code Here

TOP

Related Classes of fr.soleil.lib.project.swing.text.ErrorTextField

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.