|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.paperclips.ScalePrint
public class ScalePrint
A decorator print that scales it's target larger or smaller.
Note: On Windows, this class depends on a bugfix available as of Eclipse build 3.2, release candidate 3 (2006-04-28). Prior to this release, using ScalePrint triggers the bug, causing the document to scale very large on paper. This bug manifests itself only on paper, not with on-screen viewing.
| Constructor Summary | |
|---|---|
ScalePrint(Print target)
Constructs a ScalePrint which scales down it's target to print at it's preferred size. |
|
ScalePrint(Print target,
java.lang.Double scale)
Constructs a ScalePrint which scales it's target by the given factor. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
java.lang.Double |
getScale()
Returns the scale by which the target will be scaled, or null (indicating automatic scale down to fit). |
Print |
getTarget()
Returns the print being scaled. |
int |
hashCode()
|
PrintIterator |
iterator(org.eclipse.swt.graphics.Device device,
org.eclipse.swt.graphics.GC gc)
Returns a PrintIterator for laying out the contents of this Print. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ScalePrint(Print target)
target - the print to scale down.
public ScalePrint(Print target,
java.lang.Double scale)
target - scale - the scale factor (must be >0). A value of 2.0 draws at double
the size, and a value of 0.5 draws at half the size. A null
value automatically scales down so the target is rendered at
it's preferred size.| Method Detail |
|---|
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic Print getTarget()
public java.lang.Double getScale()
public PrintIterator iterator(org.eclipse.swt.graphics.Device device,
org.eclipse.swt.graphics.GC gc)
Print
iterator in interface Printdevice - the graphics device this Print will be drawn onto.gc - the graphics context to be used for calculating layout and
drawing the Print's contents.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||