Ignore:
Timestamp:
2010-01-13T20:15:02+01:00 (14 years ago)
Author:
mjulius
Message:

fix messages for gui

File:
1 edited

Legend:

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

    r2512 r2850  
    1515
    1616import javax.swing.JCheckBox;
     17
     18import org.openstreetmap.josm.tools.CheckParameterUtil;
    1719
    1820/**
     
    7375     */
    7476    protected void setParticipatingInSynchronizedScrolling(Adjustable adjustable, boolean isParticipating) {
    75         if (adjustable == null)
    76             throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "adjustable"));
    77 
     77        CheckParameterUtil.ensureParameterNotNull(adjustable, "adjustable");
    7878        if (! synchronizedAdjustables.contains(adjustable))
    79             throw new IllegalStateException(tr("Adjustable {0} not registered yet. Can't set participation in synchronized adjustment.", adjustable));
     79            throw new IllegalStateException(tr("Adjustable {0} not registered yet. Cannot set participation in synchronized adjustment.", adjustable));
    8080
    8181        enabledMap.put(adjustable, isParticipating);
     
    113113     * @exception IllegalArgumentException thrown, if adjustable is null
    114114     */
    115     protected void adapt(final JCheckBox view, final Adjustable adjustable) throws IllegalArgumentException, IllegalStateException {
    116         if (adjustable == null)
    117             throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "adjustable"));
    118         if (view == null)
    119             throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "view"));
     115    protected void adapt(final JCheckBox view, final Adjustable adjustable) throws IllegalStateException {
     116        CheckParameterUtil.ensureParameterNotNull(adjustable, "adjustable");
     117        CheckParameterUtil.ensureParameterNotNull(view, "view");
    120118
    121119        if (! synchronizedAdjustables.contains(adjustable)) {
Note: See TracChangeset for help on using the changeset viewer.