Ignore:
Timestamp:
2016-01-15T01:31:57+01:00 (9 years ago)
Author:
Don-vip
Message:

session - refactor duplicated code, add javadoc, fix warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/session/OsmDataSessionExporter.java

    r9215 r9455  
    2222import java.net.URL;
    2323import java.nio.charset.StandardCharsets;
    24 import java.util.Collection;
    25 import java.util.Collections;
    2624
    2725import javax.swing.AbstractAction;
    2826import javax.swing.ButtonGroup;
    2927import javax.swing.JButton;
    30 import javax.swing.JCheckBox;
    3128import javax.swing.JLabel;
    3229import javax.swing.JPanel;
     
    3532
    3633import org.openstreetmap.josm.actions.SaveAction;
    37 import org.openstreetmap.josm.gui.layer.Layer;
    3834import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    3935import org.openstreetmap.josm.gui.util.GuiHelper;
     
    4642import org.w3c.dom.Element;
    4743
    48 public class OsmDataSessionExporter implements SessionLayerExporter {
    49 
    50     private final OsmDataLayer layer;
     44/**
     45 * Session exporter for {@link OsmDataLayer}.
     46 * @since 4685
     47 */
     48public class OsmDataSessionExporter extends AbstractSessionExporter<OsmDataLayer> {
     49
    5150    private JRadioButton link;
    5251    private JRadioButton include;
    53     private JCheckBox export;
    5452
    5553    /**
     
    5856     */
    5957    public OsmDataSessionExporter(OsmDataLayer layer) {
    60         this.layer = layer;
    61     }
    62 
    63     @Override
    64     public Collection<Layer> getDependencies() {
    65         return Collections.emptySet();
     58        super(layer);
    6659    }
    6760
     
    9386        final JPanel p = new JPanel(new GridBagLayout());
    9487        JPanel topRow = new JPanel(new GridBagLayout());
    95         export = new JCheckBox();
    9688        export.setSelected(true);
    9789        final JLabel lbl = new JLabel(layer.getName(), layer.getIcon(), SwingConstants.LEFT);
     
    182174
    183175    @Override
    184     public boolean shallExport() {
    185         return export.isSelected();
    186     }
    187 
    188     @Override
    189176    public boolean requiresZip() {
    190177        return include.isSelected();
Note: See TracChangeset for help on using the changeset viewer.