Changeset 2181 in josm for trunk/src/org/openstreetmap/josm/gui/history
- Timestamp:
- 2009-09-22T15:34:19+02:00 (14 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/history
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/history/AdjustmentSynchronizer.java
r2165 r2181 76 76 protected void setParticipatingInSynchronizedScrolling(Adjustable adjustable, boolean isParticipating) { 77 77 if (adjustable == null) 78 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "adjustable"));78 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "adjustable")); 79 79 80 80 if (! synchronizedAdjustables.contains(adjustable)) 81 throw new IllegalStateException(tr(" adjustable {0} not registered yet. Can't set participation in synchronized adjustment",adjustable));81 throw new IllegalStateException(tr("Adjustable {0} not registered yet. Can't set participation in synchronized adjustment.", adjustable)); 82 82 83 83 enabledMap.put(adjustable, isParticipating); … … 94 94 protected boolean isParticipatingInSynchronizedScrolling(Adjustable adjustable) throws IllegalStateException { 95 95 if (! synchronizedAdjustables.contains(adjustable)) 96 throw new IllegalStateException(tr(" adjustable {0} not registered yet",adjustable));96 throw new IllegalStateException(tr("Adjustable {0} not registered yet.", adjustable)); 97 97 98 98 return enabledMap.get(adjustable); … … 117 117 protected void adapt(final JCheckBox view, final Adjustable adjustable) throws IllegalArgumentException, IllegalStateException { 118 118 if (adjustable == null) 119 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "adjustable"));119 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "adjustable")); 120 120 if (view == null) 121 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "view"));121 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "view")); 122 122 123 123 if (! synchronizedAdjustables.contains(adjustable)) { -
trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java
r2044 r2181 140 140 public TagTableModel getTagTableModel(PointInTimeType pointInTimeType) throws IllegalArgumentException { 141 141 if (pointInTimeType == null) 142 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "pointInTimeType"));142 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "pointInTimeType")); 143 143 if (pointInTimeType.equals(PointInTimeType.CURRENT_POINT_IN_TIME)) 144 144 return currentTagTableModel; … … 152 152 public NodeListTableModel getNodeListTableModel(PointInTimeType pointInTimeType) throws IllegalArgumentException { 153 153 if (pointInTimeType == null) 154 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "pointInTimeType"));154 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "pointInTimeType")); 155 155 if (pointInTimeType.equals(PointInTimeType.CURRENT_POINT_IN_TIME)) 156 156 return currentNodeListTableModel; … … 164 164 public RelationMemberTableModel getRelationMemberTableModel(PointInTimeType pointInTimeType) throws IllegalArgumentException { 165 165 if (pointInTimeType == null) 166 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "pointInTimeType"));166 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "pointInTimeType")); 167 167 if (pointInTimeType.equals(PointInTimeType.CURRENT_POINT_IN_TIME)) 168 168 return currentRelationMemberTableModel; … … 176 176 public void setReferencePointInTime(HistoryOsmPrimitive reference) throws IllegalArgumentException, IllegalStateException{ 177 177 if (reference == null) 178 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "reference"));178 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "reference")); 179 179 if (history == null) 180 throw new IllegalStateException(tr(" history not initialized yet. Failed to set reference primitive."));180 throw new IllegalStateException(tr("History not initialized yet. Failed to set reference primitive.")); 181 181 if (reference.getId() != history.getId()) 182 throw new IllegalArgumentException(tr(" failed to set reference. reference id {0} doesn't match history id {1}", reference.getId(), history.getId()));182 throw new IllegalArgumentException(tr("Failed to set reference. Reference ID {0} does not match history ID {1}.", reference.getId(), history.getId())); 183 183 HistoryOsmPrimitive primitive = history.getByVersion(reference.getVersion()); 184 184 if (primitive == null) 185 throw new IllegalArgumentException(tr(" failed to set reference. reference version {0} not available in history", reference.getVersion()));185 throw new IllegalArgumentException(tr("Failed to set reference. Reference version {0} not available in history.", reference.getVersion())); 186 186 187 187 this.reference = reference; … … 195 195 public void setCurrentPointInTime(HistoryOsmPrimitive current) throws IllegalArgumentException, IllegalStateException{ 196 196 if (current == null) 197 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "current"));197 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "current")); 198 198 if (history == null) 199 throw new IllegalStateException(tr(" history not initialized yet. Failed to set current primitive."));199 throw new IllegalStateException(tr("History not initialized yet. Failed to set current primitive.")); 200 200 if (current.getId() != history.getId()) 201 throw new IllegalArgumentException(tr(" failed to set reference. reference id {0} doesn't match history id {1}", current.getId(), history.getId()));201 throw new IllegalArgumentException(tr("Hailed to set reference. Reference ID {0} does not match history ID {1}.", current.getId(), history.getId())); 202 202 HistoryOsmPrimitive primitive = history.getByVersion(current.getVersion()); 203 203 if (primitive == null) 204 throw new IllegalArgumentException(tr(" failed to set current. current version {0} not available in history", current.getVersion()));204 throw new IllegalArgumentException(tr("Failed to set current primitive. Current version {0} not available in history.", current.getVersion())); 205 205 this.current = current; 206 206 initTagTableModels(); … … 238 238 public HistoryOsmPrimitive getPointInTime(PointInTimeType type) throws IllegalArgumentException { 239 239 if (type == null) 240 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "type"));240 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "type")); 241 241 if (type.equals(PointInTimeType.CURRENT_POINT_IN_TIME)) 242 242 return current; -
trunk/src/org/openstreetmap/josm/gui/history/HistoryLoadTask.java
r2070 r2181 38 38 public HistoryLoadTask add(long id, OsmPrimitiveType type) { 39 39 if (id <= 0) 40 throw new IllegalArgumentException(tr(" id > 0 expected, got {0}", id));40 throw new IllegalArgumentException(tr("ID > 0 expected. Got {0}.", id)); 41 41 if (type == null) 42 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "type"));42 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "type")); 43 43 if (!toLoad.containsKey(id)) { 44 44 toLoad.put(id, type); … … 49 49 public HistoryLoadTask add(HistoryOsmPrimitive primitive) { 50 50 if (primitive == null) 51 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "primitive"));51 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "primitive")); 52 52 if (!toLoad.containsKey(primitive.getId())) { 53 53 toLoad.put(primitive.getId(), primitive.getType()); … … 58 58 public HistoryLoadTask add(History history) { 59 59 if (history == null) 60 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "history"));60 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "history")); 61 61 if (!toLoad.containsKey(history.getId())) { 62 62 toLoad.put(history.getId(), history.getEarliest().getType()); … … 67 67 public HistoryLoadTask add(OsmPrimitive primitive) { 68 68 if (primitive == null) 69 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "primitive"));69 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "primitive")); 70 70 return add(primitive.getId(), OsmPrimitiveType.from(primitive)); 71 71 } … … 73 73 public HistoryLoadTask add(Collection<? extends OsmPrimitive> primitives) { 74 74 if (primitives == null) 75 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "primitives"));75 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "primitives")); 76 76 for (OsmPrimitive primitive: primitives) { 77 77 if (primitive == null) { -
trunk/src/org/openstreetmap/josm/gui/history/VersionInfoPanel.java
r2096 r2181 74 74 public VersionInfoPanel(HistoryBrowserModel model, PointInTimeType pointInTimeType) throws IllegalArgumentException { 75 75 if (pointInTimeType == null) 76 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "pointInTimeType"));76 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "pointInTimeType")); 77 77 if (model == null) 78 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "model"));78 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "model")); 79 79 80 80 this.model = model;
Note:
See TracChangeset
for help on using the changeset viewer.