javax.print.attribute.standard
Class Media

java.lang.Object
  extended by javax.print.attribute.EnumSyntax
      extended by javax.print.attribute.standard.Media
All Implemented Interfaces:
Serializable, Cloneable, Attribute, DocAttribute, PrintJobAttribute, PrintRequestAttribute
Direct Known Subclasses:
MediaName, MediaSizeName, MediaTray

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 MediaTray, MediaName and 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.

See Also:
Serialized Form

Constructor Summary
protected Media(int value)
          Constructs a Media object.
 
Method Summary
 boolean equals(Object obj)
          Tests if the given object is equal to this object.
 Class<? extends Attribute> getCategory()
          Returns category of this class.
 String getName()
          Returns the name of this attribute.
 
Methods inherited from class javax.print.attribute.EnumSyntax
clone, getEnumValueTable, getOffset, getStringTable, getValue, hashCode, readResolve, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

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.

Overrides:
equals in class Object
Parameters:
obj - the object to test
Returns:
true if both objects are equal, false otherwise.
See Also:
Object.hashCode()

getCategory

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

Specified by:
getCategory in interface Attribute
Returns:
The class Media itself.

getName

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

Specified by:
getName in interface Attribute
Returns:
The name "media".