Changeset 17518 in josm


Ignore:
Timestamp:
2021-02-22T00:07:10+01:00 (10 days ago)
Author:
Don-vip
Message:

spotbugs - SF_SWITCH_NO_DEFAULT

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/history/NodeListTableCellRenderer.java

    r16490 r17518  
    1818/**
    1919 * A {@link TableCellRenderer} for the {@link NodeListViewer}.
    20  * 
     20 *
    2121 * Renders information about a node when comparing the node list of two
    2222 * historical versions of a way.
     
    2424public class NodeListTableCellRenderer extends JLabel implements TableCellRenderer {
    2525
     26    /** Color of selected background */
    2627    public static final Color BGCOLOR_SELECTED = new Color(143, 170, 255);
    2728
     
    6364    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus,
    6465            int row, int column) {
    65 
    6666        if (value == null) return this;
    6767        TwoColumnDiff.Item item = (TwoColumnDiff.Item) value;
    6868        GuiHelper.setBackgroundReadable(this, item.state.getColor(isSelected, hasFocus));
    69         switch(column) {
    70         case NodeListTableColumnModel.INDEX_COLUMN:
     69        if (column == NodeListTableColumnModel.INDEX_COLUMN) {
    7170            renderIndex((DiffTableModel) table.getModel(), row);
    72             break;
    73         case NodeListTableColumnModel.NODE_COLUMN:
     71        } else if (column == NodeListTableColumnModel.NODE_COLUMN) {
    7472            renderNode(item);
    75             break;
    7673        }
    7774        return this;
Note: See TracChangeset for help on using the changeset viewer.