Skip to content

Commit

Permalink
checkstyle
Browse files Browse the repository at this point in the history
git-svn-id: http://josm.openstreetmap.de/svn/trunk@9059 0c6e7542-c601-0410-84e7-c038aed88b3b
  • Loading branch information
don-vip committed Nov 23, 2015
1 parent 0004091 commit 6f420f6
Show file tree
Hide file tree
Showing 107 changed files with 239 additions and 138 deletions.
4 changes: 2 additions & 2 deletions src/org/openstreetmap/josm/Main.java
Expand Up @@ -1451,9 +1451,9 @@ public interface WindowSwitchListener {
* Called when the user activates a window of another application.
*/
void toOtherApplication();

/**
* Called when the user comes from a window of another application
* back to JOSM.
* Called when the user comes from a window of another application back to JOSM.
*/
void fromOtherApplication();
}
Expand Down
9 changes: 6 additions & 3 deletions src/org/openstreetmap/josm/actions/DuplicateAction.java
Expand Up @@ -2,20 +2,23 @@
// Author: David Earl
package org.openstreetmap.josm.actions;

import static org.openstreetmap.josm.tools.I18n.tr;
import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
import static org.openstreetmap.josm.tools.I18n.tr;

import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;
import java.util.Collection;
import org.openstreetmap.josm.Main;

import org.openstreetmap.josm.Main;
import org.openstreetmap.josm.data.osm.OsmPrimitive;
import org.openstreetmap.josm.data.osm.PrimitiveDeepCopy;
import org.openstreetmap.josm.tools.Shortcut;

