Package javax.swing

Examples of javax.swing.JTextField$TextFieldActionPropertyChangeListener


            table.setColumnCount(5);
            TableColumn columnHidden = table.getColumnModel().getColumn(3);
            table.removeColumn(columnHidden);

            TableColumn columnField = table.getColumnModel().getColumn(0);
            JTextField textField = ComponentFactory.getTextFieldDisabled();
            columnField.setCellEditor(new DefaultCellEditor(textField));
            columnField.setHeaderValue(DcResources.getText("lblLabel"));

            TableColumn columnEnabled = table.getColumnModel().getColumn(1);
            JCheckBox checkEnabled = new JCheckBox();
View Full Code Here


                ,GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL,
                 new Insets(5, 5, 5, 5), 0, 0));

        tableDirectoriesAsDrives.setColumnCount(1);
        TableColumn columnDir = tableDirectoriesAsDrives.getColumnModel().getColumn(0);
        JTextField textField = ComponentFactory.getTextFieldDisabled();
        columnDir.setCellEditor(new DefaultCellEditor(textField));
        columnDir.setHeaderValue(DcResources.getText("lblDirectory"));
       
        JPanel panelActions = new JPanel();
       
View Full Code Here

        scrollerSysFields.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        scrollerSysFields.getViewport().setScrollMode(JViewport.SIMPLE_SCROLL_MODE);
       
        table.setColumnCount(3);
        TableColumn colField = table.getColumnModel().getColumn(0);
        JTextField textField = ComponentFactory.getTextFieldDisabled();
        colField.setCellEditor(new DefaultCellEditor(textField));
        colField.setHeaderValue(DcResources.getText("lblName"));

        TableColumn colCanRemove = table.getColumnModel().getColumn(1);
       
