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/dialogs/MapPaintDialog.java

    r8379 r8426  
    9999    protected JCheckBox cbWireframe;
    100100
     101    /**
     102     * Action that opens the map paint preferences.
     103     */
    101104    public static final JosmAction PREFERENCE_ACTION = PreferencesAction.forPreferenceSubTab(
    102105            tr("Map paint preferences"), null, MapPaintPreference.class, /* ICON */ "dialogs/mappaintpreference");
     
    118121        JLabel wfLabel = new JLabel(tr("Wireframe View"), ImageProvider.get("dialogs/mappaint", "wireframe_small"), JLabel.HORIZONTAL);
    119122        wfLabel.setFont(wfLabel.getFont().deriveFont(Font.PLAIN));
     123        wfLabel.setLabelFor(cbWireframe);
    120124
    121125        cbWireframe.setModel(new DefaultButtonModel() {
     
    208212    protected class StylesModel extends AbstractTableModel implements MapPaintSylesUpdateListener {
    209213
     214        private final Class<?>[] columnClasses = {Boolean.class, StyleSource.class};
     215
    210216        private transient List<StyleSource> data = new ArrayList<>();
    211217
     218        /**
     219         * Constructs a new {@code StylesModel}.
     220         */
    212221        public StylesModel() {
    213222            data = new ArrayList<>(MapPaintStyles.getStyles().getStyleSources());
     
    240249            return column == 0;
    241250        }
    242 
    243         private Class<?>[] columnClasses = {Boolean.class, StyleSource.class};
    244251
    245252        @Override
     
    286293    private class MyCheckBoxRenderer extends JCheckBox implements TableCellRenderer {
    287294
     295        /**
     296         * Constructs a new {@code MyCheckBoxRenderer}.
     297         */
    288298        public MyCheckBoxRenderer() {
    289299            setHorizontalAlignment(SwingConstants.CENTER);
     
    318328
    319329    protected class OnOffAction extends AbstractAction implements ListSelectionListener {
     330        /**
     331         * Constructs a new {@code OnOffAction}.
     332         */
    320333        public OnOffAction() {
    321334            putValue(NAME, tr("On/Off"));
     
    352365        private final int increment;
    353366
     367        /**
     368         * Constructs a new {@code MoveUpDownAction}.
     369         * @param isDown {@code true} to move the entry down, {@code false} to move it up
     370         */
    354371        public MoveUpDownAction(boolean isDown) {
    355372            increment = isDown ? 1 : -1;
     
    384401
    385402    protected class ReloadAction extends AbstractAction implements ListSelectionListener {
     403        /**
     404         * Constructs a new {@code ReloadAction}.
     405         */
    386406        public ReloadAction() {
    387407            putValue(NAME, tr("Reload from file"));
     
    425445                        }
    426446                    });
    427 
    428447                }
    429448            });
     
    433452    protected class SaveAsAction extends AbstractAction {
    434453
     454        /**
     455         * Constructs a new {@code SaveAsAction}.
     456         */
    435457        public SaveAsAction() {
    436458            putValue(NAME, tr("Save as..."));
     
    523545    }
    524546
     547    /**
     548     * Displays information about selected paint style in a new dialog.
     549     */
    525550    protected class InfoAction extends AbstractAction {
    526551
     
    528553        private boolean sourceTabLoaded;
    529554
     555        /**
     556         * Constructs a new {@code InfoAction}.
     557         */
    530558        public InfoAction() {
    531559            putValue(NAME, tr("Info"));
Note: See TracChangeset for help on using the changeset viewer.