Ignore:
Timestamp:
2014-12-20T16:00:06+01:00 (5 years ago)
Author:
Don-vip
Message:

fix various Sonar issues, improve Javadoc

Location:
trunk/src/org/openstreetmap/josm/actions
Files:
16 edited

Legend:

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

    r7350 r7859  
    3434import org.openstreetmap.josm.tools.ImageProvider;
    3535
     36/**
     37 * Adjust the position of an imagery layer.
     38 * @since 3715
     39 */
    3640public class ImageryAdjustAction extends MapMode implements MouseListener, MouseMotionListener, AWTEventListener{
    37     static ImageryOffsetDialog offsetDialog;
    38     static Cursor cursor = ImageProvider.getCursor("normal", "move");
    39 
    40     double oldDx, oldDy;
    41     boolean mouseDown;
    42     EastNorth prevEastNorth;
     41    private static ImageryOffsetDialog offsetDialog;
     42    private static Cursor cursor = ImageProvider.getCursor("normal", "move");
     43
     44    private double oldDx, oldDy;
     45    private EastNorth prevEastNorth;
    4346    private ImageryLayer layer;
    4447    private MapMode oldMapMode;
     
    108111    @Override
    109112    public void eventDispatched(AWTEvent event) {
    110         if (!(event instanceof KeyEvent)) return;
    111         if (event.getID() != KeyEvent.KEY_PRESSED) return;
    112         if (layer == null) return;
    113         if (offsetDialog != null && offsetDialog.areFieldsInFocus()) return;
     113        if (!(event instanceof KeyEvent)
     114          || (event.getID() != KeyEvent.KEY_PRESSED)
     115          || (layer == null)
     116          || (offsetDialog != null && offsetDialog.areFieldsInFocus())) {
     117            return;
     118        }
    114119        KeyEvent kev = (KeyEvent)event;
    115         double dx = 0, dy = 0;
     120        int dx = 0, dy = 0;
    116121        switch (kev.getKeyCode()) {
    117122        case KeyEvent.VK_UP : dy = +1; break;
     
    173178    }
    174179
    175     class ImageryOffsetDialog extends ExtendedDialog implements FocusListener {
    176         public final JosmTextField tOffset = new JosmTextField();
    177         JosmTextField tBookmarkName = new JosmTextField();
     180    private class ImageryOffsetDialog extends ExtendedDialog implements FocusListener {
     181        private final JosmTextField tOffset = new JosmTextField();
     182        private final JosmTextField tBookmarkName = new JosmTextField();
    178183        private boolean ignoreListener;
     184
     185        /**
     186         * Constructs a new {@code ImageryOffsetDialog}.
     187         */
    179188        public ImageryOffsetDialog() {
    180189            super(Main.parent,
     
    187196            pnl.add(new JMultilineLabel(tr("Use arrow keys or drag the imagery layer with mouse to adjust the imagery offset.\n" +
    188197                    "You can also enter east and north offset in the {0} coordinates.\n" +
    189                     "If you want to save the offset as bookmark, enter the bookmark name below",Main.getProjection().toString())), GBC.eop());
     198                    "If you want to save the offset as bookmark, enter the bookmark name below",
     199                    Main.getProjection().toString())), GBC.eop());
    190200            pnl.add(new JLabel(tr("Offset: ")),GBC.std());
    191201            pnl.add(tOffset,GBC.eol().fill(GBC.HORIZONTAL).insets(0,0,0,5));
     
    199209        }
    200210
    201         public boolean areFieldsInFocus() {
     211        private boolean areFieldsInFocus() {
    202212            return tOffset.hasFocus();
    203213        }
     
    205215        @Override
    206216        public void focusGained(FocusEvent e) {
     217            // Do nothing
    207218        }
    208219
     
    230241        }
    231242
    232         public final void updateOffset() {
     243        private final void updateOffset() {
    233244            ignoreListener = true;
    234245            updateOffsetIntl();
     
    236247        }
    237248
    238         public final void updateOffsetIntl() {
     249        private final void updateOffsetIntl() {
    239250            // Support projections with very small numbers (e.g. 4326)
    240251            int precision = Main.getProjection().getDefaultZoomInPPD() >= 1.0 ? 2 : 7;
     
    265276        protected void buttonAction(int buttonIndex, ActionEvent evt) {
    266277            if (buttonIndex == 0 && tBookmarkName.getText() != null && !tBookmarkName.getText().isEmpty() &&
    267                     OffsetBookmark.getBookmarkByName(layer, tBookmarkName.getText()) != null) {
    268                 if (!confirmOverwriteBookmark()) return;
     278                    OffsetBookmark.getBookmarkByName(layer, tBookmarkName.getText()) != null &&
     279                    !confirmOverwriteBookmark()) {
     280                return;
    269281            }
    270282            super.buttonAction(buttonIndex, evt);
  • trunk/src/org/openstreetmap/josm/actions/InfoAction.java

    r7771 r7859  
    22package org.openstreetmap.josm.actions;
    33
     4import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
     5import static org.openstreetmap.josm.tools.I18n.tr;
     6
    47import java.awt.event.ActionEvent;
    5 import static org.openstreetmap.josm.tools.I18n.tr;
    6 import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
     8import java.awt.event.KeyEvent;
     9import java.util.Collection;
    710
    8 import java.awt.event.KeyEvent;
    9 
    10 import java.util.Collection;
    1111import org.openstreetmap.josm.Main;
    1212import org.openstreetmap.josm.data.osm.DataSet;
     
    1515import org.openstreetmap.josm.tools.Shortcut;
    1616
     17/**
     18 * Display advanced object information about OSM nodes, ways, or relations.
     19 * @since 1697
     20 */
    1721public class InfoAction extends JosmAction {
    1822
  • trunk/src/org/openstreetmap/josm/actions/InfoWebAction.java

    r7771 r7859  
    1212import org.openstreetmap.josm.tools.Shortcut;
    1313
     14/**
     15 * Display object information about OSM nodes, ways, or relations in web browser.
     16 * @since 4408
     17 */
    1418public class InfoWebAction extends AbstractInfoAction {
    1519
     20    /**
     21     * Constructs a new {@code InfoWebAction}.
     22     */
    1623    public InfoWebAction() {
    1724        super(tr("Advanced info (web)"), "info",
  • trunk/src/org/openstreetmap/josm/actions/JoinNodeWayAction.java

    r7668 r7859  
    3838 * <li><b>Move Node onto Way</b>: Move the node onto the nearest way segments and include it</li>
    3939 * </ul>
     40 * @since 466
    4041 */
    4142public class JoinNodeWayAction extends JosmAction {
     
    4344    protected final boolean joinWayToNode;
    4445
    45     protected JoinNodeWayAction(boolean joinWayToNode, String name, String iconName, String tooltip, Shortcut shortcut, boolean registerInToolbar) {
     46    protected JoinNodeWayAction(boolean joinWayToNode, String name, String iconName, String tooltip,
     47            Shortcut shortcut, boolean registerInToolbar) {
    4648        super(name, iconName, tooltip, shortcut, registerInToolbar);
    4749        this.joinWayToNode = joinWayToNode;
     
    5456    public static JoinNodeWayAction createJoinNodeToWayAction() {
    5557        JoinNodeWayAction action = new JoinNodeWayAction(false,
    56                 tr("Join Node to Way"), /* ICON */ "joinnodeway", tr("Include a node into the nearest way segments"),
    57                 Shortcut.registerShortcut("tools:joinnodeway", tr("Tool: {0}", tr("Join Node to Way")), KeyEvent.VK_J, Shortcut.DIRECT), true);
     58                tr("Join Node to Way"), /* ICON */ "joinnodeway",
     59                tr("Include a node into the nearest way segments"),
     60                Shortcut.registerShortcut("tools:joinnodeway", tr("Tool: {0}", tr("Join Node to Way")),
     61                        KeyEvent.VK_J, Shortcut.DIRECT), true);
    5862        action.putValue("help", ht("/Action/JoinNodeWay"));
    5963        return action;
     
    6670    public static JoinNodeWayAction createMoveNodeOntoWayAction() {
    6771        JoinNodeWayAction action = new JoinNodeWayAction(true,
    68                 tr("Move Node onto Way"), /* ICON*/ "movenodeontoway", tr("Move the node onto the nearest way segments and include it"),
    69                 Shortcut.registerShortcut("tools:movenodeontoway", tr("Tool: {0}", tr("Move Node onto Way")), KeyEvent.VK_N, Shortcut.DIRECT), true);
     72                tr("Move Node onto Way"), /* ICON*/ "movenodeontoway",
     73                tr("Move the node onto the nearest way segments and include it"),
     74                Shortcut.registerShortcut("tools:movenodeontoway", tr("Tool: {0}", tr("Move Node onto Way")),
     75                        KeyEvent.VK_N, Shortcut.DIRECT), true);
     76        action.putValue("help", ht("/Action/MoveNodeWay"));
    7077        return action;
    7178    }
     
    95102                }
    96103
    97                 if (ws.getFirstNode() != node && ws.getSecondNode() != node) {
     104                if (!ws.getFirstNode().equals(node) && !ws.getSecondNode().equals(node)) {
    98105                    insertPoints.put(ws.way, ws.lowerIndex);
    99106                }
     
    137144                List<Node> nodesToAdd = new LinkedList<>();
    138145                nodesToAdd.addAll(nodesInSegment);
    139                 Collections.sort(nodesToAdd, new NodeDistanceToRefNodeComparator(w.getNode(segmentIndex), w.getNode(segmentIndex+1), !joinWayToNode));
     146                Collections.sort(nodesToAdd, new NodeDistanceToRefNodeComparator(
     147                        w.getNode(segmentIndex), w.getNode(segmentIndex+1), !joinWayToNode));
    140148                wayNodes.addAll(segmentIndex + 1, nodesToAdd);
    141149            }
  • trunk/src/org/openstreetmap/josm/actions/JosmAction.java

    r7693 r7859  
    335335    /**
    336336     * Adapter for selection change events
    337      *
    338337     */
    339338    private class SelectionChangeAdapter implements SelectionChangedListener {
  • trunk/src/org/openstreetmap/josm/actions/LassoModeAction.java

    r7668 r7859  
    99import org.openstreetmap.josm.tools.ImageProvider;
    1010
     11/**
     12 * Lasso selection mode: select objects within a hand-drawn region.
     13 * @since 5152
     14 */
    1115public class LassoModeAction extends MapMode {
    1216
     17    /**
     18     * Constructs a new {@code LassoModeAction}.
     19     */
    1320    public LassoModeAction() {
    1421        super(tr("Lasso Mode"),
  • trunk/src/org/openstreetmap/josm/actions/MapRectifierWMSmenuAction.java

    r7813 r7859  
    2424import org.openstreetmap.josm.gui.ExtendedDialog;
    2525import org.openstreetmap.josm.gui.layer.WMSLayer;
     26import org.openstreetmap.josm.gui.widgets.JosmTextField;
     27import org.openstreetmap.josm.gui.widgets.UrlLabel;
    2628import org.openstreetmap.josm.tools.GBC;
    2729import org.openstreetmap.josm.tools.Shortcut;
    2830import org.openstreetmap.josm.tools.Utils;
    29 import org.openstreetmap.josm.gui.widgets.JosmTextField;
    30 import org.openstreetmap.josm.gui.widgets.UrlLabel;
    31 
     31
     32/**
     33 * Download rectified images from various services.
     34 * @since 3715
     35 */
    3236public class MapRectifierWMSmenuAction extends JosmAction {
     37
    3338    /**
    3439     * Class that bundles all required information of a rectifier service
     
    4045        private final Pattern urlRegEx;
    4146        private final Pattern idValidator;
    42         public JRadioButton btn;
     47        private JRadioButton btn;
    4348
    4449        /**
     
    5762        }
    5863
    59         public boolean isSelected() {
     64        private boolean isSelected() {
    6065            return btn.isSelected();
    6166        }
     
    6368
    6469    /**
    65      * List of available rectifier services. May be extended from the outside
    66      */
    67     public List<RectifierService> services = new ArrayList<>();
    68 
     70     * List of available rectifier services.
     71     */
     72    private final List<RectifierService> services = new ArrayList<>();
     73
     74    /**
     75     * Constructs a new {@code MapRectifierWMSmenuAction}.
     76     */
    6977    public MapRectifierWMSmenuAction() {
    7078        super(tr("Rectified Image..."),
  • trunk/src/org/openstreetmap/josm/actions/MergeLayerAction.java

    r7509 r7859  
    4646                boolean layerMerged = false;
    4747                for (final Layer sourceLayer: sourceLayers) {
    48                     if (sourceLayer != null && sourceLayer != targetLayer) {
     48                    if (sourceLayer != null && !sourceLayer.equals(targetLayer)) {
    4949                        if (sourceLayer instanceof OsmDataLayer && targetLayer instanceof OsmDataLayer
    5050                                && ((OsmDataLayer)sourceLayer).isUploadDiscouraged() != ((OsmDataLayer)targetLayer).isUploadDiscouraged()) {
  • trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java

    r7509 r7859  
    7272
    7373        if (selectedNodes.size() == 1) {
    74             List<Node> nearestNodes = Main.map.mapView.getNearestNodes(Main.map.mapView.getPoint(selectedNodes.get(0)), selectedNodes, OsmPrimitive.isUsablePredicate);
     74            List<Node> nearestNodes = Main.map.mapView.getNearestNodes(
     75                    Main.map.mapView.getPoint(selectedNodes.get(0)), selectedNodes, OsmPrimitive.isUsablePredicate);
    7576            if (nearestNodes.isEmpty()) {
    7677                new Notification(
     
    142143            return new Node(new EastNorth(east2 / weight, north2 / weight));
    143144        default:
    144             throw new RuntimeException("unacceptable merge-nodes.mode");
    145         }
    146 
     145            throw new IllegalStateException("unacceptable merge-nodes.mode");
     146        }
    147147    }
    148148
     
    198198            List<Node> newNodes = new ArrayList<>(w.getNodesCount());
    199199            for (Node n: w.getNodes()) {
    200                 if (! nodesToDelete.contains(n) && n != targetNode) {
     200                if (! nodesToDelete.contains(n) && !n.equals(targetNode)) {
    201201                    newNodes.add(n);
    202202                } else if (newNodes.isEmpty()) {
    203203                    newNodes.add(targetNode);
    204                 } else if (newNodes.get(newNodes.size()-1) != targetNode) {
     204                } else if (!newNodes.get(newNodes.size()-1).equals(targetNode)) {
    205205                    // make sure we collapse a sequence of deleted nodes
    206206                    // to exactly one occurrence of the merged target node
    207                     //
    208207                    newNodes.add(targetNode);
    209208                } else {
     
    317316            TagCollection nodeTags = TagCollection.unionOfAllPrimitives(nodes);
    318317            List<Command> resultion = CombinePrimitiveResolverDialog.launchIfNecessary(nodeTags, nodes, Collections.singleton(targetNode));
    319             LinkedList<Command> cmds = new LinkedList<>();
     318            List<Command> cmds = new LinkedList<>();
    320319
    321320            // the nodes we will have to delete
     
    337336            // build the commands
    338337            //
    339             if (targetNode != targetLocationNode) {
     338            if (!targetNode.equals(targetLocationNode)) {
    340339                LatLon targetLocationCoor = targetLocationNode.getCoor();
    341340                if (!targetNode.getCoor().equals(targetLocationCoor)) {
  • trunk/src/org/openstreetmap/josm/actions/MergeSelectionAction.java

    r6084 r7859  
    1010import java.util.List;
    1111
    12 import org.openstreetmap.josm.data.osm.DataSet;
    1312import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1413import org.openstreetmap.josm.data.osm.visitor.MergeSourceBuildingVisitor;
     
    2019import org.openstreetmap.josm.tools.Shortcut;
    2120
     21/**
     22 * Merge the currently selected objects into another layer.
     23 * @since 1890
     24 */
    2225public class MergeSelectionAction extends AbstractMergeAction {
     26
     27    /**
     28     * Constructs a new {@code MergeSelectionAction}.
     29     */
    2330    public MergeSelectionAction() {
    2431        super(tr("Merge selection"), "dialogs/mergedown", tr("Merge the currently selected objects into another layer"),
     
    3037    }
    3138
    32     public void mergeSelected(DataSet source) {
     39    /**
     40     * Merge the currently selected objects into another layer.
     41     */
     42    public void mergeSelected() {
    3343        List<Layer> targetLayers = LayerListDialog.getInstance().getModel().getPossibleMergeTargets(getEditLayer());
    3444        if (targetLayers.isEmpty()) {
     
    3949        if (targetLayer == null)
    4050            return;
    41         if (getEditLayer().isUploadDiscouraged() && targetLayer instanceof OsmDataLayer && !((OsmDataLayer)targetLayer).isUploadDiscouraged()
    42                 && getEditLayer().data.getAllSelected().size() > 1) {
    43             if (warnMergingUploadDiscouragedObjects(targetLayer)) {
    44                 return;
    45             }
     51        if (getEditLayer().isUploadDiscouraged() && targetLayer instanceof OsmDataLayer
     52                && !((OsmDataLayer)targetLayer).isUploadDiscouraged()
     53                && getEditLayer().data.getAllSelected().size() > 1
     54                && warnMergingUploadDiscouragedObjects(targetLayer)) {
     55            return;
    4656        }
    4757        MergeSourceBuildingVisitor builder = new MergeSourceBuildingVisitor(getEditLayer().data);
     
    5363        if (getEditLayer() == null || getEditLayer().data.getAllSelected().isEmpty())
    5464            return;
    55         mergeSelected(getEditLayer().data);
     65        mergeSelected();
    5666    }
    5767
     
    7181
    7282    /**
    73      * returns true if the user wants to cancel, false if they want to continue
     83     * Warns the user about merging too many objects with different upload policies.
     84     * @param targetLayer Target layer
     85     * @return true if the user wants to cancel, false if they want to continue
    7486     */
    7587    public static final boolean warnMergingUploadDiscouragedObjects(Layer targetLayer) {
     
    7991                        "<b>This is not the recommended way of merging such data</b>.<br />"+
    8092                        "You should instead check and merge each object, <b>one by one</b>.<br /><br />"+
    81                         "Are you sure you want to continue?", getEditLayer().getName(), targetLayer.getName(), targetLayer.getName())+
     93                        "Are you sure you want to continue?",
     94                        getEditLayer().getName(), targetLayer.getName(), targetLayer.getName())+
    8295                "</html>",
    8396                ImageProvider.get("dialogs", "mergedown"), tr("Ignore this hint and merge anyway"));
  • trunk/src/org/openstreetmap/josm/actions/MirrorAction.java

    r7005 r7859  
    1010import java.util.HashSet;
    1111import java.util.LinkedList;
     12import java.util.Set;
    1213
    1314import javax.swing.JOptionPane;
     
    4546    public void actionPerformed(ActionEvent e) {
    4647        Collection<OsmPrimitive> sel = getCurrentDataSet().getSelected();
    47         HashSet<Node> nodes = new HashSet<>();
     48        Set<Node> nodes = new HashSet<>();
    4849
    4950        for (OsmPrimitive osm : sel) {
  • trunk/src/org/openstreetmap/josm/actions/MoveAction.java

    r6798 r7859  
    3232
    3333    // any better idea?
    34     private static String calltosupermustbefirststatementinconstructor_text(Direction dir) {
     34    private static String calltosupermustbefirststatementinconstructortext(Direction dir) {
    3535        String directiontext;
    3636        if        (dir == Direction.UP)   {
     
    6161    }
    6262
     63    /**
     64     * Constructs a new {@code MoveAction}.
     65     * @param dir direction
     66     */
    6367    public MoveAction(Direction dir) {
    64         super(tr("Move {0}", calltosupermustbefirststatementinconstructor_text(dir)), null,
    65                 tr("Moves Objects {0}", calltosupermustbefirststatementinconstructor_text(dir)),
     68        super(tr("Move {0}", calltosupermustbefirststatementinconstructortext(dir)), null,
     69                tr("Moves Objects {0}", calltosupermustbefirststatementinconstructortext(dir)),
    6670                calltosupermustbefirststatementinconstructor(dir), false);
    6771        myDirection = dir;
     
    120124            ((MoveCommand)c).moveAgain(distx, disty);
    121125        } else {
    122             Main.main.undoRedo.add(
    123                     c = new MoveCommand(selection, distx, disty));
     126            c = new MoveCommand(selection, distx, disty);
     127            Main.main.undoRedo.add(c);
    124128        }
    125129        getCurrentDataSet().endUpdate();
  • trunk/src/org/openstreetmap/josm/actions/MoveNodeAction.java

    r6380 r7859  
    2121public final class MoveNodeAction extends JosmAction {
    2222
     23    /**
     24     * Constructs a new {@code MoveNodeAction}.
     25     */
    2326    public MoveNodeAction() {
    2427        super(tr("Move Node..."), "movenode", tr("Edit latitude and longitude of a node."),
  • trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java

    r7578 r7859  
    5252     * The {@link ExtensionFileFilter} matching .url files
    5353     */
    54     public static final ExtensionFileFilter urlFileFilter = new ExtensionFileFilter("url", "url", tr("URL Files") + " (*.url)");
     54    public static final ExtensionFileFilter URL_FILE_FILTER = new ExtensionFileFilter("url", "url", tr("URL Files") + " (*.url)");
    5555
    5656    /**
     
    200200            FileImporter chosenImporter = null;
    201201            for (FileImporter importer : ExtensionFileFilter.importers) {
    202                 if (fileFilter == importer.filter) {
     202                if (fileFilter.equals(importer.filter)) {
    203203                    chosenImporter = importer;
    204204                }
     
    258258                        }
    259259                    }
    260                     if (urlFileFilter.accept(f)) {
     260                    if (URL_FILE_FILTER.accept(f)) {
    261261                        urlFiles.add(f);
    262262                    } else {
  • trunk/src/org/openstreetmap/josm/actions/OpenLocationAction.java

    r7749 r7859  
    5555        /* I18N: Command to download a specific location/URL */
    5656        super(tr("Open Location..."), "openlocation", tr("Open an URL."),
    57                 Shortcut.registerShortcut("system:open_location", tr("File: {0}", tr("Open Location...")), KeyEvent.VK_L, Shortcut.CTRL), true);
     57                Shortcut.registerShortcut("system:open_location", tr("File: {0}", tr("Open Location...")),
     58                        KeyEvent.VK_L, Shortcut.CTRL), true);
    5859        putValue("help", ht("/Action/OpenLocation"));
    5960        this.downloadTasks = new ArrayList<>();
     
    7475     */
    7576    protected void restoreUploadAddressHistory(HistoryComboBox cbHistory) {
    76         List<String> cmtHistory = new LinkedList<>(Main.pref.getCollection(getClass().getName() + ".uploadAddressHistory", new LinkedList<String>()));
     77        List<String> cmtHistory = new LinkedList<>(Main.pref.getCollection(getClass().getName() + ".uploadAddressHistory",
     78                new LinkedList<String>()));
    7779        // we have to reverse the history, because ComboBoxHistory will reverse it again in addElement()
    7880        //
     
    175177    /**
    176178     * Open the given URL.
    177      * @param new_layer true if the URL needs to be opened in a new layer, false otherwise
     179     * @param newLayer true if the URL needs to be opened in a new layer, false otherwise
    178180     * @param url The URL to open
    179181     */
    180     public void openUrl(boolean new_layer, final String url) {
     182    public void openUrl(boolean newLayer, final String url) {
    181183        PleaseWaitProgressMonitor monitor = new PleaseWaitProgressMonitor(tr("Download Data"));
    182184        Collection<DownloadTask> tasks = findDownloadTasks(url, false);
     
    187189            try {
    188190                task = tasks.iterator().next();
    189                 future = task.loadUrl(new_layer, url, monitor);
     191                future = task.loadUrl(newLayer, url, monitor);
    190192            } catch (IllegalArgumentException e) {
    191193                Main.error(e);
  • trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java

    r7012 r7859  
    304304        // rotate
    305305        for (Node n: allNodes) {
    306             EastNorth tmp = EN.rotate_cc(pivot, n.getEastNorth(), - headingAll);
     306            EastNorth tmp = EN.rotateCC(pivot, n.getEastNorth(), - headingAll);
    307307            nX.put(n, tmp.east());
    308308            nY.put(n, tmp.north());
     
    384384        for (Node n: allNodes) {
    385385            EastNorth tmp = new EastNorth(nX.get(n), nY.get(n));
    386             tmp = EN.rotate_cc(pivot, tmp, headingAll);
     386            tmp = EN.rotateCC(pivot, tmp, headingAll);
    387387            final double dx = tmp.east()  - n.getEastNorth().east();
    388388            final double dy = tmp.north() - n.getEastNorth().north();
     
    418418            nSeg = nNode - 1;
    419419        }
     420
    420421        /**
    421422         * Estimate the direction of the segments, given the first segment points in the
     
    423424         * Then sum up all horizontal / vertical segments to have a good guess for the
    424425         * heading of the entire way.
     426         * @param pInitialDirection initial direction
    425427         * @throws InvalidUserInputException
    426428         */
     
    522524            // Hide implicit public constructor for utility class
    523525        }
    524         // rotate counter-clock-wise
    525         public static EastNorth rotate_cc(EastNorth pivot, EastNorth en, double angle) {
     526        /**
     527         * Rotate counter-clock-wise.
     528         */
     529        public static EastNorth rotateCC(EastNorth pivot, EastNorth en, double angle) {
    526530            double cosPhi = Math.cos(angle);
    527531            double sinPhi = Math.sin(angle);
Note: See TracChangeset for help on using the changeset viewer.