public static enum Printer.MarginType extends Enum<Printer.MarginType>
Enum Constant and Description |
---|
DEFAULT
This requests a default 0.75 inch margin on all sides.
|
EQUAL
Choose the largest of the four hardware margins, and use that for
all for margins, so that the margins are equal on all sides.
|
EQUAL_OPPOSITES
Similar to
EQUAL , but it chooses the larger of
the left/right hardware margins and top/bottom hardware margins
separately, so that the top and bottom margins are equal, and
the left and right margins are equal. |
HARDWARE_MINIMUM
Request margins are set to be the smallest on each side that
the hardware allows.
|
Modifier and Type | Method and Description |
---|---|
static Printer.MarginType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Printer.MarginType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Printer.MarginType DEFAULT
public static final Printer.MarginType HARDWARE_MINIMUM
This is is also useful for an application that wants to know this so it can construct a new PageLayout that fits within these margins.
public static final Printer.MarginType EQUAL
public static final Printer.MarginType EQUAL_OPPOSITES
EQUAL
, but it chooses the larger of
the left/right hardware margins and top/bottom hardware margins
separately, so that the top and bottom margins are equal, and
the left and right margins are equal.public static Printer.MarginType[] values()
for (Printer.MarginType c : Printer.MarginType.values()) System.out.println(c);
public static Printer.MarginType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullSubmit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 2008, 2017, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.