Serializable
, Cloneable
, Attribute
, DocAttribute
, PrintJobAttribute
, PrintRequestAttribute
MediaName
, MediaSizeName
, MediaTray
public abstract class Media extends EnumSyntax implements DocAttribute, PrintRequestAttribute, PrintJobAttribute
Media
is a printing attribute class that specifies the medium on which to print. Media may be specified in different ways.
A Media
object is constructed with a value which represents one of the ways in which the Media attribute can be specified.
IPP Compatibility: The category name returned by getName()
is the IPP attribute name. The enumeration's integer value is the IPP enum value. The toString()
method returns the IPP string representation of the attribute value.
Modifier | Constructor | Description |
---|---|---|
protected |
Constructs a new media attribute specified by name. |
Modifier and Type | Method | Description |
---|---|---|
boolean |
equals |
Returns whether this media attribute is equivalent to the passed in object. |
final Class |
getCategory() |
Get the printing attribute class which is to be used as the "category" for this printing attribute value. |
final String |
getName() |
Get the name of the category of which this attribute value is an instance. |
clone, getEnumValueTable, getOffset, getStringTable, getValue, hashCode, readResolve, toString
protected Media(int value)
value
- a valuepublic boolean equals(Object object)
object
is not null
. object
is of the same subclass of Media
as this object. public final Class<? extends Attribute> getCategory()
For class Media
and any vendor-defined subclasses, the category is class Media
itself.
getCategory
in interface Attribute
java.lang.Class
public final String getName()
For class Media
and any vendor-defined subclasses, the category name is "media"
.
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.desktop/javax/print/attribute/standard/Media.html