Ignore:
Timestamp:
2017-05-03T14:42:49+02:00 (7 years ago)
Author:
michael2402
Message:

Make TagMerger use the row based layout. Make merge buttons higher and easier to hit."

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/AbstractMergePanel.java

    r12044 r12047  
    77import java.util.List;
    88
     9import javax.swing.AbstractAction;
     10import javax.swing.JButton;
    911import javax.swing.JComponent;
    1012import javax.swing.JLabel;
     
    152154    }
    153155
     156    /**
     157     * Add the undecide button to the middle of the merged row.
     158     */
     159    protected abstract static class AbstractUndecideRow extends AbstractMergePanel.MergeRow {
     160        @Override
     161        protected JComponent merged() {
     162            AbstractAction actUndecide = createAction();
     163            JButton button = new JButton(actUndecide);
     164            button.setName(getButtonName());
     165            return button;
     166        }
     167
     168        protected abstract AbstractAction createAction();
     169
     170        protected abstract String getButtonName();
     171
     172        @Override
     173        protected void addConstraints(GBC constraints, int columnIndex) {
     174            super.addConstraints(constraints, columnIndex);
     175            constraints.fill(GBC.NONE);
     176        }
     177    }
     178
     179    /**
     180     * The current row counter. Used when adding new rows.
     181     */
    154182    protected int currentRow = 0;
    155183
Note: See TracChangeset for help on using the changeset viewer.