Changeset 9478 in josm


Ignore:
Timestamp:
2016-01-16T01:24:40+01:00 (9 years ago)
Author:
Don-vip
Message:

see #12363 - javadoc/checkstyle

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java

    r9464 r9478  
    2222import java.io.File;
    2323import java.io.IOException;
    24 import java.lang.reflect.Field;
    2524import java.net.MalformedURLException;
    2625import java.net.URL;
    2726import java.text.SimpleDateFormat;
     27import java.util.ArrayList;
    2828import java.util.Arrays;
    29 import java.util.ArrayList;
    3029import java.util.Collections;
    3130import java.util.Comparator;
     
    4241import javax.swing.Action;
    4342import javax.swing.BorderFactory;
    44 import javax.swing.DefaultButtonModel;
    4543import javax.swing.JCheckBoxMenuItem;
    4644import javax.swing.JLabel;
     
    8886import org.openstreetmap.josm.io.WMSLayerImporter;
    8987import org.openstreetmap.josm.tools.GBC;
    90 import org.openstreetmap.josm.gui.widgets.PopupMenuLauncher;
    9188
    9289/**
     
    377374    }
    378375
    379     private class LoadTileAction extends AbstractAction {
     376    private final class LoadTileAction extends AbstractAction {
    380377
    381378        private LoadTileAction() {
     
    431428        }
    432429
     430        @Override
    433431        public Component createMenuComponent() {
    434432            JCheckBoxMenuItem item = new JCheckBoxMenuItem(this);
     
    454452        }
    455453
     454        @Override
    456455        public Component createMenuComponent() {
    457456            JCheckBoxMenuItem item = new JCheckBoxMenuItem(this);
     
    582581            this.t = t;
    583582        }
    584     }
    585 
    586     private class BooleanButtonModel extends DefaultButtonModel {
    587         private final Field field;
    588 
    589         BooleanButtonModel(Field field) {
    590             this.field = field;
    591         }
    592 
    593         @Override
    594         public boolean isSelected() {
    595             try {
    596                 return field.getBoolean(AbstractTileSourceLayer.this);
    597             } catch (IllegalArgumentException | IllegalAccessException e) {
    598                 throw new RuntimeException(e);
    599             }
    600         }
    601 
    602583    }
    603584
     
    662643    }
    663644
     645    /**
     646     * Tile source layer popup menu.
     647     */
    664648    public class TileSourceLayerPopup extends JPopupMenu {
     649        /**
     650         * Constructs a new {@code TileSourceLayerPopup}.
     651         */
    665652        public TileSourceLayerPopup() {
    666 
    667653            for (Action a : getCommonEntries()) {
    668654                if (a instanceof LayerAction) {
     
    16501636    }
    16511637
     1638    /**
     1639     * Returns the common menu entries.
     1640     * @return the common menu entries
     1641     */
    16521642    public Action[] getCommonEntries() {
    16531643        return new Action[] {
     
    17591749    public void downloadAreaToCache(final PrecacheTask precacheTask, List<LatLon> points, double bufferX, double bufferY) {
    17601750        final Set<Tile> requestedTiles = new ConcurrentSkipListSet<>(new Comparator<Tile>() {
     1751            @Override
    17611752            public int compare(Tile o1, Tile o2) {
    17621753                return String.CASE_INSENSITIVE_ORDER.compare(o1.getKey(), o2.getKey());
Note: See TracChangeset for help on using the changeset viewer.