Changeset 12384 in josm


Ignore:
Timestamp:
2017-06-10T00:55:46+02:00 (5 months ago)
Author:
michael2402
Message:

Doument the gui.tagging package

Location:
trunk/src/org/openstreetmap/josm/gui/tagging
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/tagging/TagCellEditor.java

    r9059 r12384  
    142142    }
    143143
     144    /**
     145     * Sets the manager that helps with auto completion
     146     * @param autocomplete The {@link AutoCompletionManager}
     147     */
    144148    public void setAutoCompletionManager(AutoCompletionManager autocomplete) {
    145149        this.autocomplete = autocomplete;
    146150    }
    147151
     152    /**
     153     * Selects an item from the auto completion list and fills this cell with the value
     154     * @param item The text that was selected
     155     */
    148156    public void autoCompletionItemSelected(String item) {
    149157        editor.setText(item);
     
    152160    }
    153161
     162    /**
     163     * Gets the editor for this cell
     164     * @return The editor text field
     165     */
    154166    public AutoCompletingTextField getEditor() {
    155167        return editor;
  • trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorModel.java

    r11747 r12384  
    3535 */
    3636public class TagEditorModel extends AbstractTableModel {
     37    /**
     38     * The dirty property. It is set whenever this table was changed
     39     */
    3740    public static final String PROP_DIRTY = TagEditorModel.class.getName() + ".dirty";
    3841
     
    257260    }
    258261
     262    /**
     263     * Gets a tag row
     264     * @param idx The index of the row
     265     * @return The tag model for that row
     266     */
    259267    public TagModel get(int idx) {
    260268        return idx >= tags.size() ? null : tags.get(idx);
  • trunk/src/org/openstreetmap/josm/gui/tagging/TagTable.java

    r10604 r12384  
    415415    }
    416416
     417    /**
     418     * Sets the autocompletion manager that should be used for editing the cells
     419     * @param autocomplete The {@link AutoCompletionManager}
     420     */
    417421    public void setAutoCompletionManager(AutoCompletionManager autocomplete) {
    418422        if (autocomplete == null) {
     
    426430    }
    427431
     432    /**
     433     * Gets the {@link AutoCompletionList} the cell editor is synchronized with
     434     * @return The list
     435     */
    428436    public AutoCompletionList getAutoCompletionList() {
    429437        if (editor != null)
     
    441449    }
    442450
     451    /**
     452     * Gets the editor that is used for the table cells
     453     * @return The editor that is used when the user wants to enter text into a cell
     454     */
    443455    public TagCellEditor getTableCellEditor() {
    444456        return editor;
     
    457469    }
    458470
     471    /**
     472     * Request the focus in a specific cell
     473     * @param row The row index
     474     * @param col The column index
     475     */
    459476    public void requestFocusInCell(final int row, final int col) {
    460477        changeSelection(row, col, false, false);
     
    472489    }
    473490
     491    /**
     492     * Marks a component that may be focused without stopping the cell editing
     493     * @param component The component
     494     */
    474495    public void addComponentNotStoppingCellEditing(Component component) {
    475496        if (component == null) return;
     
    477498    }
    478499
     500    /**
     501     * Removes a component added with {@link #addComponentNotStoppingCellEditing(Component)}
     502     * @param component The component
     503     */
    479504    public void removeComponentNotStoppingCellEditing(Component component) {
    480505        if (component == null) return;
Note: See TracChangeset for help on using the changeset viewer.