Adempiere 3.5.2a

org.compiere.print
Class CPaper

java.lang.Object
  extended by java.awt.print.Paper
      extended by org.compiere.print.CPaper
All Implemented Interfaces:
Cloneable

public class CPaper
extends Paper

Adempiere Paper

Version:
$Id: CPaper.java,v 1.2 2006/07/30 00:53:02 jjanke Exp $
Author:
Jorg Janke

Constructor Summary
CPaper(boolean landscape)
          Constructor.
CPaper(MediaSize mediaSize, boolean landscape, double left, double top, double right, double bottom)
          Detail Constructor
CPaper(PageFormat pf)
          Constructor.
 
Method Summary
 boolean equals(Object obj)
          Equals
 double getHeight(boolean orientationCorrected)
          Get Height in 1/72 inch
 double getImageableHeight(boolean orientationCorrected)
          Get Image Height in 1/72 inch
 double getImageableWidth(boolean orientationCorrected)
          Get Image Width in 1/72 inch
 double getImageableX(boolean orientationCorrected)
          Get Image X in 1/72 inch
 double getImageableY(boolean orientationCorrected)
          Get Image Y in 1/72 inch
 Insets getMargin(boolean orientationCorrected)
          Get Margin
 MediaPrintableArea getMediaPrintableArea()
          Get Printable Media Area
 MediaSize getMediaSize()
          Get Media Size
 MediaSizeName getMediaSizeName()
          Get Media Size
 PageFormat getPageFormat()
          Get the Page Format for the Papaer
 PrintRequestAttributeSet getPrintRequestAttributeSet()
          Return Print Request Attributes
 double getWidth(boolean orientationCorrected)
          Get Width in 1/72 inch
 boolean isLandscape()
          Is Landscape
 boolean pageSetupDialog(PrinterJob job)
          Show Dialog and Set Paper
 void setMediaPrintableArea(MediaPrintableArea area)
          Get Printable Media Area
 void setMediaSize(MediaSize mediaSize, boolean landscape)
          Set Media Size
 void setPrintRequestAttributeSet(PrintRequestAttributeSet prats)
          Set Print Request Attributes
 String toString()
          Get String Representation
 String toString(Properties ctx)
          Get "nice" String Representation
 
Methods inherited from class java.awt.print.Paper
clone, getHeight, getImageableHeight, getImageableWidth, getImageableX, getImageableY, getWidth, setImageableArea, setSize
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CPaper

public CPaper(PageFormat pf)
Constructor. Derive Paper from PageForamt

Parameters:
pf - PageFormat

CPaper

public CPaper(boolean landscape)
Constructor. Get Media Size from Default Language

Parameters:
landscape - true if landscape, false if portrait

CPaper

public CPaper(MediaSize mediaSize,
              boolean landscape,
              double left,
              double top,
              double right,
              double bottom)
Detail Constructor

Parameters:
mediaSize - media size
left - x in 1/72 inch
top - y in 1/72 inch
right - right x in 1/72
bottom - bottom y in 1/72
landscape - true if landscape, false if portrait
Method Detail

setMediaSize

public void setMediaSize(MediaSize mediaSize,
                         boolean landscape)
Set Media Size

Parameters:
mediaSize - media size
landscape - true if landscape, false if portrait

getMediaSizeName

public MediaSizeName getMediaSizeName()
Get Media Size

Returns:
media size

getMediaSize

public MediaSize getMediaSize()
Get Media Size

Returns:
media size

getMediaPrintableArea

public MediaPrintableArea getMediaPrintableArea()
Get Printable Media Area

Returns:
Printable Area

setMediaPrintableArea

public void setMediaPrintableArea(MediaPrintableArea area)
Get Printable Media Area

Parameters:
area - Printable Area

isLandscape

public boolean isLandscape()
Is Landscape

Returns:
true if landscape

pageSetupDialog

public boolean pageSetupDialog(PrinterJob job)
Show Dialog and Set Paper

Parameters:
job - printer job
Returns:
true if changed.

getPrintRequestAttributeSet

public PrintRequestAttributeSet getPrintRequestAttributeSet()
Return Print Request Attributes

Returns:
PrintRequestAttributeSet

setPrintRequestAttributeSet

public void setPrintRequestAttributeSet(PrintRequestAttributeSet prats)
Set Print Request Attributes

Parameters:
prats - PrintRequestAttributeSet

getPageFormat

public PageFormat getPageFormat()
Get the Page Format for the Papaer

Returns:
Page Format

toString

public String toString()
Get String Representation

Overrides:
toString in class Object
Returns:
info

toString

public String toString(Properties ctx)
Get "nice" String Representation

Parameters:
ctx - context
Returns:
info

equals

public boolean equals(Object obj)
Equals

Overrides:
equals in class Object
Parameters:
obj - compare
Returns:
true if equal

getWidth

public double getWidth(boolean orientationCorrected)
Get Width in 1/72 inch

Parameters:
orientationCorrected - correct for orientation
Returns:
width

getHeight

public double getHeight(boolean orientationCorrected)
Get Height in 1/72 inch

Parameters:
orientationCorrected - correct for orientation
Returns:
height

getImageableY

public double getImageableY(boolean orientationCorrected)
Get Image Y in 1/72 inch

Parameters:
orientationCorrected - correct for orientation
Returns:
imagable Y

getImageableX

public double getImageableX(boolean orientationCorrected)
Get Image X in 1/72 inch

Parameters:
orientationCorrected - correct for orientation
Returns:
imagable X

getImageableHeight

public double getImageableHeight(boolean orientationCorrected)
Get Image Height in 1/72 inch

Parameters:
orientationCorrected - correct for orientation
Returns:
imagable height

getImageableWidth

public double getImageableWidth(boolean orientationCorrected)
Get Image Width in 1/72 inch

Parameters:
orientationCorrected - correct for orientation
Returns:
imagable width

getMargin

public Insets getMargin(boolean orientationCorrected)
Get Margin

Parameters:
orientationCorrected - correct for orientation
Returns:
margin

Adempiere 3.5.2a

Adempiere® is a registered trademark of ADempiere Business Inc. ©2004-2008 HumanFlash.com All rights reserved.