Changeset 8958 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2015-10-27T19:15:14+01:00 (9 years ago)
Author:
Don-vip
Message:

update javadoc + checkstyle fix + update presets links

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java

    r8955 r8958  
    301301     * @since 8954
    302302     */
    303     public static abstract class Strategy {
     303    public abstract static class Strategy {
    304304
    305305        /**
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapRendererFactory.java

    r8840 r8958  
    258258    /**
    259259     * <p>Creates an instance of the currently active renderer.</p>
     260     * @return an instance of the currently active renderer
    260261     *
    261262     * @throws MapRendererFactoryException if creating an instance fails
  • trunk/src/org/openstreetmap/josm/data/validation/TestError.java

    r8846 r8958  
    215215
    216216    /**
    217      * Sets the ignore state for this error
     217     * Returns the ignore state for this error.
     218     * @return the ignore state for this error
    218219     */
    219220    public String getIgnoreState() {
  • trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java

    r8936 r8958  
    149149        /**
    150150         * Creates the fixing {@link Command} for the given primitive. The {@code matchingSelector} is used to evaluate placeholders
    151          * (cf. {@link org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.TagCheck#insertArguments(Selector, String, OsmPrimitive)}).
     151         * (cf. {@link MapCSSTagChecker.TagCheck#insertArguments(Selector, String, OsmPrimitive)}).
     152         * @param p OSM primitive
     153         * @param matchingSelector  matching selector
     154         * @return fix command
    152155         */
    153156        abstract Command createCommand(final OsmPrimitive p, final Selector matchingSelector);
  • trunk/src/org/openstreetmap/josm/data/validation/tests/OpeningHourTest.java

    r8836 r8958  
    226226    /**
    227227     * Translates and shortens the error/warning message.
     228     * @param key OSM key
     229     * @param o error/warnign message
     230     * @return translated/shortened error/warnign message
    228231     */
    229232    private String getErrorMessage(String key, Object o) {
  • trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java

    r8870 r8958  
    296296     * Checks given string (key or value) if it contains characters with code below 0x20 (either newline or some other special characters)
    297297     * @param s string to check
     298     * @return {@code true} if {@code s} contains characters with code below 0x20
    298299     */
    299300    private static boolean containsLow(String s) {
  • trunk/src/org/openstreetmap/josm/gui/ConditionalOptionPaneUtil.java

    r8926 r8958  
    7474     * (in order to provide a "Do not show again (this operation)" option).
    7575     * @param prefKey the preference key
     76     * @return {@code true} if the key has been marked to be part of a bulk operation
    7677     */
    7778    public static boolean isInBulkOperation(final String prefKey) {
  • trunk/src/org/openstreetmap/josm/gui/FileDrop.java

    r8870 r8958  
    3434import org.openstreetmap.josm.Main;
    3535import org.openstreetmap.josm.actions.OpenFileAction;
    36 import org.openstreetmap.josm.gui.FileDrop.TransferableObject;
    3736
    3837// CHECKSTYLE.OFF: HideUtilityClassConstructor
     
    227226    }
    228227
    229     /** Determine if the dragged data is a file list. */
     228    /**
     229     * Determines if the dragged data is a file list.
     230     * @param evt the drag event
     231     * @return {@code true} if the dragged data is a file list
     232     */
    230233    private static boolean isDragOk(final DropTargetDragEvent evt) {
    231234        boolean ok = false;
  • trunk/src/org/openstreetmap/josm/gui/MainMenu.java

    r8906 r8958  
    846846    /**
    847847     * Create search field.
     848     * @return the search field
    848849     */
    849850    private DisableShortcutsOnFocusGainedTextField createSearchField() {
  • trunk/src/org/openstreetmap/josm/gui/MapFrame.java

    r8949 r8958  
    330330     * Call this to add new toggle dialogs to the left button-list
    331331     * @param dlg The toggle dialog. It must not be in the list already.
     332     * @return button allowing to toggle the dialog
    332333     */
    333334    public IconToggleButton addToggleDialog(final ToggleDialog dlg, boolean isExpert) {
  • trunk/src/org/openstreetmap/josm/gui/OsmPrimitivRenderer.java

    r8903 r8958  
    104104
    105105    /**
    106      * Can be overridden to customize the Text
     106     * Returns the text representing an OSM primitive in a component.
     107     * Can be overridden to customize the text
     108     * @param value OSM primitive
     109     * @return text representing the OSM primitive
    107110     */
    108111    protected String getComponentText(OsmPrimitive value) {
     
    111114
    112115    /**
     116     * Returns the text representing an OSM primitive in a tooltip.
    113117     * Can be overridden to customize the ToolTipText
     118     * @param value OSM primitive
     119     * @return text representing the OSM primitive
    114120     */
    115121    protected String getComponentToolTipText(OsmPrimitive value) {
  • trunk/src/org/openstreetmap/josm/gui/SideButton.java

    r8510 r8958  
    6969    }
    7070
    71     /** scales the given image proportionally so that the height is "iconHeight" **/
     71    /**
     72     * Scales the given image proportionally so that the height is "iconHeight"
     73     * @param im original image
     74     * @return scaled image
     75     */
    7276    private static ImageIcon getScaledImage(Image im) {
    7377        int newWidth = im.getWidth(null) *  iconHeight / im.getHeight(null);
  • trunk/src/org/openstreetmap/josm/gui/SplashScreen.java

    r8836 r8958  
    137137        /**
    138138         * Returns a HTML representation for this task.
     139         * @param sb a {@code StringBuilder} used to build the HTML code
     140         * @return {@code sb}
    139141         */
    140142        public abstract StringBuilder toHtml(StringBuilder sb);
  • trunk/src/org/openstreetmap/josm/gui/dialogs/CommandStackDialog.java

    r8836 r8958  
    321321     * Wraps a command in a CommandListMutableTreeNode.
    322322     * Recursively adds child commands.
     323     * @param c the command
     324     * @return the resulting node
    323325     */
    324326    protected CommandListMutableTreeNode getNodeForCommand(PseudoCommand c, int idx) {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java

    r8855 r8958  
    833833    }
    834834
    835     /***
     835    /*
    836836     * The following methods are intended to be overridden, in order to customize
    837837     * the toggle dialog behavior.
    838      **/
    839 
    840     /**
    841      * Default size of the detached dialog.
     838     */
     839
     840    /**
     841     * Returns the default size of the detached dialog.
    842842     * Override this method to customize the initial dialog size.
     843     * @return the default size of the detached dialog
    843844     */
    844845    protected Dimension getDefaultDetachedSize() {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberRoleCellEditor.java

    r8840 r8958  
    5252    }
    5353
    54     /** Returns the edit field for this cell editor. */
     54    /**
     55     * Returns the edit field for this cell editor.
     56     * @return the edit field for this cell editor
     57     */
    5558    public AutoCompletingTextField getEditor() {
    5659        return editor;
  • trunk/src/org/openstreetmap/josm/gui/layer/Layer.java

    r8864 r8958  
    174174     * Return a representative small image for this layer. The image must not
    175175     * be larger than 64 pixel in any dimension.
     176     * @return layer icon
    176177     */
    177178    public abstract Icon getIcon();
     
    182183     *      is used. When this is true, then even for custom coloring the base
    183184     *      color is returned - mainly for layer internal use.
     185     * @return layer color
    184186     */
    185187    public Color getColor(boolean ignoreCustom) {
     
    225227     * have correct equals implementation.
    226228     *
    227      * Use SeparatorLayerAction.INSTANCE instead of new JSeparator
    228      *
     229     * Use {@link SeparatorLayerAction#INSTANCE} instead of new JSeparator
     230     * @return menu actions for this layer
    229231     */
    230232    public abstract Action[] getMenuEntries();
  • trunk/src/org/openstreetmap/josm/gui/mappaint/BoxTextElemStyle.java

    r8846 r8958  
    3535
    3636        /**
    37          * The box
     37         * Returns the box.
     38         * @return the box
    3839         */
    3940        public Rectangle getBox() {
     
    4243
    4344        /**
    44          * True, if the box can change in future calls of the BoxProvider get() method
     45         * Determines if the box can change in future calls of the {@link BoxProvider#get()} method
     46         * @return {@code true} if the box can change in future calls of the {@code BoxProvider#get()} method
    4547         */
    4648        public boolean isTemporary() {
     
    5254        private Rectangle box;
    5355
     56        /**
     57         * Constructs a new {@code SimpleBoxProvider}.
     58         * @param box the box
     59         */
    5460        public SimpleBoxProvider(Rectangle box) {
    5561            this.box = box;
  • trunk/src/org/openstreetmap/josm/gui/mappaint/MapImage.java

    r8840 r8958  
    137137
    138138    /**
    139      * Returns true, if image is not completely loaded and getImage() returns a temporary image.
     139     * Determines if image is not completely loaded and {@code getImage()} returns a temporary image.
     140     * @return {@code true} if image is not completely loaded and getImage() returns a temporary image
    140141     */
    141142    public boolean isTemporary() {
  • trunk/src/org/openstreetmap/josm/gui/mappaint/Range.java

    r8846 r8958  
    3232    /**
    3333     * provides the intersection of 2 overlapping ranges
     34     * @param a first range
     35     * @param b second range
     36     * @return intersection of {@code a} and {@code b}
    3437     */
    3538    public static Range cut(Range a, Range b) {
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java

    r8950 r8958  
    520520        /**
    521521         * {@code closed} tests whether the way is closed or the relation is a closed multipolygon
     522         * @param e MapCSS environment
     523         * @return {@code true} if the way is closed or the relation is a closed multipolygon
    522524         */
    523525        static boolean closed(Environment e) {
     
    531533        /**
    532534         * {@code :modified} tests whether the object has been modified.
    533          * @see OsmPrimitive#isModified() ()
     535         * @param e MapCSS environment
     536         * @return {@code true} if the object has been modified
     537         * @see OsmPrimitive#isModified()
    534538         */
    535539        static boolean modified(Environment e) {
     
    539543        /**
    540544         * {@code ;new} tests whether the object is new.
     545         * @param e MapCSS environment
     546         * @return {@code true} if the object is new
    541547         * @see OsmPrimitive#isNew()
    542548         */
     
    547553        /**
    548554         * {@code :connection} tests whether the object is a connection node.
     555         * @param e MapCSS environment
     556         * @return {@code true} if the object is a connection node
    549557         * @see Node#isConnectionNode()
    550558         */
     
    555563        /**
    556564         * {@code :tagged} tests whether the object is tagged.
     565         * @param e MapCSS environment
     566         * @return {@code true} if the object is tagged
    557567         * @see OsmPrimitive#isTagged()
    558568         */
     
    563573        /**
    564574         * {@code :same-tags} tests whether the object has the same tags as its child/parent.
     575         * @param e MapCSS environment
     576         * @return {@code true} if the object has the same tags as its child/parent
    565577         * @see OsmPrimitive#hasSameInterestingTags(OsmPrimitive)
    566578         */
     
    571583        /**
    572584         * {@code :area-style} tests whether the object has an area style. This is useful for validators.
     585         * @param e MapCSS environment
     586         * @return {@code true} if the object has an area style
    573587         * @see ElemStyles#hasAreaElemStyle(OsmPrimitive, boolean)
    574588         */
     
    580594        /**
    581595         * {@code unconnected}: tests whether the object is a unconnected node.
     596         * @param e MapCSS environment
     597         * @return {@code true} if the object is a unconnected node
    582598         */
    583599        static boolean unconnected(Environment e) {
     
    587603        /**
    588604         * {@code righthandtraffic} checks if there is right-hand traffic at the current location.
     605         * @param e MapCSS environment
     606         * @return {@code true} if there is right-hand traffic at the current location
    589607         * @see ExpressionFactory.Functions#is_right_hand_traffic(Environment)
    590608         */
     
    595613        /**
    596614         * {@code unclosed-multipolygon} tests whether the object is an unclosed multipolygon.
     615         * @param e MapCSS environment
     616         * @return {@code true} if the object is an unclosed multipolygon
    597617         */
    598618        static boolean unclosed_multipolygon(Environment e) {
     
    606626        /**
    607627         * {@code in-downloaded-area} tests whether the object is within source area ("downloaded area").
     628         * @param e MapCSS environment
     629         * @return {@code true} if the object is within source area ("downloaded area")
    608630         * @see InDataSourceArea
    609631         */
  • trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceSetting.java

    r8512 r8958  
    1616     * Called when OK is pressed to save the setting in the preferences file.
    1717     * Return true when restart is required.
     18     * @return {@code true} if restart is required
    1819     */
    1920    boolean ok();
  • trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java

    r8936 r8958  
    393393    /**
    394394     * Load the list of source entries that the user has configured.
     395     * @return list of source entries that the user has configured
    395396     */
    396397    public abstract Collection<? extends SourceEntry> getInitialSourcesList();
     
    398399    /**
    399400     * Load the list of configured icon paths.
     401     * @return list of configured icon paths
    400402     */
    401403    public abstract Collection<String> getInitialIconPathsList();
     
    403405    /**
    404406     * Get the default list of entries (used when resetting the list).
     407     * @return default list of entries
    405408     */
    406409    public abstract Collection<ExtendedSourceEntry> getDefault();
  • trunk/src/org/openstreetmap/josm/gui/preferences/SubPreferenceSetting.java

    r8512 r8958  
    1212    /**
    1313     * Returns the preference setting (displayed in the specified preferences tab pane) that contains this preference setting.
     14     * @return parent preference setting
    1415     */
    1516    TabPreferenceSetting getTabPreferenceSetting(final PreferenceTabbedPane gui);
  • trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionItemPriority.java

    r8387 r8958  
    106106     * Merges two priorities.
    107107     * The resulting priority is always &gt;= the original ones.
     108     * @return the merged priority
    108109     */
    109110    public AutoCompletionItemPriority mergeWith(AutoCompletionItemPriority other) {
  • trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPreset.java

    r8945 r8958  
    141141    /**
    142142     * Returns the translated name of this preset, prefixed with the group names it belongs to.
     143     * @return the translated name of this preset, prefixed with the group names it belongs to
    143144     */
    144145    public String getName() {
     
    148149    /**
    149150     * Returns the non translated name of this preset, prefixed with the (non translated) group names it belongs to.
     151     * @return the non translated name of this preset, prefixed with the (non translated) group names it belongs to
    150152     */
    151153    public String getRawName() {
  • trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetReader.java

    r8863 r8958  
    9191        /**
    9292         * Returns the last inserted element.
     93         * @return the last inserted element
    9394         */
    9495        public E getLast() {
     
    402403
    403404    /**
    404      * Returns true if icon images should be loaded.
     405     * Determines if icon images should be loaded.
     406     * @return {@code true} if icon images should be loaded
    405407     */
    406408    public static boolean isLoadIcons() {
     
    410412    /**
    411413     * Sets whether icon images should be loaded.
     414     * @param loadIcons {@code true} if icon images should be loaded
    412415     */
    413416    public static void setLoadIcons(boolean loadIcons) {
Note: See TracChangeset for help on using the changeset viewer.