java-gnome version 4.0.19

org.gnome.gtk
Class CustomPaperSize

Object
  extended by org.freedesktop.bindings.Pointer
      extended by org.gnome.glib.Boxed
          extended by org.gnome.gtk.PaperSize
              extended by org.gnome.gtk.CustomPaperSize

public class CustomPaperSize
extends PaperSize

Page sizes different than the established standards available as constants in the PaperSize, InternationalPaperSize, and NorthAmericanPaperSize classes.

 paper = new CustomPaperSize("Business Card", 90, 55, Unit.MM);
 

Since:
4.0.14
Author:
Andrew Cowie

Field Summary
 
Fields inherited from class org.gnome.gtk.PaperSize
A4, LETTER
 
Constructor Summary
CustomPaperSize(String name, double width, double height, Unit units)
          Create a PaperSize constant (or, at least, once you've created one you don't need to create any more) for a custom size.
 
Method Summary
 
Methods inherited from class org.gnome.gtk.PaperSize
equals, getDefault, getDisplayName, getHeight, getWidth, toString
 
Methods inherited from class Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CustomPaperSize

public CustomPaperSize(String name,
                       double width,
                       double height,
                       Unit units)
Create a PaperSize constant (or, at least, once you've created one you don't need to create any more) for a custom size.

The width and height parameters are in terms of units, obviously. Note that you must use a physical measurement; you can't specify pixels.

You need to specify a human readable display name describing this PaperSize in a word or two. You should mark it for translation. Try "Custom" if you're lacking for inspiration.

Since:
4.0.14


java-gnome