Package org.openstreetmap.josm.gui.tagging.ac

Examples of org.openstreetmap.josm.gui.tagging.ac.AutoCompletionList


     */
    public void initAutoCompletion(OsmDataLayer layer) throws IllegalArgumentException{
        CheckParameterUtil.ensureParameterNotNull(layer, "layer");

        AutoCompletionManager autocomplete = layer.data.getAutoCompletionManager();
        AutoCompletionList acList = new AutoCompletionList();

        TagCellEditor editor = ((TagCellEditor) tagTable.getColumnModel().getColumn(0).getCellEditor());
        editor.setAutoCompletionManager(autocomplete);
        editor.setAutoCompletionList(acList);
        editor = ((TagCellEditor) tagTable.getColumnModel().getColumn(1).getCellEditor());
View Full Code Here


            @Override
            public void focusGained(FocusEvent e) {
                tfRole.selectAll();
            }
        });
        tfRole.setAutoCompletionList(new AutoCompletionList());
        tfRole.addFocusListener(
                new FocusAdapter() {
                    @Override
                    public void focusGained(FocusEvent e) {
                        AutoCompletionList list = tfRole.getAutoCompletionList();
                        if (list != null) {
                            list.clear();
                            getLayer().data.getAutoCompletionManager().populateWithMemberRoles(list);
                        }
                    }
                }
        );
View Full Code Here

        if (Main.main == null) return;
        OsmDataLayer layer = Main.main.getEditLayer();
        if (layer == null) {
            return;
        }
        AutoCompletionList list = new AutoCompletionList();
        layer.data.getAutoCompletionManager().populateWithTagValues(list, keys);
        field.setAutoCompletionList(list);
    }
View Full Code Here

     */
    public MemberRoleCellEditor(DataSet ds) {
        this.ds = ds;
        editor = new AutoCompletingTextField();
        editor.setBorder(BorderFactory.createEmptyBorder(1,1,1,1));
        autoCompletionList = new AutoCompletionList();
        editor.setAutoCompletionList(autoCompletionList);
    }
View Full Code Here

            AutoCompletingTextField tf = new AutoCompletingTextField();
            initAutoCompletionField(tf, key);
            if (length != null && !length.isEmpty()) {
                tf.setMaxChars(Integer.valueOf(length));
            }
            AutoCompletionList acList = tf.getAutoCompletionList();
            if (acList != null) {
                acList.add(getDisplayValues(), AutoCompletionItemPriority.IS_IN_STANDARD);
            }
            combo.setEditor(tf);

            if (usage.hasUniqueValue()) {
                // all items have the same value (and there were no unset items)
View Full Code Here

            return null;
        return new ChangePropertyCommand(primitives, Tag.removeWhiteSpaces(tfKey.getText()), Tag.removeWhiteSpaces(tfValue.getText()));
    }

    public void prepareForEditing() {
        AutoCompletionList acList = new AutoCompletionList();
        Main.main.getEditLayer().data.getAutoCompletionManager().populateWithMemberRoles(acList);
        tfRole.setAutoCompletionList(acList);
        AutoCompletingTextField editor = (AutoCompletingTextField) tblResolver.getColumnModel().getColumn(2).getCellEditor();
        if (editor != null) {
            editor.setAutoCompletionList(acList);
        }
        AutoCompletionList acList2 = new AutoCompletionList();
        Main.main.getEditLayer().data.getAutoCompletionManager().populateWithKeys(acList2);
        tfKey.setAutoCompletionList(acList2);
    }
View Full Code Here

TOP

Related Classes of org.openstreetmap.josm.gui.tagging.ac.AutoCompletionList

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.