javax.print.attribute.standard

Class Media

public abstract class Media extends EnumSyntax implements DocAttribute, PrintRequestAttribute, PrintJobAttribute

The Media printing attribute specifies which type of media should be used for printing.

The media to be used can be specified in three ways represented by the media subclasses {@link javax.print.attribute.standard.MediaTray}, {@link javax.print.attribute.standard.MediaName} and {@link javax.print.attribute.standard.MediaSizeName}:

Each of the sublcasses represents the IPP attribute media and provides predefined values to be used.

IPP Compatibility: Media is an IPP 1.1 attribute.

Constructor Summary
protected Media(int value)
Constructs a Media object.
Method Summary
booleanequals(Object obj)
Tests if the given object is equal to this object.
Class<? extends Attribute>getCategory()
Returns category of this class.
StringgetName()
Returns the name of this attribute.

Constructor Detail

Media

protected Media(int value)
Constructs a Media object.

Parameters: value the enum value.

Method Detail

equals

public boolean equals(Object obj)
Tests if the given object is equal to this object. The objects are considered equal if both are of the same Media subclass, not null and the values are equal.

Parameters: obj the object to test

Returns: true if both objects are equal, false otherwise.

getCategory

public Class<? extends Attribute> getCategory()
Returns category of this class.

Returns: The class Media itself.

getName

public final String getName()
Returns the name of this attribute.

Returns: The name "media".