javax.print.attribute.standard
Class Media

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

public abstract class Media
extends EnumSyntax sample code for javax.print.attribute.EnumSyntax definition code for javax.print.attribute.EnumSyntax
implements DocAttribute sample code for javax.print.attribute.DocAttribute definition code for javax.print.attribute.DocAttribute , PrintRequestAttribute sample code for javax.print.attribute.PrintRequestAttribute definition code for javax.print.attribute.PrintRequestAttribute , PrintJobAttribute sample code for javax.print.attribute.PrintJobAttribute definition code for javax.print.attribute.PrintJobAttribute

Class Media is a printing attribute class that specifies the medium on which to print.

Media may be specified in different ways.

Each of these corresponds to the IPP "media" attribute. The current API does not support describing media by characteristics (eg colour, opacity). This may be supported in a later revision of the specification.

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.

See Also:
Serialized Form

Constructor Summary
protected Media sample code for javax.print.attribute.standard.Media.Media(int) definition code for javax.print.attribute.standard.Media.Media(int) (int value)
          Constructs a new media attribute specified by name.
 
Method Summary
 boolean equals sample code for javax.print.attribute.standard.Media.equals(java.lang.Object) definition code for javax.print.attribute.standard.Media.equals(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  object)
          Returns whether this media attribute is equivalent to the passed in object.
 Class sample code for java.lang.Class definition code for java.lang.Class <? extends Attribute sample code for javax.print.attribute.Attribute definition code for javax.print.attribute.Attribute > getCategory sample code for javax.print.attribute.standard.Media.getCategory() definition code for javax.print.attribute.standard.Media.getCategory() ()
          Get the printing attribute class which is to be used as the "category" for this printing attribute value.
 String sample code for java.lang.String definition code for java.lang.String getName sample code for javax.print.attribute.standard.Media.getName() definition code for javax.print.attribute.standard.Media.getName() ()
          Get the name of the category of which this attribute value is an instance.
 
Methods inherited from class javax.print.attribute.EnumSyntax sample code for javax.print.attribute.EnumSyntax definition code for javax.print.attribute.EnumSyntax
clone sample code for javax.print.attribute.EnumSyntax.clone() definition code for javax.print.attribute.EnumSyntax.clone() , getEnumValueTable sample code for javax.print.attribute.EnumSyntax.getEnumValueTable() definition code for javax.print.attribute.EnumSyntax.getEnumValueTable() , getOffset sample code for javax.print.attribute.EnumSyntax.getOffset() definition code for javax.print.attribute.EnumSyntax.getOffset() , getStringTable sample code for javax.print.attribute.EnumSyntax.getStringTable() definition code for javax.print.attribute.EnumSyntax.getStringTable() , getValue sample code for javax.print.attribute.EnumSyntax.getValue() definition code for javax.print.attribute.EnumSyntax.getValue() , hashCode sample code for javax.print.attribute.EnumSyntax.hashCode() definition code for javax.print.attribute.EnumSyntax.hashCode() , readResolve sample code for javax.print.attribute.EnumSyntax.readResolve() definition code for javax.print.attribute.EnumSyntax.readResolve() , toString sample code for javax.print.attribute.EnumSyntax.toString() definition code for javax.print.attribute.EnumSyntax.toString()
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

Media sample code for javax.print.attribute.standard.Media(int) definition code for javax.print.attribute.standard.Media(int)

protected Media(int value)
Constructs a new media attribute specified by name.

Parameters:
value - a value
Method Detail

equals sample code for javax.print.attribute.standard.Media.equals(java.lang.Object) definition code for javax.print.attribute.standard.Media.equals(java.lang.Object)

public boolean equals(Object sample code for java.lang.Object definition code for java.lang.Object  object)
Returns whether this media attribute is equivalent to the passed in object. To be equivalent, all of the following conditions must be true:
  1. object is not null.
  2. object is of the same subclass of Media as this object.
  3. The values are equal.

Overrides:
equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) in class Object sample code for java.lang.Object definition code for java.lang.Object
Parameters:
object - Object to compare to.
Returns:
True if object is equivalent to this media attribute, false otherwise.
See Also:
Object.hashCode() sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable

getCategory sample code for javax.print.attribute.standard.Media.getCategory() definition code for javax.print.attribute.standard.Media.getCategory()

public final Class sample code for java.lang.Class definition code for java.lang.Class <? extends Attribute sample code for javax.print.attribute.Attribute definition code for javax.print.attribute.Attribute > getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.

For class Media and any vendor-defined subclasses, the category is class Media itself.

Specified by:
getCategory sample code for javax.print.attribute.Attribute.getCategory() definition code for javax.print.attribute.Attribute.getCategory() in interface Attribute sample code for javax.print.attribute.Attribute definition code for javax.print.attribute.Attribute
Returns:
Printing attribute class (category), an instance of class java.lang.Class sample code for java.lang.Class definition code for java.lang.Class .

getName sample code for javax.print.attribute.standard.Media.getName() definition code for javax.print.attribute.standard.Media.getName()

public final String sample code for java.lang.String definition code for java.lang.String  getName()
Get the name of the category of which this attribute value is an instance.

For class Media and any vendor-defined subclasses, the category name is "media".

Specified by:
getName sample code for javax.print.attribute.Attribute.getName() definition code for javax.print.attribute.Attribute.getName() in interface Attribute sample code for javax.print.attribute.Attribute definition code for javax.print.attribute.Attribute
Returns:
Attribute category name.