|
ReportCat 1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectli.netcat.print.util.WrappedPrint
li.netcat.print.util.ScalePrint
This Print is used to scale a given Print by an arbitrary value. When the scale mode is set to MODE_AUTO_WIDTH,
the scale factor is automatically adjusted, when the preferred with of the Print is greater than the available width.
This class needs the functionality of Graphics2D.
| Field Summary | |
static int |
MODE_ABSOLUTE
This constant defines the default scale mode as absolute. |
static int |
MODE_AUTO_WIDTH
This constant defines the default scale mode to be automatic according to the width. |
| Constructor Summary | |
ScalePrint(Print print)
Constructs a new ScalePrint to scale the given print. |
|
ScalePrint(Print print,
double scale)
Constructs a new ScalePrint to scale the given print. |
|
ScalePrint(Print print,
double scale,
int scaleMode)
Constructs a new ScalePrint to scale the given print. |
|
ScalePrint(Print print,
int scaleMode)
Constructs a new ScalePrint to scale the given print. |
|
| Method Summary | |
java.awt.Dimension |
getPreferredSize(java.awt.Graphics g)
Returns the preferred size of the Print. |
PrintIterator |
getPrintIterator()
Factory method, that produces a PrintIerator. |
double |
getScale()
Returns the scale in x and in y direction. |
int |
getScaleMode()
Returns the scale mode property. |
void |
setScale(double scale)
Sets the scale factor. |
void |
setScaleMode(int scaleMode)
Sets the scaleMode property. |
| Methods inherited from class li.netcat.print.util.WrappedPrint |
getPrint, setPrint |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int MODE_ABSOLUTE
public static final int MODE_AUTO_WIDTH
| Constructor Detail |
public ScalePrint(Print print)
ScalePrint to scale the given print. The scale mode is set to MODE_AUTO_WIDTH
and the scale factor is set to 1.0.
print - The print to be scaled.
public ScalePrint(Print print,
double scale)
ScalePrint to scale the given print. The scale mode is set to MODE_ABSOLUTE.
print - The print to be scaled.scale - The scale factor in x and in y direction, must be > 0.0.
public ScalePrint(Print print,
int scaleMode)
ScalePrint to scale the given print.
print - The print to be scaled.scaleMode - One of the constants MODE_*.
public ScalePrint(Print print,
double scale,
int scaleMode)
ScalePrint to scale the given print.
print - The print to be scaled.scale - The scale factor in x and in y direction, must be > 0.0.scaleMode - One of the constants MODE_*.| Method Detail |
public void setScale(double scale)
scale - The scale factor in x and in y direction, must be > 0.0.public double getScale()
public int getScaleMode()
MODE_*.public void setScaleMode(int scaleMode)
scaleMode - One of the constants MODE_*.public java.awt.Dimension getPreferredSize(java.awt.Graphics g)
PrintPrint.
getPreferredSize in interface PrintgetPreferredSize in class WrappedPrintpublic PrintIterator getPrintIterator()
PrintPrintIerator. The PrintIterator is used like an enumeration to generate all Prints.
getPrintIterator in interface PrintgetPrintIterator in class WrappedPrint
|
ReportCat 1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||