|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.numdata.printer.PrinterSettings
public class PrinterSettings
This class is used for printer settings.
| Nested Class Summary | |
|---|---|
static class |
PrinterSettings.Method
Printing method. |
static class |
PrinterSettings.PageOrientation
Page orientation strings. |
| Field Summary | |
|---|---|
static String |
HOSTNAME
Constant to identify 'hostname' setting. |
static String |
IMAGEABLE_HEIGHT
Constant to identify 'imageable height' setting. |
static String |
IMAGEABLE_WIDTH
Constant to identify 'imageable width' setting. |
static String |
IMAGEABLE_X
Constant to identify 'imageable x' setting. |
static String |
IMAGEABLE_Y
Constant to identify 'imageable y' setting. |
static int |
LPD_PORT
The default LPD port number. |
static String |
METHOD
Constant to identify 'method' setting. |
static double |
MILLIMETER_IN_POINTS
A millimeter expressed in points (PostScript). |
static String |
NETWORK_PORT
Constant to identify 'networkPort' setting. |
static String |
PAGE_HEIGHT
Constant to identify 'page height' setting. |
static String |
PAGE_ORIENTATION
Constant to identify 'page orientation' setting. |
static String |
PAGE_WIDTH
Constant to identify 'page width' setting. |
static String |
QUEUE_NAME
Constant to identify 'queueName' setting. |
static String |
RESOLUTION
Constant to identify 'resolution' setting. |
| Constructor Summary | |
|---|---|
PrinterSettings()
Create default printer settings. |
|
| Method Summary | |
|---|---|
NestedProperties |
exportSettings()
Export settings. |
String |
getHostname()
|
double |
getImageablePageHeight()
Gets the height of the imageable area of the printer's default page format, in millimeters. |
double |
getImageablePageWidth()
Gets the width of the imageable area of the printer's default page format, in millimeters. |
double |
getImageableX()
Gets the X-coordinate of the top-left corner of the imageable area of the printer's default page format, in millimeters. |
double |
getImageableY()
Gets the Y-coordinate of the top-left corner of the imageable area of the printer's default page format, in millimeters. |
Insets2D |
getMargins()
Get print margins. |
PrinterSettings.Method |
getMethod()
|
int |
getNetworkPort()
|
PageFormat |
getPageFormat()
|
double |
getPageHeight()
Gets the height of the printer's default page format, in millimeters. |
PrinterSettings.PageOrientation |
getPageOrientation()
Get page orientation. |
double |
getPageWidth()
Gets the width of the printer's default page format, in millimeters. |
String |
getQueueName()
|
double |
getResolution()
|
void |
importSettings(Properties settings)
Import settings from Properties. |
void |
setHostname(String hostname)
|
void |
setImageableArea(double x,
double y,
double width,
double height)
Sets the imageable area of the printer's default page format. |
void |
setImageablePageHeight(double height)
Sets the height of the imageable area of the printer's default page format, in millimeters. |
void |
setImageablePageWidth(double width)
Sets the width of the imageable area of the printer's default page format, in millimeters. |
void |
setImageableX(double x)
Sets the X-coordinate of the top-left corner of the imageable area of the printer's default page format, in millimeters. |
void |
setImageableY(double y)
Sets the Y-coordinate of the top-left corner of the imageable area of the printer's default page format, in millimeters. |
void |
setMargins(Insets2D margins)
Get print margins. |
void |
setMediaSize(MediaSize mediaSize)
Convenience method to set media size while maintaining margins (the imageable area is adjusted). |
void |
setMethod(PrinterSettings.Method method)
|
void |
setNetworkPort(int networkPort)
|
void |
setPageFormat(PageFormat pageFormat)
|
void |
setPageHeight(double height)
Sets the height of the printer's default page format, in millimeters. |
void |
setPageOrientation(PrinterSettings.PageOrientation pageOrientation)
Set page orientation. |
void |
setPageSize(double width,
double height)
Sets the width of the printer's default page format. |
void |
setPageWidth(double width)
Sets the width of the printer's default page format, in millimeters. |
void |
setQueueName(String queueName)
|
void |
setResolution(double resolution)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String METHOD
public static final String HOSTNAME
public static final String NETWORK_PORT
public static final String QUEUE_NAME
public static final String RESOLUTION
public static final String PAGE_WIDTH
public static final String PAGE_HEIGHT
public static final String PAGE_ORIENTATION
public static final String IMAGEABLE_X
public static final String IMAGEABLE_Y
public static final String IMAGEABLE_WIDTH
public static final String IMAGEABLE_HEIGHT
public static final int LPD_PORT
public static final double MILLIMETER_IN_POINTS
| Constructor Detail |
|---|
public PrinterSettings()
| Method Detail |
|---|
public void importSettings(Properties settings)
Properties.
settings - Settings to import.public NestedProperties exportSettings()
@NotNull public PrinterSettings.Method getMethod()
public void setMethod(@NotNull
PrinterSettings.Method method)
@Nullable public String getHostname()
public void setHostname(@Nullable
String hostname)
public int getNetworkPort()
public void setNetworkPort(int networkPort)
public String getQueueName()
public void setQueueName(String queueName)
public double getResolution()
public void setResolution(double resolution)
@NotNull public PrinterSettings.PageOrientation getPageOrientation()
PageFormat.LANDSCAPE, PageFormat.PORTRAIT, or PageFormat.REVERSE_LANDSCAPE).
public void setPageOrientation(@NotNull
PrinterSettings.PageOrientation pageOrientation)
pageOrientation - Page orientation to set.
IllegalArgumentException - if an unknown orientation was requestedpublic double getPageWidth()
public void setPageWidth(double width)
width - Width to be set, in millimeters, in millimeters.public double getPageHeight()
public void setPageHeight(double height)
height - Height to be set, in millimeters, in millimeters.
public void setPageSize(double width,
double height)
width - Width to be set, in millimeters.height - Height to be set, in millimeters.public double getImageableX()
public void setImageableX(double x)
x - X-coordinate of top-left corner of imageable area, in millimeters.public double getImageableY()
public void setImageableY(double y)
y - Y-coordinate of top-left corner of imageable area, in millimeters.public double getImageablePageWidth()
public void setImageablePageWidth(double width)
width - Width of the imageable area, in millimeters.public double getImageablePageHeight()
public void setImageablePageHeight(double height)
height - Height of the imageable area, in millimeters.
public void setImageableArea(double x,
double y,
double width,
double height)
x - X-coordinate of the top-left corner of the imageable area, in
millimeters.y - Y-coordinate of the top-left corner of the imageable area, in
millimeters.width - Width of the imageable area, in millimeters.height - Height of the imageable area, in millimeters.public Insets2D getMargins()
public void setMargins(Insets2D margins)
margins - Print margins (in millimeters).
public void setMediaSize(@NotNull
MediaSize mediaSize)
mediaSize - Media size to set.@Nullable public PageFormat getPageFormat()
public void setPageFormat(@Nullable
PageFormat pageFormat)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||