Examples of JosmTextField


Examples of org.openstreetmap.josm.gui.widgets.JosmTextField

    protected final JPanel build(String orig) {
        JPanel p = new JPanel(new GridBagLayout());
        p.add(new JLabel(tr("Key: {0}", entry.getKey())), GBC.eol().insets(0,0,5,0));

        p.add(new JLabel(tr("Value: ")), GBC.std());
        tvalue = new JosmTextField(orig, 50);
        p.add(tvalue, GBC.eop().insets(5,0,0,0).fill(GBC.HORIZONTAL));

        return p;
    }
View Full Code Here

Examples of org.openstreetmap.josm.gui.widgets.JosmTextField

        ListSettingTableModel listModel = new ListSettingTableModel();
        JTable table = new JTable(listModel);
        table.putClientProperty("terminateEditOnFocusLost", true);
        table.setTableHeader(null);

        DefaultCellEditor editor = new DefaultCellEditor(new JosmTextField());
        editor.setClickCountToStart(1);
        table.setDefaultEditor(table.getColumnClass(0), editor);

        JScrollPane pane = new JScrollPane(table);
        p.add(pane, GBC.eol().insets(5,10,0,0).fill());
View Full Code Here

Examples of org.openstreetmap.josm.gui.widgets.JosmTextField

        layerList.getColumnModel().getColumn(1).setCellEditor(new LayerVisibleCellEditor(new LayerVisibleCheckBox()));
        layerList.getColumnModel().getColumn(1).setMaxWidth(16);
        layerList.getColumnModel().getColumn(1).setPreferredWidth(16);
        layerList.getColumnModel().getColumn(1).setResizable(false);
        layerList.getColumnModel().getColumn(2).setCellRenderer(new LayerNameCellRenderer());
        layerList.getColumnModel().getColumn(2).setCellEditor(new LayerNameCellEditor(new JosmTextField()));
        for (KeyStroke ks : new KeyStroke[] {
                KeyStroke.getKeyStroke(KeyEvent.VK_C, InputEvent.CTRL_MASK),
                KeyStroke.getKeyStroke(KeyEvent.VK_V, InputEvent.CTRL_MASK),
                KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, InputEvent.SHIFT_MASK),
                KeyStroke.getKeyStroke(KeyEvent.VK_UP, InputEvent.SHIFT_MASK),
View Full Code Here

Examples of org.openstreetmap.josm.gui.widgets.JosmTextField

        group.add(include);

        JPanel cardLink = new JPanel(new GridBagLayout());
        final File file = layer.getAssociatedFile();
        if (file != null) {
            JosmTextField tf = new JosmTextField();
            tf.setText(file.getPath());
            tf.setEditable(false);
            cardLink.add(tf, GBC.std());
        } else {
            cardLink.add(new JLabel(tr("No file association")), GBC.eol());
        }
View Full Code Here

Examples of org.openstreetmap.josm.gui.widgets.JosmTextField

            }
        }
    }

    private JosmTextField  setupFilter() {
        final JosmTextField f = new DisableShortcutsOnFocusGainedTextField();
        f.setToolTipText(tr("Relation list filter"));
        f.getDocument().addDocumentListener(new DocumentListener() {

            private void setFilter() {
                try {
                    f.setBackground(UIManager.getColor("TextField.background"));
                    f.setToolTipText(tr("Relation list filter"));
                    model.setFilter(SearchCompiler.compile(filter.getText(), false, false));
                } catch (SearchCompiler.ParseError ex) {
                    f.setBackground(new Color(255, 224, 224));
                    f.setToolTipText(ex.getMessage());
                    model.setFilter(new SearchCompiler.Always());
                }
            }

            @Override
View Full Code Here

Examples of org.openstreetmap.josm.gui.widgets.JosmTextField

    static class TextFieldFocusHandler implements FocusListener {
        @Override
        public void focusGained(FocusEvent e) {
            Component c = e.getComponent();
            if (c instanceof JosmTextField) {
                JosmTextField tf = (JosmTextField)c;
                tf.selectAll();
            }
        }
View Full Code Here

Examples of org.openstreetmap.josm.gui.widgets.JosmTextField

            super(tf);
        }

        @Override
        public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
            JosmTextField tf = (JosmTextField) super.getTableCellEditorComponent(table, value, isSelected, row, column);
            tf.setText(value == null ? "" : ((Layer) value).getName());
            return tf;
        }
View Full Code Here

Examples of org.openstreetmap.josm.gui.widgets.JosmTextField

    protected JPanel buildLatLon() {
        JPanel pnl = new JPanel(new GridBagLayout());
        pnl.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));

        pnl.add(new JLabel(tr("Coordinates:")), GBC.std().insets(0,10,5,0));
        tfLatLon = new JosmTextField(24);
        pnl.add(tfLatLon, GBC.eol().insets(0,10,0,0).fill(GBC.HORIZONTAL).weight(1.0, 0.0));

        pnl.add(new JSeparator(), GBC.eol().fill(GBC.HORIZONTAL).insets(0,5,0,5));

        pnl.add(new HtmlPanel(
View Full Code Here

Examples of org.openstreetmap.josm.gui.widgets.JosmTextField

    private JPanel buildEastNorth() {
        JPanel pnl = new JPanel(new GridBagLayout());
        pnl.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));

        pnl.add(new JLabel(tr("Projected coordinates:")), GBC.std().insets(0,10,5,0));
        tfEastNorth = new JosmTextField(24);

        pnl.add(tfEastNorth, GBC.eol().insets(0,10,0,0).fill(GBC.HORIZONTAL).weight(1.0, 0.0));

        pnl.add(new JSeparator(), GBC.eol().fill(GBC.HORIZONTAL).insets(0,5,0,5));
View Full Code Here

Examples of org.openstreetmap.josm.gui.widgets.JosmTextField

            gc.gridwidth = 1;
            pnl.add(new JLabel(tr("Authorize URL:")), gc);

            gc.gridx = 1;
            gc.weightx = 1.0;
            pnl.add(tfAuthoriseUrl = new JosmTextField(), gc);
            tfAuthoriseUrl.setEditable(false);

            return pnl;
        }
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.