| 461 | | * Given a desired <em>client area</em> for the receiver |
|---|
| 462 | | * (as described by the arguments), returns the bounding |
|---|
| 463 | | * rectangle which would be required to produce that client |
|---|
| 464 | | * area. |
|---|
| 465 | | * <p> |
|---|
| 466 | | * In other words, it returns a rectangle such that, if the |
|---|
| 467 | | * receiver's bounds were set to that rectangle, the area |
|---|
| 468 | | * of the receiver which is capable of displaying data |
|---|
| 469 | | * (that is, not covered by the "trimmings") would be the |
|---|
| 470 | | * rectangle described by the arguments (relative to the |
|---|
| 471 | | * receiver's parent). |
|---|
| 472 | | * </p><p> |
|---|
| 473 | | * Note that there is no setBounds for a printer. This method |
|---|
| 474 | | * is usually used by passing in the client area (the 'printable |
|---|
| 475 | | * area') of the printer. It can also be useful to pass in 0, 0, 0, 0. |
|---|
| 476 | | * </p> |
|---|
| 477 | | * |
|---|
| 478 | | * @param x the desired x coordinate of the client area |
|---|
| 479 | | * @param y the desired y coordinate of the client area |
|---|
| 480 | | * @param width the desired width of the client area |
|---|
| 481 | | * @param height the desired height of the client area |
|---|
| 482 | | * @return the required bounds to produce the given client area |
|---|
| | 467 | * Given a <em>client area</em> (as described by the arguments), |
|---|
| | 468 | * returns a rectangle, relative to the client area's coordinates, |
|---|
| | 469 | * that is the client area expanded by the printer's trim (or minimum margins). |
|---|
| | 470 | * <p> |
|---|
| | 471 | * Most printers have a minimum margin on each edge of the paper where the |
|---|
| | 472 | * printer device is unable to print. This margin is known as the "trim." |
|---|
| | 473 | * This method can be used to calculate the printer's minimum margins |
|---|
| | 474 | * by passing in a client area of 0, 0, 0, 0 and then using the resulting |
|---|
| | 475 | * x and y coordinates (which will be <= 0) to determine the minimum margins |
|---|
| | 476 | * for the top and left edges of the paper, and the resulting width and height |
|---|
| | 477 | * (offset by the resulting x and y) to determine the minimum margins for the |
|---|
| | 478 | * bottom and right edges of the paper, as follows: |
|---|
| | 479 | * <ul> |
|---|
| | 480 | * <li>The left trim width is -x pixels</li> |
|---|
| | 481 | * <li>The top trim height is -y pixels</li> |
|---|
| | 482 | * <li>The right trim width is (x + width) pixels</li> |
|---|
| | 483 | * <li>The bottom trim height is (y + height) pixels</li> |
|---|
| | 484 | * </ul> |
|---|
| | 485 | * </p> |
|---|
| | 486 | * |
|---|
| | 487 | * @param x the x coordinate of the client area |
|---|
| | 488 | * @param y the y coordinate of the client area |
|---|
| | 489 | * @param width the width of the client area |
|---|
| | 490 | * @param height the height of the client area |
|---|
| | 491 | * @return a rectangle, relative to the client area's coordinates, that is |
|---|
| | 492 | * the client area expanded by the printer's trim (or minimum margins) |
|---|