Changeset 12301 in josm for trunk/src/org


Ignore:
Timestamp:
2017-06-02T17:23:36+02:00 (7 years ago)
Author:
michael2402
Message:

Add missing javadoc in the org.openstreetmap.josm.gui.dialogs package.

Location:
trunk/src/org/openstreetmap/josm/gui/dialogs
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/DeleteFromRelationConfirmationDialog.java

    r11377 r12301  
    183183    /**
    184184     * The table model which manages the list of relation-to-child references
    185      *
    186185     */
    187186    public static class RelationMemberTableModel extends DefaultTableModel {
     
    213212        }
    214213
     214        /**
     215         * Sets the data that should be displayed in the list.
     216         * @param references A list of references to display
     217         */
    215218        public void populate(Collection<RelationToChildReference> references) {
    216219            data.clear();
     
    222225        }
    223226
     227        /**
     228         * Gets the list of children that are currently displayed.
     229         * @return The children.
     230         */
    224231        public Set<OsmPrimitive> getObjectsToDelete() {
    225232            Set<OsmPrimitive> ret = new HashSet<>();
     
    230237        }
    231238
     239        /**
     240         * Gets the number of elements {@link #getObjectsToDelete()} would return.
     241         * @return That number.
     242         */
    232243        public int getNumObjectsToDelete() {
    233244            return getObjectsToDelete().size();
    234245        }
    235246
     247        /**
     248         * Gets the set of parent relations
     249         * @return All parent relations of the references
     250         */
    236251        public Set<OsmPrimitive> getParentRelations() {
    237252            Set<OsmPrimitive> ret = new HashSet<>();
     
    242257        }
    243258
     259        /**
     260         * Gets the number of elements {@link #getParentRelations()} would return.
     261         * @return That number.
     262         */
    244263        public int getNumParentRelations() {
    245264            return getParentRelations().size();
  • trunk/src/org/openstreetmap/josm/gui/dialogs/LatLonDialog.java

    r12285 r12301  
    3434import org.openstreetmap.josm.tools.WindowGeometry;
    3535
     36/**
     37 * A dialog that lets the user add a node at the coordinates he enters.
     38 */
    3639public class LatLonDialog extends ExtendedDialog {
    3740    private static final Color BG_COLOR_ERROR = new Color(255, 224, 224);
    3841
     42    /**
     43     * The tabs that define the coordinate mode.
     44     */
    3945    public JTabbedPane tabs;
    4046    private JosmTextField tfLatLon, tfEastNorth;
     
    155161    }
    156162
     163    /**
     164     * Creates a new {@link LatLonDialog}
     165     * @param parent The parent
     166     * @param title The title of this dialog
     167     * @param help The help text to use
     168     */
    157169    public LatLonDialog(Component parent, String title, String help) {
    158170        super(parent, title, tr("Ok"), tr("Cancel"));
     
    164176    }
    165177
     178    /**
     179     * Check if lat/lon mode is active
     180     * @return <code>true</code> iff the user selects lat/lon coordinates
     181     */
    166182    public boolean isLatLon() {
    167183        return tabs.getModel().getSelectedIndex() == 0;
    168184    }
    169185
     186    /**
     187     * Sets the coordinate fields to the given coordinates
     188     * @param ll The lat/lon coordinates
     189     */
    170190    public void setCoordinates(LatLon ll) {
    171191        LatLon llc = Optional.ofNullable(ll).orElse(LatLon.ZERO);
     
    180200    }
    181201
     202    /**
     203     * Gets the coordinates that are entered by the user.
     204     * @return The coordinates
     205     */
    182206    public LatLon getCoordinates() {
    183207        if (isLatLon()) {
     
    189213    }
    190214
     215    /**
     216     * Gets the coordinates that are entered in the lat/lon field
     217     * @return The lat/lon coordinates
     218     */
    191219    public LatLon getLatLonCoordinates() {
    192220        return latLonCoordinates;
    193221    }
    194222
     223    /**
     224     * Gets the coordinates that are entered in the east/north field
     225     * @return The east/north coordinates
     226     */
    195227    public EastNorth getEastNorthCoordinates() {
    196228        return eastNorthCoordinates;
     
    320352    }
    321353
     354    /**
     355     * Parses a east/north coordinate string
     356     * @param s The coordinates
     357     * @return The east/north coordinates or <code>null</code> on error.
     358     */
    322359    public static EastNorth parseEastNorth(String s) {
    323360        String[] en = s.split("[;, ]+");
     
    332369    }
    333370
     371    /**
     372     * Gets the text entered in the lat/lon text field.
     373     * @return The text the user entered
     374     */
    334375    public String getLatLonText() {
    335376        return tfLatLon.getText();
    336377    }
    337378
     379    /**
     380     * Set the text in the lat/lon text field.
     381     * @param text The new text
     382     */
    338383    public void setLatLonText(String text) {
    339384        tfLatLon.setText(text);
    340385    }
    341386
     387    /**
     388     * Gets the text entered in the east/north text field.
     389     * @return The text the user entered
     390     */
    342391    public String getEastNorthText() {
    343392        return tfEastNorth.getText();
    344393    }
    345394
     395    /**
     396     * Set the text in the east/north text field.
     397     * @param text The new text
     398     */
    346399    public void setEastNorthText(String text) {
    347400        tfEastNorth.setText(text);
  • trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListPopup.java

    r12279 r12301  
    3232public class LayerListPopup extends JPopupMenu {
    3333
     34    /**
     35     * An action that displays the layer information.
     36     * @see Layer#getInfoComponent()
     37     */
    3438    public static final class InfoAction extends AbstractAction {
    3539        private final transient Layer layer;
  • trunk/src/org/openstreetmap/josm/gui/dialogs/OsmIdSelectionDialog.java

    r11747 r12301  
    5252    protected final transient GroupLayout layout = new GroupLayout(panel);
    5353
     54    /**
     55     * Creates a new OsmIdSelectionDialog
     56     * @param parent       The parent element that will be used for position and maximum size
     57     * @param title        The text that will be shown in the window titlebar
     58     * @param buttonTexts  String Array of the text that will appear on the buttons. The first button is the default one.
     59     */
    5460    public OsmIdSelectionDialog(Component parent, String title, String... buttonTexts) {
    5561        super(parent, title, buttonTexts);
    5662    }
    5763
     64    /**
     65     * Creates a new OsmIdSelectionDialog
     66     * @param parent The parent element that will be used for position and maximum size
     67     * @param title The text that will be shown in the window titlebar
     68     * @param buttonTexts String Array of the text that will appear on the buttons. The first button is the default one.
     69     * @param modal Set it to {@code true} if you want the dialog to be modal
     70     */
    5871    public OsmIdSelectionDialog(Component parent, String title, String[] buttonTexts, boolean modal) {
    5972        super(parent, title, buttonTexts, modal);
    6073    }
    6174
     75    /**
     76     * Creates a new OsmIdSelectionDialog
     77     * @param parent The parent element that will be used for position and maximum size
     78     * @param title The text that will be shown in the window titlebar
     79     * @param buttonTexts String Array of the text that will appear on the buttons. The first button is the default one.
     80     * @param modal Set it to {@code true} if you want the dialog to be modal
     81     * @param disposeOnClose whether to call {@link #dispose} when closing the dialog
     82     */
    6283    public OsmIdSelectionDialog(Component parent, String title, String[] buttonTexts, boolean modal, boolean disposeOnClose) {
    6384        super(parent, title, buttonTexts, modal, disposeOnClose);
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java

    r12282 r12301  
    529529    }
    530530
     531    /**
     532     * A visitor that is used to compute the bounds of an error.
     533     */
    531534    public static class ValidatorBoundingXYVisitor extends BoundingXYVisitor implements ValidatorVisitor {
    532535        @Override
     
    560563    }
    561564
     565    /**
     566     * Called when the selection was changed to update the list of displayed errors
     567     * @param newSelection The new selection
     568     */
    562569    public void updateSelection(Collection<? extends OsmPrimitive> newSelection) {
    563570        if (!Main.pref.getBoolean(ValidatorPreference.PREF_FILTER_BY_SELECTION, false))
Note: See TracChangeset for help on using the changeset viewer.