Package javax.swing

Examples of javax.swing.JTextField.addFocusListener()


            }
        });
        // Users forget to hit Enter, which is required for an action event,
        // then wonder why the rings they draw don't have the desired value.
        // Adding a focus listener addresses this issue.
        field.addFocusListener(new FocusAdapter() {
            public void focusLost(FocusEvent event) {
                if (!event.isTemporary()) {
                    updateInterval(((JTextField) (event.getSource())).getText());
                }
            }
View Full Code Here


                    }
                });
                pal.add(jcb);
                pop.add(pal);
                tf = PaletteHelper.createTextEntry("nsegs", "" + nsegs, pop);
                tf.addFocusListener(new FocusAdapter() {
                    public void focusLost(FocusEvent e) {
                        setSegs((JTextField) e.getSource());
                    }
                });
            }
View Full Code Here

                    }
                });
            }
            if (rt != OMGraphic.RENDERTYPE_XY) {
                tf = PaletteHelper.createTextEntry("lat1", "" + llpts[0], pop);
                tf.addFocusListener(new FocusAdapter() {
                    public void focusLost(FocusEvent e) {
                        setLLCoordinate((JTextField) e.getSource(), 0);
                    }
                });
                tf = PaletteHelper.createTextEntry("lon1", "" + llpts[1], pop);
View Full Code Here

                    public void focusLost(FocusEvent e) {
                        setLLCoordinate((JTextField) e.getSource(), 0);
                    }
                });
                tf = PaletteHelper.createTextEntry("lon1", "" + llpts[1], pop);
                tf.addFocusListener(new FocusAdapter() {
                    public void focusLost(FocusEvent e) {
                        setLLCoordinate((JTextField) e.getSource(), 1);
                    }
                });
            }
View Full Code Here

                });
            }

            if (rt == OMGraphic.RENDERTYPE_LATLON) {
                tf = PaletteHelper.createTextEntry("lat2", "" + llpts[2], pop);
                tf.addFocusListener(new FocusAdapter() {
                    public void focusLost(FocusEvent e) {
                        setLLCoordinate((JTextField) e.getSource(), 2);
                    }
                });
                tf = PaletteHelper.createTextEntry("lon2", "" + llpts[3], pop);
View Full Code Here

                    public void focusLost(FocusEvent e) {
                        setLLCoordinate((JTextField) e.getSource(), 2);
                    }
                });
                tf = PaletteHelper.createTextEntry("lon2", "" + llpts[3], pop);
                tf.addFocusListener(new FocusAdapter() {
                    public void focusLost(FocusEvent e) {
                        setLLCoordinate((JTextField) e.getSource(), 3);
                    }
                });
            } else {
View Full Code Here

                        setLLCoordinate((JTextField) e.getSource(), 3);
                    }
                });
            } else {
                tf = PaletteHelper.createTextEntry("x1", "" + xypts[0], pop);
                tf.addFocusListener(new FocusAdapter() {
                    public void focusLost(FocusEvent e) {
                        setXYCoordinate((JTextField) e.getSource(), 0);
                    }
                });
                tf = PaletteHelper.createTextEntry("y1", "" + xypts[1], pop);
View Full Code Here

                    public void focusLost(FocusEvent e) {
                        setXYCoordinate((JTextField) e.getSource(), 0);
                    }
                });
                tf = PaletteHelper.createTextEntry("y1", "" + xypts[1], pop);
                tf.addFocusListener(new FocusAdapter() {
                    public void focusLost(FocusEvent e) {
                        setXYCoordinate((JTextField) e.getSource(), 1);
                    }
                });
                tf = PaletteHelper.createTextEntry("x2", "" + xypts[2], pop);
View Full Code Here

                    public void focusLost(FocusEvent e) {
                        setXYCoordinate((JTextField) e.getSource(), 1);
                    }
                });
                tf = PaletteHelper.createTextEntry("x2", "" + xypts[2], pop);
                tf.addFocusListener(new FocusAdapter() {
                    public void focusLost(FocusEvent e) {
                        setXYCoordinate((JTextField) e.getSource(), 2);
                    }
                });
                tf = PaletteHelper.createTextEntry("y2", "" + xypts[3], pop);
View Full Code Here

                    public void focusLost(FocusEvent e) {
                        setXYCoordinate((JTextField) e.getSource(), 2);
                    }
                });
                tf = PaletteHelper.createTextEntry("y2", "" + xypts[3], pop);
                tf.addFocusListener(new FocusAdapter() {
                    public void focusLost(FocusEvent e) {
                        setXYCoordinate((JTextField) e.getSource(), 3);
                    }
                });
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.