Changeset 6733 in josm for trunk/src


Ignore:
Timestamp:
2014-01-19T15:33:15+01:00 (10 years ago)
Author:
Don-vip
Message:

update javadoc

Location:
trunk/src/org/openstreetmap/josm
Files:
3 added
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java

    r6717 r6733  
    2828import org.openstreetmap.josm.tools.Utils;
    2929import org.openstreetmap.josm.tools.template_engine.TemplateEngineDataProvider;
    30 
    3130
    3231/**
     
    974973        }
    975974    }
     975
    976976    /**
    977977     * Find primitives that reference this primitive. Returns only primitives that are included in the same
     
    988988     * @return a collection of all primitives that reference this primitive.
    989989     */
    990 
    991990    public final List<OsmPrimitive> getReferrers(boolean allowWithoutDataset) {
    992         // Method copied from OsmPrimitive in josm-ng
    993991        // Returns only referrers that are members of the same dataset (primitive can have some fake references, for example
    994992        // when way is cloned
  • trunk/src/org/openstreetmap/josm/gui/preferences/audio/AudioPreference.java

    r6529 r6733  
    1919import org.openstreetmap.josm.tools.GBC;
    2020
    21 /*
    22  * marker.audiosampleminsecs
    23  * marker.audiosampleminmetres
    24  * marker.buttonlabels
    25  * markers.namedtrackpoints
    26  * audio.forwardbackamount
    27  * audio.leadin
    28  * audio.menuinvisible
    29  * marker.audiotraceVisible
    30  * audio.toolbar ??
     21/**
     22 * Audio preferences.
    3123 */
    32 
    3324public final class AudioPreference extends DefaultTabPreferenceSetting {
    3425
  • trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddTMSLayerPanel.java

    r6084 r6733  
    44import static org.openstreetmap.josm.tools.I18n.tr;
    55
    6 import java.awt.Dimension;
    76import java.awt.event.KeyAdapter;
    87import java.awt.event.KeyEvent;
     
    109
    1110import javax.swing.JLabel;
    12 import javax.swing.text.View;
    1311
    1412import org.openstreetmap.josm.data.imagery.ImageryInfo;
     
    1816import org.openstreetmap.josm.tools.Utils;
    1917
     18/**
     19 * An imagery panel used to add TMS imagery sources
     20 */
    2021public class AddTMSLayerPanel extends AddImageryPanel {
    2122
     
    8081    }
    8182
    82     public static Dimension getPreferredSize(JLabel label, boolean width, int prefSize) {
    83 
    84         View view = (View) label.getClientProperty(javax.swing.plaf.basic.BasicHTML.propertyKey);
    85         view.setSize(width ? prefSize : 0, width ? 0 : prefSize);
    86 
    87         return new java.awt.Dimension(
    88                 (int) Math.ceil(view.getPreferredSpan(View.X_AXIS)),
    89                 (int) Math.ceil(view.getPreferredSpan(View.Y_AXIS)));
    90     }
    91 
    9283    protected final String getTmsUrl() {
    9384        return sanitize(tmsUrl.getText());
  • trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddWMSLayerPanel.java

    r6248 r6733  
    3030import org.openstreetmap.josm.tools.Utils;
    3131
     32/**
     33 * An imagery panel used to add WMS imagery sources
     34 */
    3235public class AddWMSLayerPanel extends AddImageryPanel {
    3336
  • trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreference.java

    r6690 r6733  
    6767import org.openstreetmap.josm.tools.LanguageInfo;
    6868
     69/**
     70 * Imagery preferences, including imagery providers, settings and offsets.
     71 */
    6972public final class ImageryPreference extends DefaultTabPreferenceSetting {
    7073
     
    129132    }
    130133
     134    /**
     135     * Returns the imagery providers panel.
     136     * @return The imagery providers panel.
     137     */
    131138    public ImageryProvidersPanel getProvidersPanel() {
    132139        return imageryProviders;
     
    189196    }
    190197
     198    /**
     199     * A panel displaying imagery providers.
     200     */
    191201    public static class ImageryProvidersPanel extends JPanel {
    192202        // Public JTables and JMapViewer
     203        /** The table of active providers **/
    193204        public final JTable activeTable;
     205        /** The table of default providers **/
    194206        public final JTable defaultTable;
     207        /** The map displaying imagery bounds of selected default providers **/
    195208        public final JMapViewer defaultMap;
    196209
    197210        // Public models
     211        /** The model of active providers **/
    198212        public final ImageryLayerTableModel activeModel;
     213        /** The model of default providers **/
    199214        public final ImageryDefaultLayerTableModel defaultModel;
    200215
    201216        // Public JToolbars
     217        /** The toolbar on the right of active providers **/
    202218        public final JToolBar activeToolbar;
     219        /** The toolbar on the middle of the panel **/
    203220        public final JToolBar middleToolbar;
     221        /** The toolbar on the right of default providers **/
    204222        public final JToolBar defaultToolbar;
    205223
     
    240258        }
    241259
     260        /**
     261         * Constructs a new {@code ImageryProvidersPanel}.
     262         * @param gui The parent preference tab pane
     263         * @param layerInfoArg The list of imagery entries to display
     264         */
    242265        public ImageryProvidersPanel(final PreferenceTabbedPane gui, ImageryLayerInfo layerInfoArg) {
    243266            super(new GridBagLayout());
  • trunk/src/org/openstreetmap/josm/gui/preferences/imagery/WMSLayerTree.java

    r5889 r6733  
    2020import org.openstreetmap.josm.io.imagery.WMSImagery;
    2121
     22/**
     23 * The layer tree of a WMS server.
     24 */
    2225public class WMSLayerTree {
    2326    private final MutableTreeNode treeRootNode = new DefaultMutableTreeNode();
     
    2730    private boolean previouslyShownUnsupportedCrsError = false;
    2831
     32    /**
     33     * Returns the root node.
     34     * @return The root node
     35     */
    2936    public MutableTreeNode getTreeRootNode() {
    3037        return treeRootNode;
    3138    }
    3239
     40    /**
     41     * Returns the {@code JTree}.
     42     * @return The {@code JTree}
     43     */
    3344    public JTree getLayerTree() {
    3445        return layerTree;
    3546    }
    3647
     48    /**
     49     * Returns the list of selected layers.
     50     * @return the list of selected layers
     51     */
    3752    public List<WMSImagery.LayerDetails> getSelectedLayers() {
    3853        return selectedLayers;
     
    5570    }
    5671
     72    /**
     73     * Updates the whole tree with the given WMS imagery info.
     74     * @param wms The imagery info for a given WMS server
     75     */
    5776    public void updateTree(WMSImagery wms) {
    5877        treeRootNode.setUserObject(wms.getServiceUrl().getHost());
     
    6079    }
    6180
     81    /**
     82     * Updates the list of WMS layers.
     83     * @param layers The list of layers to add to the root node
     84     */
    6285    public void updateTreeList(List<WMSImagery.LayerDetails> layers) {
    6386        addLayersToTreeData(getTreeRootNode(), layers);
  • trunk/src/org/openstreetmap/josm/gui/preferences/map/BackupPreference.java

    r6666 r6733  
    2828import org.openstreetmap.josm.tools.GBC;
    2929
     30/**
     31 * Preference settings for data layer autosave.
     32 */
    3033public class BackupPreference implements SubPreferenceSetting {
    3134
  • trunk/src/org/openstreetmap/josm/gui/preferences/map/MapPaintPreference.java

    r6670 r6733  
    1717import javax.swing.JCheckBox;
    1818import javax.swing.JPanel;
    19 import javax.swing.event.ChangeEvent;
    20 import javax.swing.event.ChangeListener;
    2119
    2220import org.openstreetmap.josm.Main;
     
    2624import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane;
    2725import org.openstreetmap.josm.gui.preferences.SourceEditor;
    28 import org.openstreetmap.josm.gui.preferences.SourceType;
    2926import org.openstreetmap.josm.gui.preferences.SourceEditor.ExtendedSourceEntry;
    3027import org.openstreetmap.josm.gui.preferences.SourceEntry;
    3128import org.openstreetmap.josm.gui.preferences.SourceProvider;
     29import org.openstreetmap.josm.gui.preferences.SourceType;
    3230import org.openstreetmap.josm.gui.preferences.SubPreferenceSetting;
    3331import org.openstreetmap.josm.gui.preferences.TabPreferenceSetting;
     
    3634import org.openstreetmap.josm.tools.Utils;
    3735
     36/**
     37 * Preference settings for map paint styles.
     38 */
    3839public class MapPaintPreference implements SubPreferenceSetting {
    3940    private SourceEditor sources;
  • trunk/src/org/openstreetmap/josm/gui/preferences/map/MapPreference.java

    r6529 r6733  
    1212import org.openstreetmap.josm.tools.GBC;
    1313
     14/**
     15 * Map preferences, including map paint styles, tagging presets and autosave sub-preferences.
     16 */
    1417public final class MapPreference extends DefaultTabPreferenceSetting {
    1518
  • trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java

    r6670 r6733  
    2222import javax.swing.JPanel;
    2323import javax.swing.JSeparator;
    24 import javax.swing.event.ChangeEvent;
    25 import javax.swing.event.ChangeListener;
    2624
    2725import org.openstreetmap.josm.Main;
     
    4745import org.xml.sax.SAXParseException;
    4846
     47/**
     48 * Preference settings for tagging presets.
     49 */
    4950public final class TaggingPresetPreference implements SubPreferenceSetting {
    5051
     
    6465
    6566    private static final List<SourceProvider> presetSourceProviders = new ArrayList<SourceProvider>();
     67   
     68    /**
     69     * The collection of tagging presets.
     70     */
    6671    public static Collection<TaggingPreset> taggingPresets;
    6772    private SourceEditor sources;
  • trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginListPanel.java

    r6524 r6733  
    3232import org.openstreetmap.josm.tools.Utils;
    3333
    34 public class PluginListPanel extends VerticallyScrollablePanel{
     34/**
     35 * A panel displaying the list of known plugins.
     36 */
     37public class PluginListPanel extends VerticallyScrollablePanel {
    3538    private PluginPreferencesModel model;
    3639
     40    /**
     41     * Constructs a new {@code PluginListPanel} with a default model.
     42     */
    3743    public PluginListPanel() {
    3844        this(new PluginPreferencesModel());
    3945    }
    4046
     47    /**
     48     * Constructs a new {@code PluginListPanel} with a given model.
     49     * @param model The plugin model
     50     */
    4151    public PluginListPanel(PluginPreferencesModel model) {
    4252        this.model = model;
     
    7282    }
    7383
     84    /**
     85     * Displays a message when the plugin list is empty.
     86     */
    7487    public void displayEmptyPluginListInformation() {
    7588        GridBagConstraints gbc = new GridBagConstraints();
     
    181194    }
    182195
     196    /**
     197     * Refreshes the list.
     198     */
    183199    public void refreshView() {
    184200        final Rectangle visibleRect = getVisibleRect();
  • trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferencesModel.java

    r6643 r6733  
    2121import org.openstreetmap.josm.plugins.PluginInformation;
    2222
    23 public class PluginPreferencesModel extends Observable{
     23/**
     24 * The plugin model behind a {@code PluginListPanel}.
     25 */
     26public class PluginPreferencesModel extends Observable {
    2427    private final List<PluginInformation> availablePlugins = new ArrayList<PluginInformation>();
    2528    private final List<PluginInformation> displayedPlugins = new ArrayList<PluginInformation>();
     
    3740    }
    3841
     42    /**
     43     * Filters the list of displayed plugins.
     44     * @param filter The filter used against plugin name, description or version
     45     */
    3946    public void filterDisplayedPlugins(String filter) {
    4047        if (filter == null) {
     
    5562    }
    5663
     64    /**
     65     * Sets the list of available plugins.
     66     * @param available The available plugins
     67     */
    5768    public void setAvailablePlugins(Collection<PluginInformation> available) {
    5869        availablePlugins.clear();
  • trunk/src/org/openstreetmap/josm/gui/preferences/projection/AbstractProjectionChoice.java

    r6070 r6733  
    1313
    1414    /**
    15      * Constructor.
     15     * Constructs a new {@code AbstractProjectionChoice}.
    1616     *
    1717     * @param name short name of the projection choice as shown in the GUI
     
    2626
    2727    /**
    28      * Constructor (without cacheDir argument).
     28     * Constructs a new {@code AbstractProjectionChoice}.
    2929     *
    3030     * Only for core projection choices, where chacheDir is the same as
    3131     * the second part of the id.
     32     * @param name short name of the projection choice as shown in the GUI
     33     * @param id unique identifier for the projection choice
    3234     */
    3335    public AbstractProjectionChoice(String name, String id) {
     
    6365        return new CustomProjection(getProjectionName(), code, pref, getCacheDir());
    6466    }
    65 
    6667}
  • trunk/src/org/openstreetmap/josm/gui/preferences/projection/ProjectionChoice.java

    r6070 r6733  
    3838    /**
    3939     * Get the projection that matches the internal state.
     40     * @return the effective projection
    4041     */
    4142    Projection getProjection();
     
    6263    /**
    6364     * Return all projection codes supported by this projection choice.
     65     * @return all supported projection codes
    6466     */
    6567    String[] allCodes();
     
    6769    /**
    6870     * Get Preferences from projection code.
     71     * @param code projection code
    6972     *
    7073     * @return null when code is not part of this projection choice.
     
    8083     */
    8184    String toString();
    82 
    8385}
  • trunk/src/org/openstreetmap/josm/gui/preferences/projection/SingleProjectionChoice.java

    r5548 r6733  
    1818
    1919    /**
    20      * Constructor.
     20     * Constructs a new {@code SingleProjectionChoice}.
    2121     *
    2222     * @param name short name of the projection choice as shown in the GUI
     
    3030    }
    3131
     32    /**
     33     * Constructs a new {@code SingleProjectionChoice}.
     34     *
     35     * @param name short name of the projection choice as shown in the GUI
     36     * @param id unique identifier for the projection choice, e.g. "core:thisproj"
     37     * @param code the unique identifier for the projection, e.g. "EPSG:1234"
     38     */
    3239    public SingleProjectionChoice(String name, String id, String code) {
    3340        super(name, id);
     
    5562
    5663    @Override
    57     public String toString() {
    58         return name;
    59     }
    60 
    61     @Override
    6264    public Collection<String> getPreferencesFromCode(String code) {
    6365        if (code.equals(this.code))
Note: See TracChangeset for help on using the changeset viewer.