| 1 | // License: GPL. For details, see LICENSE file.
|
|---|
| 2 | package org.openstreetmap.josm;
|
|---|
| 3 |
|
|---|
| 4 | import static org.junit.Assert.fail;
|
|---|
| 5 |
|
|---|
| 6 | import java.awt.Canvas;
|
|---|
| 7 | import java.awt.Color;
|
|---|
| 8 | import java.awt.Component;
|
|---|
| 9 | import java.awt.Composite;
|
|---|
| 10 | import java.awt.Font;
|
|---|
| 11 | import java.awt.FontMetrics;
|
|---|
| 12 | import java.awt.Graphics;
|
|---|
| 13 | import java.awt.Graphics2D;
|
|---|
| 14 | import java.awt.GraphicsConfiguration;
|
|---|
| 15 | import java.awt.Image;
|
|---|
| 16 | import java.awt.Paint;
|
|---|
| 17 | import java.awt.Rectangle;
|
|---|
| 18 | import java.awt.RenderingHints;
|
|---|
| 19 | import java.awt.RenderingHints.Key;
|
|---|
| 20 | import java.awt.Shape;
|
|---|
| 21 | import java.awt.Stroke;
|
|---|
| 22 | import java.awt.font.FontRenderContext;
|
|---|
| 23 | import java.awt.font.GlyphVector;
|
|---|
| 24 | import java.awt.geom.AffineTransform;
|
|---|
| 25 | import java.awt.image.BufferedImage;
|
|---|
| 26 | import java.awt.image.BufferedImageOp;
|
|---|
| 27 | import java.awt.image.ImageObserver;
|
|---|
| 28 | import java.awt.image.RenderedImage;
|
|---|
| 29 | import java.awt.image.renderable.RenderableImage;
|
|---|
| 30 | import java.io.File;
|
|---|
| 31 | import java.io.IOException;
|
|---|
| 32 | import java.io.InputStream;
|
|---|
| 33 | import java.text.AttributedCharacterIterator;
|
|---|
| 34 | import java.util.Arrays;
|
|---|
| 35 | import java.util.Comparator;
|
|---|
| 36 | import java.util.Map;
|
|---|
| 37 |
|
|---|
| 38 | import org.openstreetmap.josm.gui.progress.AbstractProgressMonitor;
|
|---|
| 39 | import org.openstreetmap.josm.gui.progress.CancelHandler;
|
|---|
| 40 | import org.openstreetmap.josm.gui.progress.ProgressMonitor;
|
|---|
| 41 | import org.openstreetmap.josm.gui.progress.ProgressTaskId;
|
|---|
| 42 | import org.openstreetmap.josm.io.Compression;
|
|---|
| 43 |
|
|---|
| 44 | /**
|
|---|
| 45 | * Various utils, useful for unit tests.
|
|---|
| 46 | */
|
|---|
| 47 | public final class TestUtils {
|
|---|
| 48 |
|
|---|
| 49 | private TestUtils() {
|
|---|
| 50 | // Hide constructor for utility classes
|
|---|
| 51 | }
|
|---|
| 52 |
|
|---|
| 53 | /**
|
|---|
| 54 | * Returns the path to test data root directory.
|
|---|
| 55 | * @return path to test data root directory
|
|---|
| 56 | */
|
|---|
| 57 | public static String getTestDataRoot() {
|
|---|
| 58 | String testDataRoot = System.getProperty("josm.test.data");
|
|---|
| 59 | if (testDataRoot == null || testDataRoot.isEmpty()) {
|
|---|
| 60 | testDataRoot = "test/data";
|
|---|
| 61 | System.out.println("System property josm.test.data is not set, using '" + testDataRoot + "'");
|
|---|
| 62 | }
|
|---|
| 63 | return testDataRoot.endsWith("/") ? testDataRoot : testDataRoot + "/";
|
|---|
| 64 | }
|
|---|
| 65 |
|
|---|
| 66 | /**
|
|---|
| 67 | * Gets path to test data directory for given ticket id.
|
|---|
| 68 | * @param ticketid Ticket numeric identifier
|
|---|
| 69 | * @return path to test data directory for given ticket id
|
|---|
| 70 | */
|
|---|
| 71 | public static String getRegressionDataDir(int ticketid) {
|
|---|
| 72 | return TestUtils.getTestDataRoot() + "/regress/" + ticketid;
|
|---|
| 73 | }
|
|---|
| 74 |
|
|---|
| 75 | /**
|
|---|
| 76 | * Gets path to given file in test data directory for given ticket id.
|
|---|
| 77 | * @param ticketid Ticket numeric identifier
|
|---|
| 78 | * @param filename File name
|
|---|
| 79 | * @return path to given file in test data directory for given ticket id
|
|---|
| 80 | */
|
|---|
| 81 | public static String getRegressionDataFile(int ticketid, String filename) {
|
|---|
| 82 | return getRegressionDataDir(ticketid) + '/' + filename;
|
|---|
| 83 | }
|
|---|
| 84 |
|
|---|
| 85 | /**
|
|---|
| 86 | * Gets input stream to given file in test data directory for given ticket id.
|
|---|
| 87 | * @param ticketid Ticket numeric identifier
|
|---|
| 88 | * @param filename File name
|
|---|
| 89 | * @return path to given file in test data directory for given ticket id
|
|---|
| 90 | * @throws IOException if any I/O error occurs
|
|---|
| 91 | */
|
|---|
| 92 | public static InputStream getRegressionDataStream(int ticketid, String filename) throws IOException {
|
|---|
| 93 | return Compression.getUncompressedFileInputStream(new File(getRegressionDataDir(ticketid) + '/' + filename));
|
|---|
| 94 | }
|
|---|
| 95 |
|
|---|
| 96 | /**
|
|---|
| 97 | * Checks that the given Comparator respects its contract on the given table.
|
|---|
| 98 | * @param <T> type of elements
|
|---|
| 99 | * @param comparator The comparator to test
|
|---|
| 100 | * @param array The array sorted for test purpose
|
|---|
| 101 | */
|
|---|
| 102 | public static <T> void checkComparableContract(Comparator<T> comparator, T[] array) {
|
|---|
| 103 | System.out.println("Validating Comparable contract on array of "+array.length+" elements");
|
|---|
| 104 | // Check each compare possibility
|
|---|
| 105 | for (int i = 0; i < array.length; i++) {
|
|---|
| 106 | T r1 = array[i];
|
|---|
| 107 | for (int j = i; j < array.length; j++) {
|
|---|
| 108 | T r2 = array[j];
|
|---|
| 109 | int a = comparator.compare(r1, r2);
|
|---|
| 110 | int b = comparator.compare(r2, r1);
|
|---|
| 111 | if (i == j || a == b) {
|
|---|
| 112 | if (a != 0 || b != 0) {
|
|---|
| 113 | fail(getFailMessage(r1, r2, a, b));
|
|---|
| 114 | }
|
|---|
| 115 | } else {
|
|---|
| 116 | if (a != -b) {
|
|---|
| 117 | fail(getFailMessage(r1, r2, a, b));
|
|---|
| 118 | }
|
|---|
| 119 | }
|
|---|
| 120 | for (int k = j; k < array.length; k++) {
|
|---|
| 121 | T r3 = array[k];
|
|---|
| 122 | int c = comparator.compare(r1, r3);
|
|---|
| 123 | int d = comparator.compare(r2, r3);
|
|---|
| 124 | if (a > 0 && d > 0) {
|
|---|
| 125 | if (c <= 0) {
|
|---|
| 126 | fail(getFailMessage(r1, r2, r3, a, b, c, d));
|
|---|
| 127 | }
|
|---|
| 128 | } else if (a == 0 && d == 0) {
|
|---|
| 129 | if (c != 0) {
|
|---|
| 130 | fail(getFailMessage(r1, r2, r3, a, b, c, d));
|
|---|
| 131 | }
|
|---|
| 132 | } else if (a < 0 && d < 0) {
|
|---|
| 133 | if (c >= 0) {
|
|---|
| 134 | fail(getFailMessage(r1, r2, r3, a, b, c, d));
|
|---|
| 135 | }
|
|---|
| 136 | }
|
|---|
| 137 | }
|
|---|
| 138 | }
|
|---|
| 139 | }
|
|---|
| 140 | // Sort relation array
|
|---|
| 141 | Arrays.sort(array, comparator);
|
|---|
| 142 | }
|
|---|
| 143 |
|
|---|
| 144 | private static <T> String getFailMessage(T o1, T o2, int a, int b) {
|
|---|
| 145 | return new StringBuilder("Compared\no1: ").append(o1).append("\no2: ")
|
|---|
| 146 | .append(o2).append("\ngave: ").append(a).append("/").append(b)
|
|---|
| 147 | .toString();
|
|---|
| 148 | }
|
|---|
| 149 |
|
|---|
| 150 | private static <T> String getFailMessage(T o1, T o2, T o3, int a, int b, int c, int d) {
|
|---|
| 151 | return new StringBuilder(getFailMessage(o1, o2, a, b))
|
|---|
| 152 | .append("\nCompared\no1: ").append(o1).append("\no3: ").append(o3).append("\ngave: ").append(c)
|
|---|
| 153 | .append("\nCompared\no2: ").append(o2).append("\no3: ").append(o3).append("\ngave: ").append(d)
|
|---|
| 154 | .toString();
|
|---|
| 155 | }
|
|---|
| 156 |
|
|---|
| 157 | /**
|
|---|
| 158 | * Returns the Java version as an int value.
|
|---|
| 159 | * @return the Java version as an int value (7, 8, 9, etc.)
|
|---|
| 160 | */
|
|---|
| 161 | public static int getJavaVersion() {
|
|---|
| 162 | String version = System.getProperty("java.version");
|
|---|
| 163 | if (version.startsWith("1.")) {
|
|---|
| 164 | version = version.substring(2);
|
|---|
| 165 | }
|
|---|
| 166 | // Allow these formats:
|
|---|
| 167 | // 1.7.0_91
|
|---|
| 168 | // 1.8.0_72-ea
|
|---|
| 169 | // 9-ea
|
|---|
| 170 | // 9
|
|---|
| 171 | // 9.0.1
|
|---|
| 172 | int dotPos = version.indexOf('.');
|
|---|
| 173 | int dashPos = version.indexOf('-');
|
|---|
| 174 | return Integer.parseInt(version.substring(0,
|
|---|
| 175 | dotPos > -1 ? dotPos : dashPos > -1 ? dashPos : 1));
|
|---|
| 176 | }
|
|---|
| 177 |
|
|---|
| 178 | /**
|
|---|
| 179 | * Returns an instance of {@link AbstractProgressMonitor} which keeps track of the monitor state,
|
|---|
| 180 | * but does not show the progress.
|
|---|
| 181 | * @return a progress monitor
|
|---|
| 182 | */
|
|---|
| 183 | public static ProgressMonitor newTestProgressMonitor() {
|
|---|
| 184 | return new AbstractProgressMonitor(new CancelHandler()) {
|
|---|
| 185 |
|
|---|
| 186 | @Override
|
|---|
| 187 | protected void doBeginTask() {
|
|---|
| 188 | }
|
|---|
| 189 |
|
|---|
| 190 | @Override
|
|---|
| 191 | protected void doFinishTask() {
|
|---|
| 192 | }
|
|---|
| 193 |
|
|---|
| 194 | @Override
|
|---|
| 195 | protected void doSetIntermediate(boolean value) {
|
|---|
| 196 | }
|
|---|
| 197 |
|
|---|
| 198 | @Override
|
|---|
| 199 | protected void doSetTitle(String title) {
|
|---|
| 200 | }
|
|---|
| 201 |
|
|---|
| 202 | @Override
|
|---|
| 203 | protected void doSetCustomText(String title) {
|
|---|
| 204 | }
|
|---|
| 205 |
|
|---|
| 206 | @Override
|
|---|
| 207 | protected void updateProgress(double value) {
|
|---|
| 208 | }
|
|---|
| 209 |
|
|---|
| 210 | @Override
|
|---|
| 211 | public void setProgressTaskId(ProgressTaskId taskId) {
|
|---|
| 212 | }
|
|---|
| 213 |
|
|---|
| 214 | @Override
|
|---|
| 215 | public ProgressTaskId getProgressTaskId() {
|
|---|
| 216 | return null;
|
|---|
| 217 | }
|
|---|
| 218 |
|
|---|
| 219 | @Override
|
|---|
| 220 | public Component getWindowParent() {
|
|---|
| 221 | return null;
|
|---|
| 222 | }
|
|---|
| 223 | };
|
|---|
| 224 | }
|
|---|
| 225 |
|
|---|
| 226 | // CHECKSTYLE.OFF: AnonInnerLength
|
|---|
| 227 | // CHECKSTYLE.OFF: MethodLength
|
|---|
| 228 | // CHECKSTYLE.OFF: ParameterNumber
|
|---|
| 229 |
|
|---|
| 230 | /**
|
|---|
| 231 | * Returns an instance of {@link Graphics2D}.
|
|---|
| 232 | * @return a mockup graphics instance
|
|---|
| 233 | */
|
|---|
| 234 | public static Graphics2D newGraphics() {
|
|---|
| 235 | return new Graphics2D() {
|
|---|
| 236 |
|
|---|
| 237 | @Override
|
|---|
| 238 | public void setXORMode(Color c1) {
|
|---|
| 239 | }
|
|---|
| 240 |
|
|---|
| 241 | @Override
|
|---|
| 242 | public void setPaintMode() {
|
|---|
| 243 | }
|
|---|
| 244 |
|
|---|
| 245 | @Override
|
|---|
| 246 | public void setFont(Font font) {
|
|---|
| 247 | }
|
|---|
| 248 |
|
|---|
| 249 | @Override
|
|---|
| 250 | public void setColor(Color c) {
|
|---|
| 251 | }
|
|---|
| 252 |
|
|---|
| 253 | @Override
|
|---|
| 254 | public void setClip(int x, int y, int width, int height) {
|
|---|
| 255 | }
|
|---|
| 256 |
|
|---|
| 257 | @Override
|
|---|
| 258 | public void setClip(Shape clip) {
|
|---|
| 259 | }
|
|---|
| 260 |
|
|---|
| 261 | @Override
|
|---|
| 262 | public FontMetrics getFontMetrics(Font f) {
|
|---|
| 263 | return new Canvas().getFontMetrics(getFont());
|
|---|
| 264 | }
|
|---|
| 265 |
|
|---|
| 266 | @Override
|
|---|
| 267 | public Font getFont() {
|
|---|
| 268 | return new Font(null, 0, 0);
|
|---|
| 269 | }
|
|---|
| 270 |
|
|---|
| 271 | @Override
|
|---|
| 272 | public Color getColor() {
|
|---|
| 273 | return null;
|
|---|
| 274 | }
|
|---|
| 275 |
|
|---|
| 276 | @Override
|
|---|
| 277 | public Rectangle getClipBounds() {
|
|---|
| 278 | return null;
|
|---|
| 279 | }
|
|---|
| 280 |
|
|---|
| 281 | @Override
|
|---|
| 282 | public Shape getClip() {
|
|---|
| 283 | return null;
|
|---|
| 284 | }
|
|---|
| 285 |
|
|---|
| 286 | @Override
|
|---|
| 287 | public void fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight) {
|
|---|
| 288 | }
|
|---|
| 289 |
|
|---|
| 290 | @Override
|
|---|
| 291 | public void fillRect(int x, int y, int width, int height) {
|
|---|
| 292 | }
|
|---|
| 293 |
|
|---|
| 294 | @Override
|
|---|
| 295 | public void fillPolygon(int[] xPoints, int[] yPoints, int nPoints) {
|
|---|
| 296 | }
|
|---|
| 297 |
|
|---|
| 298 | @Override
|
|---|
| 299 | public void fillOval(int x, int y, int width, int height) {
|
|---|
| 300 | }
|
|---|
| 301 |
|
|---|
| 302 | @Override
|
|---|
| 303 | public void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle) {
|
|---|
| 304 | }
|
|---|
| 305 |
|
|---|
| 306 | @Override
|
|---|
| 307 | public void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight) {
|
|---|
| 308 | }
|
|---|
| 309 |
|
|---|
| 310 | @Override
|
|---|
| 311 | public void drawPolyline(int[] xPoints, int[] yPoints, int nPoints) {
|
|---|
| 312 | }
|
|---|
| 313 |
|
|---|
| 314 | @Override
|
|---|
| 315 | public void drawPolygon(int[] xPoints, int[] yPoints, int nPoints) {
|
|---|
| 316 | }
|
|---|
| 317 |
|
|---|
| 318 | @Override
|
|---|
| 319 | public void drawOval(int x, int y, int width, int height) {
|
|---|
| 320 | }
|
|---|
| 321 |
|
|---|
| 322 | @Override
|
|---|
| 323 | public void drawLine(int x1, int y1, int x2, int y2) {
|
|---|
| 324 | }
|
|---|
| 325 |
|
|---|
| 326 | @Override
|
|---|
| 327 | public boolean drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2,
|
|---|
| 328 | Color bgcolor, ImageObserver observer) {
|
|---|
| 329 | return false;
|
|---|
| 330 | }
|
|---|
| 331 |
|
|---|
| 332 | @Override
|
|---|
| 333 | public boolean drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2,
|
|---|
| 334 | ImageObserver observer) {
|
|---|
| 335 | return false;
|
|---|
| 336 | }
|
|---|
| 337 |
|
|---|
| 338 | @Override
|
|---|
| 339 | public boolean drawImage(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer) {
|
|---|
| 340 | return false;
|
|---|
| 341 | }
|
|---|
| 342 |
|
|---|
| 343 | @Override
|
|---|
| 344 | public boolean drawImage(Image img, int x, int y, int width, int height, ImageObserver observer) {
|
|---|
| 345 | return false;
|
|---|
| 346 | }
|
|---|
| 347 |
|
|---|
| 348 | @Override
|
|---|
| 349 | public boolean drawImage(Image img, int x, int y, Color bgcolor, ImageObserver observer) {
|
|---|
| 350 | return false;
|
|---|
| 351 | }
|
|---|
| 352 |
|
|---|
| 353 | @Override
|
|---|
| 354 | public boolean drawImage(Image img, int x, int y, ImageObserver observer) {
|
|---|
| 355 | return false;
|
|---|
| 356 | }
|
|---|
| 357 |
|
|---|
| 358 | @Override
|
|---|
| 359 | public void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle) {
|
|---|
| 360 | }
|
|---|
| 361 |
|
|---|
| 362 | @Override
|
|---|
| 363 | public void dispose() {
|
|---|
| 364 | }
|
|---|
| 365 |
|
|---|
| 366 | @Override
|
|---|
| 367 | public Graphics create() {
|
|---|
| 368 | return this;
|
|---|
| 369 | }
|
|---|
| 370 |
|
|---|
| 371 | @Override
|
|---|
| 372 | public void copyArea(int x, int y, int width, int height, int dx, int dy) {
|
|---|
| 373 | }
|
|---|
| 374 |
|
|---|
| 375 | @Override
|
|---|
| 376 | public void clipRect(int x, int y, int width, int height) {
|
|---|
| 377 | }
|
|---|
| 378 |
|
|---|
| 379 | @Override
|
|---|
| 380 | public void clearRect(int x, int y, int width, int height) {
|
|---|
| 381 | }
|
|---|
| 382 |
|
|---|
| 383 | @Override
|
|---|
| 384 | public void translate(double tx, double ty) {
|
|---|
| 385 | }
|
|---|
| 386 |
|
|---|
| 387 | @Override
|
|---|
| 388 | public void translate(int x, int y) {
|
|---|
| 389 | }
|
|---|
| 390 |
|
|---|
| 391 | @Override
|
|---|
| 392 | public void transform(AffineTransform Tx) {
|
|---|
| 393 | }
|
|---|
| 394 |
|
|---|
| 395 | @Override
|
|---|
| 396 | public void shear(double shx, double shy) {
|
|---|
| 397 | }
|
|---|
| 398 |
|
|---|
| 399 | @Override
|
|---|
| 400 | public void setTransform(AffineTransform Tx) {
|
|---|
| 401 | }
|
|---|
| 402 |
|
|---|
| 403 | @Override
|
|---|
| 404 | public void setStroke(Stroke s) {
|
|---|
| 405 | }
|
|---|
| 406 |
|
|---|
| 407 | @Override
|
|---|
| 408 | public void setRenderingHints(Map<?, ?> hints) {
|
|---|
| 409 | }
|
|---|
| 410 |
|
|---|
| 411 | @Override
|
|---|
| 412 | public void setRenderingHint(Key hintKey, Object hintValue) {
|
|---|
| 413 | }
|
|---|
| 414 |
|
|---|
| 415 | @Override
|
|---|
| 416 | public void setPaint(Paint paint) {
|
|---|
| 417 | }
|
|---|
| 418 |
|
|---|
| 419 | @Override
|
|---|
| 420 | public void setComposite(Composite comp) {
|
|---|
| 421 | }
|
|---|
| 422 |
|
|---|
| 423 | @Override
|
|---|
| 424 | public void setBackground(Color color) {
|
|---|
| 425 | }
|
|---|
| 426 |
|
|---|
| 427 | @Override
|
|---|
| 428 | public void scale(double sx, double sy) {
|
|---|
| 429 | }
|
|---|
| 430 |
|
|---|
| 431 | @Override
|
|---|
| 432 | public void rotate(double theta, double x, double y) {
|
|---|
| 433 | }
|
|---|
| 434 |
|
|---|
| 435 | @Override
|
|---|
| 436 | public void rotate(double theta) {
|
|---|
| 437 | }
|
|---|
| 438 |
|
|---|
| 439 | @Override
|
|---|
| 440 | public boolean hit(Rectangle rect, Shape s, boolean onStroke) {
|
|---|
| 441 | return false;
|
|---|
| 442 | }
|
|---|
| 443 |
|
|---|
| 444 | @Override
|
|---|
| 445 | public AffineTransform getTransform() {
|
|---|
| 446 | return null;
|
|---|
| 447 | }
|
|---|
| 448 |
|
|---|
| 449 | @Override
|
|---|
| 450 | public Stroke getStroke() {
|
|---|
| 451 | return null;
|
|---|
| 452 | }
|
|---|
| 453 |
|
|---|
| 454 | @Override
|
|---|
| 455 | public RenderingHints getRenderingHints() {
|
|---|
| 456 | return null;
|
|---|
| 457 | }
|
|---|
| 458 |
|
|---|
| 459 | @Override
|
|---|
| 460 | public Object getRenderingHint(Key hintKey) {
|
|---|
| 461 | return null;
|
|---|
| 462 | }
|
|---|
| 463 |
|
|---|
| 464 | @Override
|
|---|
| 465 | public Paint getPaint() {
|
|---|
| 466 | return null;
|
|---|
| 467 | }
|
|---|
| 468 |
|
|---|
| 469 | @Override
|
|---|
| 470 | public FontRenderContext getFontRenderContext() {
|
|---|
| 471 | return null;
|
|---|
| 472 | }
|
|---|
| 473 |
|
|---|
| 474 | @Override
|
|---|
| 475 | public GraphicsConfiguration getDeviceConfiguration() {
|
|---|
| 476 | return null;
|
|---|
| 477 | }
|
|---|
| 478 |
|
|---|
| 479 | @Override
|
|---|
| 480 | public Composite getComposite() {
|
|---|
| 481 | return null;
|
|---|
| 482 | }
|
|---|
| 483 |
|
|---|
| 484 | @Override
|
|---|
| 485 | public Color getBackground() {
|
|---|
| 486 | return null;
|
|---|
| 487 | }
|
|---|
| 488 |
|
|---|
| 489 | @Override
|
|---|
| 490 | public void fill(Shape s) {
|
|---|
| 491 | }
|
|---|
| 492 |
|
|---|
| 493 | @Override
|
|---|
| 494 | public void drawString(AttributedCharacterIterator iterator, float x, float y) {
|
|---|
| 495 | }
|
|---|
| 496 |
|
|---|
| 497 | @Override
|
|---|
| 498 | public void drawString(AttributedCharacterIterator iterator, int x, int y) {
|
|---|
| 499 | }
|
|---|
| 500 |
|
|---|
| 501 | @Override
|
|---|
| 502 | public void drawString(String str, float x, float y) {
|
|---|
| 503 | }
|
|---|
| 504 |
|
|---|
| 505 | @Override
|
|---|
| 506 | public void drawString(String str, int x, int y) {
|
|---|
| 507 | }
|
|---|
| 508 |
|
|---|
| 509 | @Override
|
|---|
| 510 | public void drawRenderedImage(RenderedImage img, AffineTransform xform) {
|
|---|
| 511 | }
|
|---|
| 512 |
|
|---|
| 513 | @Override
|
|---|
| 514 | public void drawRenderableImage(RenderableImage img, AffineTransform xform) {
|
|---|
| 515 | }
|
|---|
| 516 |
|
|---|
| 517 | @Override
|
|---|
| 518 | public void drawImage(BufferedImage img, BufferedImageOp op, int x, int y) {
|
|---|
| 519 | }
|
|---|
| 520 |
|
|---|
| 521 | @Override
|
|---|
| 522 | public boolean drawImage(Image img, AffineTransform xform, ImageObserver obs) {
|
|---|
| 523 | return false;
|
|---|
| 524 | }
|
|---|
| 525 |
|
|---|
| 526 | @Override
|
|---|
| 527 | public void drawGlyphVector(GlyphVector g, float x, float y) {
|
|---|
| 528 | }
|
|---|
| 529 |
|
|---|
| 530 | @Override
|
|---|
| 531 | public void draw(Shape s) {
|
|---|
| 532 | }
|
|---|
| 533 |
|
|---|
| 534 | @Override
|
|---|
| 535 | public void clip(Shape s) {
|
|---|
| 536 | }
|
|---|
| 537 |
|
|---|
| 538 | @Override
|
|---|
| 539 | public void addRenderingHints(Map<?, ?> hints) {
|
|---|
| 540 | }
|
|---|
| 541 | };
|
|---|
| 542 | }
|
|---|
| 543 |
|
|---|
| 544 | // CHECKSTYLE.ON: ParameterNumber
|
|---|
| 545 | // CHECKSTYLE.ON: MethodLength
|
|---|
| 546 | // CHECKSTYLE.ON: AnonInnerLength
|
|---|
| 547 | }
|
|---|