View Full Code Here

    }
   
    private void buildDialog() {
        getContentPane().setLayout(Layout.getGBL());
       
        JTextField txtFilter = ComponentFactory.getShortTextField(255);
        txtFilter.addKeyListener(this);

        tblAvailableItems = new DcTable(true, false);
        tblAvailableItems.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
        tblAvailableItems.addMouseListener(new ListMouseListener(ListMouseListener._RIGHT));
       
View Full Code Here

        panelExludeDirs.setLayout(Layout.getGBL());

        tableSkipDirs = ComponentFactory.getDCTable(true, false);
        tableSkipDirs.setColumnCount(1);
        TableColumn columnDir = tableSkipDirs.getColumnModel().getColumn(0);
        JTextField textField = ComponentFactory.getTextFieldDisabled();
        columnDir.setCellEditor(new DefaultCellEditor(textField));
        columnDir.setHeaderValue(DcResources.getText("lblDirectory"));
       
        JPanel panelActions = new JPanel();
        buttonAdd = ComponentFactory.getButton(DcResources.getText("lblAdd"));
View Full Code Here

        public JPanel getGUI() {
            // request focus
            requestFocus();

            JTextField tf;
            JPanel pal;
            final JPanel pop;
            pop = PaletteHelper.createVerticalPanel(null);

            // add arrowheads
            if (!(this instanceof Rect))
                makeArrowHeadGUI(pop);

            if (rt == OMGraphic.RENDERTYPE_LATLON) {
                pal = PaletteHelper.createVerticalPanel(null);
                JComboBox jcb = new JComboBox();
                jcb.addItem("Straight");// indices correspond to
                                        // LineType.java
                jcb.addItem("Rhumb");
                jcb.addItem("Great Circle");
                jcb.setSelectedIndex(type - 1);
                jcb.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        setType((JComboBox) e.getSource());
                    }
                });
                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());
                    }
                });
            }
            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);
                tf.addFocusListener(new FocusAdapter() {
                    public void focusLost(FocusEvent e) {
                        setLLCoordinate((JTextField) e.getSource(), 1);
                    }
                });
            }

            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);
                tf.addFocusListener(new FocusAdapter() {
                    public void focusLost(FocusEvent e) {
                        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);
                tf.addFocusListener(new FocusAdapter() {
                    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);
                tf.addFocusListener(new FocusAdapter() {
                    public void focusLost(FocusEvent e) {
                        setXYCoordinate((JTextField) e.getSource(), 3);
                    }
                });
            }
View Full Code Here

        public JPanel getGUI() {
            // request focus
            requestFocus();

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

            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);
                tf.addFocusListener(new FocusAdapter() {
                    public void focusLost(FocusEvent e) {
                        setLLCoordinate((JTextField) e.getSource(), 1);
                    }
                });
            } else {
                tf = PaletteHelper.createTextEntry("x", "" + xypts[0], pop);
                tf.addFocusListener(new FocusAdapter() {
                    public void focusLost(FocusEvent e) {
                        setXYCoordinate((JTextField) e.getSource(), 0);
                    }
                });
                tf = PaletteHelper.createTextEntry("y", "" + xypts[1], pop);
                tf.addFocusListener(new FocusAdapter() {
                    public void focusLost(FocusEvent e) {
                        setXYCoordinate((JTextField) e.getSource(), 1);
                    }
                });
            }

            if (rt == OMGraphic.RENDERTYPE_OFFSET) {
                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);
                tf.addFocusListener(new FocusAdapter() {
                    public void focusLost(FocusEvent e) {
                        setXYCoordinate((JTextField) e.getSource(), 1);
                    }
                });
            } else if (rt == OMGraphic.RENDERTYPE_LATLON) {
                tf = PaletteHelper.createTextEntry("R (km)", "" + radius, pop);
                tf.addFocusListener(new FocusAdapter() {
                    public void focusLost(FocusEvent e) {
                        JTextField jtf = (JTextField) e.getSource();
                        float f = radius;
                        try {
                            f = Float.valueOf(jtf.getText().trim())
                                    .floatValue();
                        } catch (NumberFormatException ex) {
                            return;
                        }
                        radius = f;
                        System.out.println("TestLayer: radius=" + radius);
                    }
                });
                tf = PaletteHelper.createTextEntry("nverts", "" + nsegs, pop);
                tf.addFocusListener(new FocusAdapter() {
                    public void focusLost(FocusEvent e) {
                        setSegs((JTextField) e.getSource());
                    }
                });
            }

            if (rt != OMGraphic.RENDERTYPE_LATLON) {
                tf = PaletteHelper.createTextEntry("width", "" + width, pop);
                tf.addFocusListener(new FocusAdapter() {
                    public void focusLost(FocusEvent e) {
                        JTextField jtf = (JTextField) e.getSource();
                        try {
                            width = Integer.parseInt(jtf.getText().trim());
                        } catch (NumberFormatException ex) {
                            return;
                        }
                    }
                });
                tf = PaletteHelper.createTextEntry("height", "" + height, pop);
                tf.addFocusListener(new FocusAdapter() {
                    public void focusLost(FocusEvent e) {
                        JTextField jtf = (JTextField) e.getSource();
                        try {
                            height = Integer.parseInt(jtf.getText().trim());
                        } catch (NumberFormatException ex) {
                            return;
                        }
                    }
                });
View Full Code Here

            // request focus
            requestFocus();

            final JPanel pop;
            JPanel pal;
            JTextField tf;
            JTextArea ta;
            pop = PaletteHelper.createVerticalPanel(null);

            if (rt == OMGraphic.RENDERTYPE_LATLON) {
                pal = PaletteHelper.createVerticalPanel(null);
                JComboBox jcb = new JComboBox();
                jcb.addItem("Straight");// indices correspond to
                                        // LineType.java
                jcb.addItem("Rhumb");
                jcb.addItem("Great Circle");
                jcb.setSelectedIndex(type - 1);
                jcb.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        setType((JComboBox) e.getSource());
                    }
                });
                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());
                    }
                });
                String entry = "";
                for (int i = 0; i < llpts.length; i += 2) {
                    entry = entry + llpts[i] + " " + llpts[i + 1] + "\n";
                }
                ta = PaletteHelper.createTextArea("llpts", entry, pop, 5, 8);
                ta.addFocusListener(new FocusAdapter() {
                    public void focusLost(FocusEvent e) {
                        setLL((JTextArea) e.getSource());
                    }
                });
            } else {
                if (rt == OMGraphic.RENDERTYPE_OFFSET) {
                    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);
                    tf.addFocusListener(new FocusAdapter() {
                        public void focusLost(FocusEvent e) {
                            setLLCoordinate((JTextField) e.getSource(), 1);
                        }
                    });
                }
View Full Code Here

            // request focus
            requestFocus();

            final JPanel pop;
            JPanel pal;
            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();
                }
            });

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

            pal = PaletteHelper.createVerticalPanel(null);
            jcb = new JComboBox();
            jcb.addItem("right");// indices correspond to values in
                                 // OMText
            jcb.addItem("center");
            jcb.addItem("left");
            jcb.setSelectedIndex(just);
            jcb.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    just = jcb.getSelectedIndex();
                    setList(generateGraphics());
                    repaint();
                }
            });
            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);
                tf.addFocusListener(new FocusAdapter() {
                    public void focusLost(FocusEvent e) {
                        setLLCoordinate((JTextField) e.getSource(), 1);
                    }
                });
            }

            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);
                tf.addFocusListener(new FocusAdapter() {
                    public void focusLost(FocusEvent e) {
                        setXYCoordinate((JTextField) e.getSource(), 1);
                    }
                });
            }
View Full Code Here

          nameList.setSelectionModel(disableSelections);
        }
        {
          JPanel bottomPanel = new JPanel(new GridBagLayout());
          panel.add(bottomPanel, BorderLayout.SOUTH);
          bottomPanel.add(sendText = new JTextField(), new GridBagConstraints(0, 0, 1, 1, 1, 0, GridBagConstraints.CENTER,
            GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
          bottomPanel.add(sendButton = new JButton("Send"), new GridBagConstraints(1, 0, 1, 1, 0, 0,
            GridBagConstraints.CENTER, 0, new Insets(0, 0, 0, 0), 0, 0));
        }
      }
View Full Code Here

TOP

Related Classes of javax.swing.JTextField$TextFieldActionPropertyChangeListener

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.