Ignore:
Timestamp:
2015-05-26T01:37:50+02:00 (9 years ago)
Author:
Don-vip
Message:

Accessibility - global use of JLabel.setLabelFor() + various fixes (javadoc, code style)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/io/UploadedObjectsSummaryPanel.java

    r8308 r8426  
    2020
    2121/**
    22  * This panel displays a summary of the objects to upload. It is displayed in
    23  * the upper part of the {@link UploadDialog}.
    24  *
     22 * This panel displays a summary of the objects to upload. It is displayed in the upper part of the {@link UploadDialog}.
     23 * @since 2599
    2524 */
    2625public class UploadedObjectsSummaryPanel extends JPanel {
     
    4039    private JScrollPane spDelete;
    4140
     41    /**
     42     * Constructs a new {@code UploadedObjectsSummaryPanel}.
     43     */
     44    public UploadedObjectsSummaryPanel() {
     45        build();
     46    }
     47
    4248    protected void build() {
    4349        setLayout(new GridBagLayout());
    4450        OsmPrimitivRenderer renderer = new OsmPrimitivRenderer();
    45         // initialize the three lists for uploaded primitives, but don't add
    46         // them to the dialog yet,  see setUploadedPrimitives()
     51        // initialize the three lists for uploaded primitives, but don't add them to the dialog yet, see setUploadedPrimitives()
    4752        //
    4853        lstAdd = new PrimitiveList();
     
    5156        spAdd = new JScrollPane(lstAdd);
    5257        lblAdd = new JLabel(tr("Objects to add:"));
     58        lblAdd.setLabelFor(lstAdd);
    5359
    5460        lstUpdate = new PrimitiveList();
     
    5763        spUpdate = new JScrollPane(lstUpdate);
    5864        lblUpdate = new JLabel(tr("Objects to modify:"));
     65        lblUpdate.setLabelFor(lstUpdate);
    5966
    6067        lstDelete = new PrimitiveList();
     
    6370        spDelete = new JScrollPane(lstDelete);
    6471        lblDelete = new JLabel(tr("Objects to delete:"));
     72        lblDelete.setLabelFor(lstDelete);
    6573    }
    6674
     
    121129    }
    122130
    123     public UploadedObjectsSummaryPanel() {
    124         build();
    125     }
    126 
    127131    /**
    128132     * Replies the number of objects to upload
     
    138142    /**
    139143     * A simple list of OSM primitives.
    140      *
    141144     */
    142145    static class PrimitiveList extends JList<OsmPrimitive> {
     146        /**
     147         * Constructs a new {@code PrimitiveList}.
     148         */
    143149        public PrimitiveList() {
    144150            super(new PrimitiveListModel());
     
    152158    /**
    153159     * A list model for a list of OSM primitives.
    154      *
    155160     */
    156161    static class PrimitiveListModel extends AbstractListModel<OsmPrimitive> {
    157162        private transient List<OsmPrimitive> primitives;
    158163
     164        /**
     165         * Constructs a new {@code PrimitiveListModel}.
     166         */
    159167        public PrimitiveListModel() {
    160168            primitives = new ArrayList<>();
Note: See TracChangeset for help on using the changeset viewer.