Changeset 3711 in josm


Ignore:
Timestamp:
2010-12-11T12:48:20+01:00 (11 years ago)
Author:
bastiK
Message:

minor change needed for terracer plugin

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

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

    r3675 r3711  
    7171    private List<Integer> cancelButtonIdx = Collections.emptyList();
    7272    private int defaultButtonIdx = 1;
    73     private JButton defaultButton = null;
     73    protected JButton defaultButton = null;
    7474    private Icon icon;
    7575    private boolean modal;
  • trunk/src/org/openstreetmap/josm/tools/Utils.java

    r3674 r3711  
    2727        }
    2828    }
     29
     30    /**
     31     * return the modulus in the range [0, n)
     32     */
     33    public static int mod(int a, int n) {
     34        if (n <= 0)
     35            throw new IllegalArgumentException();
     36        int res = a % n;
     37        if (res < 0) {
     38            res += n;
     39        }
     40        return res;
     41    }
     42
    2943}
Note: See TracChangeset for help on using the changeset viewer.