Changeset 5863 in josm for trunk/src/org


Ignore:
Timestamp:
2013-04-14T22:20:20+02:00 (11 years ago)
Author:
stoecker
Message:

javadoc fixes

Location:
trunk/src/org/openstreetmap/josm
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/history/DiffTableModel.java

    r5627 r5863  
    1010
    1111/**
    12  * Simple model storing "diff cells" in a list. Could probably have used a DefaultTableModel instead..
    13  *
    14  * {@link NodeListDiffTableCellRenderer}
     12 * Simple model storing "diff cells" in a list. Could probably have
     13 * used a {@link javax.swing.table.DefaultTableModel} instead.
    1514 */
    1615class DiffTableModel extends AbstractTableModel {
  • trunk/src/org/openstreetmap/josm/gui/history/HistoryLoadTask.java

    r5859 r5863  
    6161     * Creates a new task
    6262     *
    63      * @param parent the component to be used as reference to find the parent for {@link PleaseWaitDialog}.
    64      * Must not be null.
    65      * @throws IllegalArgumentException thrown if parent is null
     63     * @param parent the component to be used as reference to find the
     64     * parent for {@link org.openstreetmap.josm.gui.PleaseWaitDialog}.
     65     * Must not be <code>null</code>.
     66     * @throws IllegalArgumentException thrown if parent is <code>null</code>
    6667     */
    6768    public HistoryLoadTask(Component parent) {
     
    142143     * Adds a collection of objects to loaded, specified by a collection of OSM primitives.
    143144     *
    144      * @param primitive the OSM primitive. Must not be null. primitive.getId() > 0 required.
    145      * @return this task
    146      * @throws IllegalArgumentException thrown if primitives is null
    147      * @throws IllegalArgumentException thrown if one of the ids in the collection <= 0
     145     * @param primitives the OSM primitives. Must not be <code>null</code>.
     146     * <code>primitive.getId() > 0</code> required.
     147     * @return this task
     148     * @throws IllegalArgumentException thrown if primitives is <code>null</code>
     149     * @throws IllegalArgumentException thrown if one of the ids in the collection &lt;= 0
    148150     */
    149151    public HistoryLoadTask add(Collection<? extends OsmPrimitive> primitives) {
     
    160162    @Override
    161163    protected void cancel() {
    162         System.out.println("Cancel!");
    163         if (reader!=null) reader.cancel();
     164        if (reader != null) {
     165            reader.cancel();
     166        }
    164167        canceled = true;
    165168    }
  • trunk/src/org/openstreetmap/josm/io/OsmImporter.java

    r5859 r5863  
    5353
    5454    /**
    55      * Imports OSM data from file @param file
    56      * This method supports progress monitoring and canceling by using @param progressMonitor
     55     * Imports OSM data from file
     56     * @param file file to read data from
     57     * @param progressMonitor handler for progress monitoring and canceling
    5758     */
    5859    @Override
     
    7374
    7475    /**
    75      * Imports OSM data from stream @param in , sitle will be generated from name of file @param associatedFile
     76     * Imports OSM data from stream
     77     * @param in input stream
     78     * @param associatedFile filename of data
    7679     */
    7780    protected void importData(InputStream in, final File associatedFile) throws IllegalDataException {
     
    8083   
    8184    /**
    82      * Imports OSM data from stream @param in , layer name will be generated from name of file @param associatedFile
    83      * This method supports progress monitoring and canceling by using @param progressMonitor
     85     * Imports OSM data from stream
     86     * @param in input stream
     87     * @param associatedFile filename of data (layer name will be generated from name of file)
     88     * @param pm handler for progress monitoring and canceling
    8489     */
    8590    protected void importData(InputStream in, final File associatedFile, ProgressMonitor pm) throws IllegalDataException {
     
    100105    /**
    101106     * Load osm data layer from InputStream.
    102      * associatedFile can be null if the stream does not come from a file.
     107     * @param in input stream
     108     * @param associatedFile filename of data (can be <code>null</code> if the stream does not come from a file)
     109     * @param layerName name of generated layer
     110     * @param progressMonitor handler for progress monitoring and canceling
    103111     */
    104112    public OsmImporterData loadLayer(InputStream in, final File associatedFile, final String layerName, ProgressMonitor progressMonitor) throws IllegalDataException {
  • trunk/src/org/openstreetmap/josm/io/OsmServerReader.java

    r5587 r5863  
    3838     * Open a connection to the given url and return a reader on the input stream
    3939     * from that connection. In case of user cancel, return <code>null</code>.
    40      * @param urlStr The exact url to connect to.
    41      * @param pleaseWaitDlg
     40     * Relative URL's are directed to API base URL.
     41     * @param urlStr The url to connect to.
     42     * @param progressMonitor progress monitoring and abort handler
    4243     * @return An reader reading the input stream (servers answer) or <code>null</code>.
     44     * @throws OsmTransferException thrown if data transfer errors occur
    4345     */
    4446    protected InputStream getInputStream(String urlStr, ProgressMonitor progressMonitor) throws OsmTransferException  {
     
    5254    }
    5355
     56    /**
     57     * Retrun the base URL for relative URL requests
     58     * @return base url of API
     59     */
    5460    protected String getBaseUrl() {
    5561        return api.getBaseUrl();
    5662    }
    5763
     64    /**
     65     * Open a connection to the given url and return a reader on the input stream
     66     * from that connection. In case of user cancel, return <code>null</code>.
     67     * @param urlStr The exact url to connect to.
     68     * @param progressMonitor progress monitoring and abort handler
     69     * @return An reader reading the input stream (servers answer) or <code>null</code>.
     70     * @throws OsmTransferException thrown if data transfer errors occur
     71     */
    5872    protected InputStream getInputStreamRaw(String urlStr, ProgressMonitor progressMonitor) throws OsmTransferException {
    5973        try {
  • trunk/src/org/openstreetmap/josm/io/auth/AbstractCredentialsAgent.java

    r5692 r5863  
    1515
    1616    /**
    17      * @see CredentialsAgent#getCredentials(RequestorType, String, boolean)
     17     * @see CredentialsAgent#getCredentials
    1818     */
    1919    @Override
  • trunk/src/org/openstreetmap/josm/io/auth/JosmPreferencesCredentialAgent.java

    r5111 r5863  
    2525
    2626    /**
    27      * @see CredentialsAgent#lookup(RequestorType)
     27     * @see CredentialsAgent#lookup
    2828     */
    2929    @Override
     
    5959
    6060    /**
    61      * @see CredentialsAgent#store(RequestorType, PasswordAuthentication)
     61     * @see CredentialsAgent#store
    6262     */
    6363    @Override
  • trunk/src/org/openstreetmap/josm/tools/Diff.java

    r4534 r5863  
    626626        }
    627627
    628         /** Mark to be discarded each line that matches no line of another file.
    629        If a line matches many lines, mark it as provisionally discardable.
    630        @see equivCount()
    631        @param counts The count of each equivalence number for the other file.
    632        @return 0=nondiscardable, 1=discardable or 2=provisionally discardable
    633         for each line
     628        /**
     629         * Mark to be discarded each line that matches no line of another file.
     630         * If a line matches many lines, mark it as provisionally discardable.
     631         * @see #equivCount()
     632         * @param counts The count of each equivalence number for the other file.
     633         * @return 0=nondiscardable, 1=discardable or 2=provisionally discardable
     634         *  for each line
    634635         */
    635 
    636636        private byte[] discardable(final int[] counts) {
    637637            final int end = buffered_lines;
     
    642642
    643643            /* Multiply MANY by approximate square root of number of lines.
    644      That is the threshold for provisionally discardable lines.  */
     644               That is the threshold for provisionally discardable lines.  */
    645645            while ((tem = tem >> 2) > 0) {
    646646                many *= 2;
     
    663663        }
    664664
    665         /** Don't really discard the provisional lines except when they occur
    666        in a run of discardables, with nonprovisionals at the beginning
    667        and end.  */
    668 
     665        /**
     666         * Don't really discard the provisional lines except when they occur
     667         * in a run of discardables, with nonprovisionals at the beginning
     668         * and end.
     669         */
    669670        private void filterDiscards(final byte[] discards) {
    670671            final int end = buffered_lines;
  • trunk/src/org/openstreetmap/josm/tools/ImageProvider.java

    r5830 r5863  
    341341    /**
    342342     * {@code data:[<mediatype>][;base64],<data>}
    343      * @see RFC2397
     343     * @see <a href="http://tools.ietf.org/html/rfc2397">RFC2397</a>
    344344     */
    345345    private static final Pattern dataUrlPattern = Pattern.compile(
  • trunk/src/org/openstreetmap/josm/tools/OsmUrlToBounds.java

    r5460 r5863  
    8989
    9090    /**
    91      * p
     91     * Parse OSM short link
    9292     *
    9393     * @param url string for parsing
    94      *
    9594     * @return Bounds if shortlink, null otherwise
    96      *
    97      * @see http://trac.openstreetmap.org/browser/sites/rails_port/lib/short_link.rb
     95     * @see <a href="http://trac.openstreetmap.org/browser/sites/rails_port/lib/short_link.rb">short_link.rb</a>
    9896     */
    9997    private static Bounds parseShortLink(final String url) {
     
    146144    }
    147145
     146    /** radius of the earth */
    148147    public static final double R = 6378137.0;
    149148
     
    185184    }
    186185
     186    /**
     187     * Return OSM Zoom level for a given area
     188     *
     189     * @param b bounds of the area
     190     * @return matching zoom level for area
     191     */
    187192    static public int getZoom(Bounds b) {
    188193        // convert to mercator (for calculation of zoom only)
     
    201206    }
    202207
     208    /**
     209     * Return OSM URL for given area
     210     *
     211     * @param b bounds of the area
     212     * @return link to display that area in OSM map
     213     */
    203214    static public String getURL(Bounds b) {
    204215        return getURL(b.getCenter(), getZoom(b));
    205216    }
    206217
     218    /**
     219     * Return OSM URL for given position and zoom
     220     *
     221     * @param pos center position of area
     222     * @param zoom zoom depth of display
     223     * @return link to display that area in OSM map
     224     */
    207225    static public String getURL(LatLon pos, int zoom) {
    208226        // Truncate lat and lon to something more sensible
Note: See TracChangeset for help on using the changeset viewer.