public final class DuplicateAction extends JosmAction{
public final class DuplicateAction extends JosmAction {

/**
* Constructs a new {@code DuplicateAction}.
*/
public DuplicateAction() {
super(tr("Duplicate"), "duplicate",
tr("Duplicate selection by copy and immediate paste."),
Expand Down
Expand Up @@ -39,7 +39,7 @@
* Adjust the position of an imagery layer.
* @since 3715
*/
public class ImageryAdjustAction extends MapMode implements MouseListener, MouseMotionListener, AWTEventListener{
public class ImageryAdjustAction extends MapMode implements MouseListener, MouseMotionListener, AWTEventListener {
private static volatile ImageryOffsetDialog offsetDialog;
private static Cursor cursor = ImageProvider.getCursor("normal", "move");

Expand Down
5 changes: 4 additions & 1 deletion src/org/openstreetmap/josm/actions/UnselectAllAction.java
Expand Up @@ -11,6 +11,9 @@

public class UnselectAllAction extends JosmAction {

/**
* Constructs a new {@code UnselectAllAction}.
*/
public UnselectAllAction() {
super(tr("Unselect All"), "unselectall", tr("Unselect all objects."),
Shortcut.registerShortcut("edit:unselectall", tr("Edit: {0}",
Expand All @@ -25,9 +28,9 @@ public void actionPerformed(ActionEvent e) {
return;
getCurrentDataSet().setSelected();
}

/**
* Refreshes the enabled state
*
*/
@Override
protected void updateEnabledState() {
Expand Down
2 changes: 1 addition & 1 deletion src/org/openstreetmap/josm/actions/UploadAction.java
Expand Up @@ -43,7 +43,7 @@
*
* @author imi
*/
public class UploadAction extends JosmAction{
public class UploadAction extends JosmAction {
/**
* The list of upload hooks. These hooks will be called one after the other
* when the user wants to upload data. Plugins can insert their own hooks here
Expand Down
1 change: 1 addition & 0 deletions src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
Expand Up @@ -1055,6 +1055,7 @@ private void tryToMoveNodeOnIntersection(List<WaySegment> wss, Node n) {
}
}
}

/**
* Takes the data from computeHelperLine to determine which ways/nodes should be highlighted
* (if feature enabled). Also sets the target cursor if appropriate. It adds the to-be-
Expand Down
Expand Up @@ -356,6 +356,7 @@ public void doKeyReleased(KeyEvent e) {
toggleDualAlign();
}
}

/**
* Toggles dual alignment mode.
*/
Expand Down
1 change: 1 addition & 0 deletions src/org/openstreetmap/josm/actions/mapmode/MapMode.java
Expand Up @@ -74,6 +74,7 @@ protected void updateStatusLine() {
public String getModeHelpText() {
return "";
}

/**
* Call selectMapMode(this) on the parent mapFrame.
*/
Expand Down
Expand Up @@ -42,9 +42,11 @@ public void actionPerformed(ActionEvent e) {
public void setPrimitives(Collection<? extends OsmPrimitive> primitives) {
// selected non-new relations
this.relations = Utils.filter(getRelations(primitives), new Predicate<Relation>() {
@Override public boolean evaluate(Relation r) {
@Override
public boolean evaluate(Relation r) {
return !r.isNew();
}});
}
});
updateEnabledState();
}

Expand Down
Expand Up @@ -68,7 +68,8 @@ public void setPrimitives(Collection<? extends OsmPrimitive> primitives) {
@Override
public boolean evaluate(Relation r) {
return r.hasIncompleteMembers();
}});
}
});
this.incompleteMembers = buildSetOfIncompleteMembers(relations);
updateEnabledState();
}
Expand Down
Expand Up @@ -189,6 +189,7 @@ public Conflict<?> getConflictForMy(OsmPrimitive my) {
}
return null;
}

/**
* Replies the conflict for the {@link OsmPrimitive} <code>their</code>, null
* if no such conflict exists.
Expand Down
7 changes: 6 additions & 1 deletion src/org/openstreetmap/josm/data/notes/NoteComment.java
Expand Up @@ -23,7 +23,12 @@ public class NoteComment {
* Every comment has an associated action. Some comments are just comments
* while others indicate the note being opened, closed or reopened
*/
public enum Action {opened, closed, reopened, commented}
public enum Action {
opened,
closed,
reopened,
commented
}

/**
* @param createDate The time at which this comment was added
Expand Down
2 changes: 1 addition & 1 deletion src/org/openstreetmap/josm/data/osm/ChangesetCache.java
Expand Up @@ -31,7 +31,7 @@
* {@link ChangesetCacheEvent}s are delivered on the EDT.
*
*/
public final class ChangesetCache implements PreferenceChangedListener{
public final class ChangesetCache implements PreferenceChangedListener {
/** the unique instance */
private static final ChangesetCache instance = new ChangesetCache();

Expand Down
Expand Up @@ -6,7 +6,7 @@
import java.util.HashSet;
import java.util.Set;

public class DefaultChangesetCacheEvent implements ChangesetCacheEvent{
public class DefaultChangesetCacheEvent implements ChangesetCacheEvent {

private final Set<Changeset> added;
private final Set<Changeset> modified;
Expand Down
2 changes: 1 addition & 1 deletion src/org/openstreetmap/josm/data/osm/PrimitiveDeepCopy.java
Expand Up @@ -86,7 +86,7 @@ public void visit(Relation r) {
}
}

public final void visitAll() {
public void visitAll() {
for (OsmPrimitive osm : primitives) {
firstIteration = true;
osm.accept(this);
Expand Down
1 change: 1 addition & 0 deletions src/org/openstreetmap/josm/data/osm/Storage.java
Expand Up @@ -127,6 +127,7 @@ public Storage(Hash<? super T, ? super T> ha, boolean safeIterator) {
public Storage(Hash<? super T, ? super T> ha, int capacity) {
this(ha, capacity, false);
}

/**
* constructor
* @param ha hash
Expand Down
Expand Up @@ -8,8 +8,16 @@

public abstract class AbstractDatasetChangedEvent {

public enum DatasetEventType {DATA_CHANGED, NODE_MOVED, PRIMITIVES_ADDED, PRIMITIVES_REMOVED,
RELATION_MEMBERS_CHANGED, TAGS_CHANGED, WAY_NODES_CHANGED, CHANGESET_ID_CHANGED}
public enum DatasetEventType {
DATA_CHANGED,
NODE_MOVED,
PRIMITIVES_ADDED,
PRIMITIVES_REMOVED,
RELATION_MEMBERS_CHANGED,
TAGS_CHANGED,
WAY_NODES_CHANGED,
CHANGESET_ID_CHANGED
}

protected final DataSet dataSet;

Expand Down
Expand Up @@ -98,10 +98,10 @@ public enum FireMode {
*/
IN_EDT,
/**
* Fire in event dispatch thread. If more than one event arrived when event queue is checked, merged them to
* one event
* Fire in event dispatch thread. If more than one event arrived when event queue is checked, merged them to one event
*/
IN_EDT_CONSOLIDATED}
IN_EDT_CONSOLIDATED
}

private static class ListenerInfo {
private final DataSetListener listener;
Expand Down
Expand Up @@ -26,7 +26,7 @@
* A data set holding histories of OSM primitives.
* @since 1670
*/
public class HistoryDataSet implements LayerChangeListener{
public class HistoryDataSet implements LayerChangeListener {
/** the unique instance */
private static HistoryDataSet historyDataSet;

Expand Down
Expand Up @@ -18,7 +18,7 @@
* OSM data.
*
*/
public class HistoryRelation extends HistoryOsmPrimitive{
public class HistoryRelation extends HistoryOsmPrimitive {

private List<RelationMemberData> members = new ArrayList<>();

Expand Down
3 changes: 3 additions & 0 deletions src/org/openstreetmap/josm/data/osm/visitor/Visitor.java
Expand Up @@ -17,18 +17,21 @@ public interface Visitor {
* @param n The node to inspect.
*/
void visit(Node n);

/**
* Visiting call for lines.
* @param w The way to inspect.
* @since 64
*/
void visit(Way w);

/**
* Visiting call for relations.
* @param r The relation to inspect.
* @since 343
*/
void visit(Relation r);

/**
* Visiting call for changesets.
* @param cs The changeset to inspect.
Expand Down
Expand Up @@ -933,6 +933,7 @@ private void drawPathHighlight(GeneralPath path, BasicStroke line) {
w -= highlightStep;
}
}

/**
* highlights a given point by drawing a rounded rectangle around it. Give the
* size of the object you want to be highlighted, width is added automatically.
Expand Down
Expand Up @@ -189,7 +189,11 @@ public boolean isClosed() {
}

public static class PolyData {
public enum Intersection {INSIDE, OUTSIDE, CROSSING}
public enum Intersection {
INSIDE,
OUTSIDE,
CROSSING
}

private final Path2D.Double poly;
public boolean selected;
Expand Down
4 changes: 2 additions & 2 deletions src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java
Expand Up @@ -281,8 +281,8 @@ public void windowOpened(WindowEvent e) {
public void actionPerformed(ActionEvent e) {
pane.setValue(JOptionPane.CLOSED_OPTION);
dialog.setVisible(false);
}}
);
}
});

if (options != null) {
for (int i = 0; i < options.length; i++) {
Expand Down
Expand Up @@ -48,7 +48,7 @@
* </ul>
*
*/
public final class JosmUserIdentityManager implements PreferenceChangedListener{
public final class JosmUserIdentityManager implements PreferenceChangedListener {

private static JosmUserIdentityManager instance;

Expand Down
1 change: 1 addition & 0 deletions src/org/openstreetmap/josm/gui/MainMenu.java
Expand Up @@ -946,6 +946,7 @@ static class PresetsMenuEnabler implements MapView.LayerChangeListener {
MapView.addLayerChangeListener(this);
this.presetsMenu = presetsMenu;
}

/**
* Refreshes the enabled state
*/
Expand Down
1 change: 1 addition & 0 deletions src/org/openstreetmap/josm/gui/MapFrame.java
Expand Up @@ -688,6 +688,7 @@ public static void addMapModeChangeListener(MapModeChangeListener listener) {
mapModeChangeListeners.addIfAbsent(listener);
}
}

/**
* Removes a mapMode change listener
*
Expand Down
12 changes: 7 additions & 5 deletions src/org/openstreetmap/josm/gui/MapStatus.java
Expand Up @@ -494,7 +494,8 @@ private void popupHidePopup() {
@Override
public void run() {
staticPopup.hide();
}});
}
});
}

/**
Expand All @@ -518,10 +519,11 @@ public void run() {
} else {
// There is no old popup
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
staticPopup.show();
}});
@Override
public void run() {
staticPopup.show();
}
});
}
this.popupLabels = lbls;
this.popup = newPopup;
Expand Down
1 change: 1 addition & 0 deletions src/org/openstreetmap/josm/gui/SelectionManager.java
Expand Up @@ -180,6 +180,7 @@ public void propertyChange(PropertyChangeEvent evt) {
});
eventSource.addTemporaryLayer(selectionHintLayer);
}

/**
* Unregister itself from the given event source and hide the selection hint layer.
*
Expand Down
Expand Up @@ -79,7 +79,7 @@
* f.setVisible(true);
* </pre>
*/
public class TileSelectionBBoxChooser extends JPanel implements BBoxChooser{
public class TileSelectionBBoxChooser extends JPanel implements BBoxChooser {

/** the current bounding box */
private transient Bounds bbox;
Expand Down Expand Up @@ -216,7 +216,7 @@ public void propertyChange(PropertyChangeEvent evt) {
* when the user successfully enters a valid tile grid specification.
*
*/
private static class TileGridInputPanel extends JPanel implements PropertyChangeListener{
private static class TileGridInputPanel extends JPanel implements PropertyChangeListener {
public static final String TILE_BOUNDS_PROP = TileGridInputPanel.class.getName() + ".tileBounds";

private JosmTextField tfMaxY;
Expand Down
Expand Up @@ -6,7 +6,7 @@
import javax.swing.table.DefaultTableColumnModel;
import javax.swing.table.TableColumn;

public class RelationMemberListColumnModel extends DefaultTableColumnModel{
public class RelationMemberListColumnModel extends DefaultTableColumnModel {

protected final void createColumns() {
TableColumn col = null;
Expand Down
Expand Up @@ -43,6 +43,7 @@ public class MultiValueCellEditor extends AbstractCellEditor implements TableCel
public interface NavigationListener {
/** Call when need to go to next row */
void gotoNextDecision();

/** Call when need to go to previous row */
void gotoPreviousDecision();
}
Expand Down
Expand Up @@ -6,7 +6,7 @@
import javax.swing.table.DefaultTableColumnModel;
import javax.swing.table.TableColumn;

public class TagConflictResolverColumnModel extends DefaultTableColumnModel{
public class TagConflictResolverColumnModel extends DefaultTableColumnModel {

protected final void createColumns() {
TableColumn col = null;
Expand Down

0 comments on commit 6f420f6

Please sign in to comment.