Liking cljdoc? Tell your friends :D

javax.print.attribute.standard.MediaSize

Class MediaSize is a two-dimensional size valued printing attribute class that indicates the dimensions of the medium in a portrait orientation, with the X dimension running along the bottom edge and the Y dimension running along the left edge. Thus, the Y dimension must be greater than or equal to the X dimension. Class MediaSize declares many standard media size values, organized into nested classes for ISO, JIS, North American, engineering, and other media.

MediaSize is not yet used to specify media. Its current role is as a mapping for named media (see MediaSizeName). Clients can use the mapping method MediaSize.getMediaSizeForName(MediaSizeName) to find the physical dimensions of the MediaSizeName instances enumerated in this API. This is useful for clients which need this information to format & paginate printing.

Class MediaSize is a two-dimensional size valued printing attribute class
that indicates the dimensions of the medium in a portrait orientation, with
the X dimension running along the bottom edge and the Y dimension running
along the left edge. Thus, the Y dimension must be greater than or equal to
the X dimension. Class MediaSize declares many standard media size
values, organized into nested classes for ISO, JIS, North American,
engineering, and other media.

MediaSize is not yet used to specify media. Its current role is
as a mapping for named media (see MediaSizeName).
Clients can use the mapping method
MediaSize.getMediaSizeForName(MediaSizeName)
to find the physical dimensions of the MediaSizeName instances
enumerated in this API. This is useful for clients which need this
information to format & paginate printing.
raw docstring

*find-mediaclj

(*find-media x y units)

The specified dimensions are used to locate a matching MediaSize instance from amongst all the standard MediaSize instances. If there is no exact match, the closest match is used.

The MediaSize is in turn used to locate the MediaSizeName object. This method may return null if the closest matching MediaSize has no corresponding Media instance.

This method is useful for clients which have only dimensions and want to find a Media which corresponds to the dimensions.

x - - X dimension - float y - - Y dimension. - float units - Unit conversion factor, e.g. Size2DSyntax.INCH or Size2DSyntax.MM - int

returns: MediaSizeName matching these dimensions, or null. - javax.print.attribute.standard.MediaSizeName

throws: java.lang.IllegalArgumentException - if x <= 0, y <= 0, or units < 1.

The specified dimensions are used to locate a matching MediaSize
 instance from amongst all the standard MediaSize instances.
 If there is no exact match, the closest match is used.

 The MediaSize is in turn used to locate the MediaSizeName object.
 This method may return null if the closest matching MediaSize
 has no corresponding Media instance.

 This method is useful for clients which have only dimensions and
 want to find a Media which corresponds to the dimensions.

x - - X dimension - `float`
y - - Y dimension. - `float`
units - Unit conversion factor, e.g. Size2DSyntax.INCH or Size2DSyntax.MM - `int`

returns: MediaSizeName matching these dimensions, or null. - `javax.print.attribute.standard.MediaSizeName`

throws: java.lang.IllegalArgumentException - if x <= 0, y <= 0, or units < 1.
raw docstring

*get-media-size-for-nameclj

(*get-media-size-for-name media)

Get the MediaSize for the specified named media.

media - - the name of the media for which the size is sought - javax.print.attribute.standard.MediaSizeName

returns: size of the media, or null if this media is not associated with any size. - javax.print.attribute.standard.MediaSize

Get the MediaSize for the specified named media.

media - - the name of the media for which the size is sought - `javax.print.attribute.standard.MediaSizeName`

returns: size of the media, or null if this media is not associated
 with any size. - `javax.print.attribute.standard.MediaSize`
raw docstring

->media-sizeclj

(->media-size x y units)
(->media-size x y units media)

Constructor.

Construct a new media size attribute from the given floating-point values.

x - X dimension. - float y - Y dimension. - float units - Unit conversion factor, e.g. Size2DSyntax.INCH or Size2DSyntax.MM. - int media - a media name to associate with this MediaSize - javax.print.attribute.standard.MediaSizeName

throws: java.lang.IllegalArgumentException - (Unchecked exception) Thrown if x < 0 or y < 0 or units < 1 or x > y.

Constructor.

Construct a new media size attribute from the given floating-point
 values.

x - X dimension. - `float`
y - Y dimension. - `float`
units - Unit conversion factor, e.g. Size2DSyntax.INCH or Size2DSyntax.MM. - `int`
media - a media name to associate with this MediaSize - `javax.print.attribute.standard.MediaSizeName`

throws: java.lang.IllegalArgumentException - (Unchecked exception) Thrown if x < 0 or y < 0 or units < 1 or x > y.
raw docstring

equalsclj

(equals this object)

Returns whether this media size attribute is equivalent to the passed in object. To be equivalent, all of the following conditions must be true:

object is not null.

object is an instance of class MediaSize.

This media size attribute's X dimension is equal to object's X dimension.

This media size attribute's Y dimension is equal to object's Y dimension.

object - Object to compare to. - java.lang.Object

returns: True if object is equivalent to this media size attribute, false otherwise. - boolean

Returns whether this media size attribute is equivalent to the passed
 in object.
 To be equivalent, all of the following conditions must be true:


 object is not null.

 object is an instance of class MediaSize.

 This media size attribute's X dimension is equal to
 object's X dimension.

 This media size attribute's Y dimension is equal to
 object's Y dimension.

object - Object to compare to. - `java.lang.Object`

returns: True if object is equivalent to this media size
          attribute, false otherwise. - `boolean`
raw docstring

get-categoryclj

(get-category this)

Get the printing attribute class which is to be used as the "category" for this printing attribute value.

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

returns: Printing attribute class (category), an instance of class java.lang.Class. - java.lang.Class<? extends javax.print.attribute.Attribute>

Get the printing attribute class which is to be used as the "category"
 for this printing attribute value.

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

returns: Printing attribute class (category), an instance of class
          java.lang.Class. - `java.lang.Class<? extends javax.print.attribute.Attribute>`
raw docstring

get-media-size-nameclj

(get-media-size-name this)

Get the media name, if any, for this size.

returns: the name for this media size, or null if no name was associated with this size (an anonymous size). - javax.print.attribute.standard.MediaSizeName

Get the media name, if any, for this size.

returns: the name for this media size, or null if no name was
 associated with this size (an anonymous size). - `javax.print.attribute.standard.MediaSizeName`
raw docstring

get-nameclj

(get-name this)

Get the name of the category of which this attribute value is an instance.

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

returns: Attribute category name. - java.lang.String

Get the name of the category of which this attribute value is an
 instance.

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

returns: Attribute category name. - `java.lang.String`
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close