Package javax.swing

Examples of javax.swing.JTextField.addFocusListener()


            JTextField tf;
            final JComboBox jcb;
            pop = PaletteHelper.createVerticalPanel(null);

            tf = PaletteHelper.createTextEntry("text", data, pop);
            tf.addFocusListener(new FocusAdapter() {
                public void focusLost(FocusEvent e) {
                    data = ((JTextField) (e.getSource())).getText().trim();
                }
            });
View Full Code Here


                    data = ((JTextField) (e.getSource())).getText().trim();
                }
            });

            tf = PaletteHelper.createTextEntry("font", font, pop);
            tf.addFocusListener(new FocusAdapter() {
                public void focusLost(FocusEvent e) {
                    font = ((JTextField) (e.getSource())).getText().trim();
                }
            });
View Full Code Here

            pal.add(jcb);
            pop.add(pal);

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

                    public void focusLost(FocusEvent e) {
                        setLLCoordinate((JTextField) e.getSource(), 0);
                    }
                });
                tf = PaletteHelper.createTextEntry("lon", "" + 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("off_x", "" + xypts[0], pop);
                tf.addFocusListener(new FocusAdapter() {
                    public void focusLost(FocusEvent e) {
                        setXYCoordinate((JTextField) e.getSource(), 0);
                    }
                });
                tf = PaletteHelper.createTextEntry("off_y", "" + xypts[1], pop);
View Full Code Here

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

    private JTextField createTextF( JTextField prevTextField )
    {
        IPDocument doc = new IPDocument();
        JTextField field = new JTextField( doc, null, 3 );
        field.addFocusListener( textFieldFocusHandler );
        field.setBorder( null );
        field.setHorizontalAlignment( JTextField.CENTER );

        if ( prevTextField != null )
        {
View Full Code Here

            editorTextField.setOpaque(false);
        }
        leadPanel.add(editorTextField);
        editorTextField.putClientProperty("AuxEditorComponent", Boolean.TRUE);

        editorTextField.addFocusListener(new FocusListener() {
            @Override
            public void focusGained(final FocusEvent e) {
                editorTextField.repaint();
            }
View Full Code Here

                textFieldWithPopup.setPreferredSize(new Dimension(200, -1));
                JTextField valueTextField = textFieldWithPopup.getTextField();
                valueTextField.getDocument().addDocumentListener(documentListener);
                valueTextField.addKeyListener(keyAdapter);
                valueTextField.addFocusListener(focusListener);

                if (cell.getRow().getModel().isEditable()) {
                    if (genericDataType == GenericDataType.DATE_TIME) {
                        textFieldWithPopup.createCalendarPopup(false);
                    }
View Full Code Here

                for (int k = 0; k < 2; k++)
                {
                    final JTextField tf = new JTextField(20);
                    tf.setFont(getFont().deriveFont(20f));
                    tf.addMouseListener(new VisualTextFieldAdapter(tf, panel));
                    tf.addFocusListener(new FocusListener() {

                        @Override
                        public void focusGained(FocusEvent e)
                        {
                            tf.setBackground(Color.yellow);
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.