|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.output.Paper
public class Paper
The default printer page settings.
The Paper object is a key object required by the Printer object. The Paper object is responsible for maintaining properties related to the paper and printer used with the Printer object. In the ArcMap application, the Paper object is accessed throught the Printer Setup section of the Page and Print Setup dialog.
When working with an ArcGIS application like ArcMap, a Paper object is automatically created based on the default printer for the system. To use another printer on the system, you must define a new Paper object and set it to the printer or plotter through the PrinterName property. The Paper object can then be associated with the Printer object through the IPrinter::Paper property.
The Paper object is basically a wrapper for the Microsoft GDI DevMode and DevNames parameters. The Windows GDI documentation on the Microsoft Developer Network (MSDN) library provides further details about these structures.
The DevNames structure contains strings that identify the driver, device, and output port names for a printer. The DevMode data structure contains information about the device initialization and environment of a printer.
The Attach method is used by a Printer object when the IPrinter::Paper property is set. ArcObjects developers will typically not need to use this method.
QueryPaperSize is a useful method for interrogating the dimensions of the Printer's currently selected Form size.
Constructor Summary | |
---|---|
Paper()
Constructs a Paper using ArcGIS Engine. |
|
Paper(Object obj)
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts. Paper thePaper = (Paper) obj; |
Method Summary | |
---|---|
void |
assign(IClone src)
Assigns the properties of src to the receiver. |
void |
attach(int hDevMode,
int hDevNames)
Attach object to specified DEVMODE and DEVNAMES structures. |
boolean |
equals(Object o)
Compare this object with another |
IClone |
esri_clone()
Clones the receiver and assigns the result to *clone. |
void |
getClassID(GUID[] pClassID)
getClassID |
static String |
getClsid()
getClsid. |
short |
getFormID()
The printer page form. |
String |
getFormName()
The Form Name. |
IEnumNamedID |
getForms()
Enumerate forms supported by the printer. |
short |
getOrientation()
The printer page orientation (1 = portrait. |
IEnvelope |
getPrintableBounds()
The area of the printer page that can be printed on. |
int |
getPrinterInfo(int[] hDevMode)
Display the Print Setup Dialog. |
String |
getPrinterName()
The Printer Name. |
short |
getResolution()
The print resolution. |
void |
getSizeMax(_ULARGE_INTEGER[] pcbSize)
getSizeMax |
short |
getTrayID()
The printer tray. |
IEnumNamedID |
getTrays()
Enumerate trays supported by the printer. |
int |
getUnits()
The units used by the other properties. |
int |
hashCode()
the hashcode for this object |
void |
interfaceSupportsErrorInfo(GUID riid)
interfaceSupportsErrorInfo |
void |
isDirty()
isDirty |
boolean |
isEqual(IClone other)
Indicates if the receiver and other have the same properties. |
boolean |
isIdentical(IClone other)
Indicates if the receiver and other are the same object. |
void |
load(IStream pstm)
load |
void |
queryPaperSize(double[] width,
double[] height)
Returns the size of the printer paper. |
void |
readExternal(ObjectInput in)
|
void |
save(IStream pstm,
int fClearDirty)
save |
void |
setFormID(short formID)
The printer page form. |
void |
setOrientation(short orientation)
The printer page orientation (1 = portrait. |
void |
setPrinterName(String printerName)
The Printer Name. |
void |
setTrayID(short trayID)
The printer tray. |
void |
writeExternal(ObjectOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef |
---|
getJintegraDispatch, release |
Constructor Detail |
---|
public Paper() throws IOException, UnknownHostException
IOException
- if there are interop problems
UnknownHostException
- if there are interop problemspublic Paper(Object obj) throws IOException
Paper thePaper = (Paper) obj;
obj
to Paper
.
obj
- an object returned from ArcGIS Engine or Server
IOException
- if there are interop problemsMethod Detail |
---|
public static String getClsid()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public int getUnits() throws IOException, AutomationException
getUnits
in interface IPaper
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnvelope getPrintableBounds() throws IOException, AutomationException
getPrintableBounds
in interface IPaper
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public short getOrientation() throws IOException, AutomationException
getOrientation
in interface IPaper
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setOrientation(short orientation) throws IOException, AutomationException
setOrientation
in interface IPaper
orientation
- The orientation (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnumNamedID getForms() throws IOException, AutomationException
getForms
in interface IPaper
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getFormName() throws IOException, AutomationException
getFormName
in interface IPaper
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public short getFormID() throws IOException, AutomationException
getFormID
in interface IPaper
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setFormID(short formID) throws IOException, AutomationException
setFormID
in interface IPaper
formID
- The formID (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnumNamedID getTrays() throws IOException, AutomationException
Use the Trays enumerator to get a list valid tray ids for the currently selected printer. The returned tray ids can be used in the IPaper interface's TrayID property.
getTrays
in interface IPaper
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public short getTrayID() throws IOException, AutomationException
Use the TrayID property to control which paper tray will be used for feeding printer paper. Because the value of the TrayID property will be used by the printer driver directly, it must contain a valid value at print time. The Win32 API documentation makes reference to these values as the DMBIN contstants. In practice, no printer driver supports the full range of DMBIN paper tray values; usually only a small subset is valid. Thus, it is not possible to assign an arbitrary DMBIN constant to the TrayID property. You must always first enumerate for valid tray ids before assigning. Use the IPaper interface's Trays enumerator to get a list valid tray ids for the currently selected printer.
getTrayID
in interface IPaper
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setTrayID(short trayID) throws IOException, AutomationException
setTrayID
in interface IPaper
trayID
- The trayID (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getPrinterName() throws IOException, AutomationException
getPrinterName
in interface IPaper
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setPrinterName(String printerName) throws IOException, AutomationException
setPrinterName
in interface IPaper
printerName
- The printerName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void attach(int hDevMode, int hDevNames) throws IOException, AutomationException
This method is used by the Printer object, called when the IPrinter::Paper property is set. Most ArcObjects developers will not need to use this method unless they are doing a custom implementation of IPrinter.
attach
in interface IPaper
hDevMode
- The hDevMode (A COM typedef) (in)hDevNames
- The hDevNames (A COM typedef) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void queryPaperSize(double[] width, double[] height) throws IOException, AutomationException
queryPaperSize
in interface IPaper
width
- The width (out: use single element array)height
- The height (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getPrinterInfo(int[] hDevMode) throws IOException, AutomationException
getPrinterInfo
in interface IPaper
hDevMode
- The hDevMode (A COM typedef) (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public short getResolution() throws IOException, AutomationException
getResolution
in interface IPaper2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IClone esri_clone() throws IOException, AutomationException
esri_clone
in interface IClone
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void assign(IClone src) throws IOException, AutomationException
assign
in interface IClone
src
- A reference to a com.esri.arcgis.system.IClone (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isEqual(IClone other) throws IOException, AutomationException
IsEqual returns True if the receiver and the source have the same properties. Note, this does not imply that the receiver and the source reference the same object.
isEqual
in interface IClone
other
- A reference to a com.esri.arcgis.system.IClone (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isIdentical(IClone other) throws IOException, AutomationException
IsIdentical returns true if the receiver and the source reference the same object.
isIdentical
in interface IClone
other
- A reference to a com.esri.arcgis.system.IClone (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void isDirty() throws IOException, AutomationException
IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.
isDirty
in interface IPersistStream
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void load(IStream pstm) throws IOException, AutomationException
IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.
load
in interface IPersistStream
pstm
- A reference to a com.esri.arcgis.system.IStream (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void save(IStream pstm, int fClearDirty) throws IOException, AutomationException
IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.
save
in interface IPersistStream
pstm
- A reference to a com.esri.arcgis.system.IStream (in)fClearDirty
- The fClearDirty (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void getSizeMax(_ULARGE_INTEGER[] pcbSize) throws IOException, AutomationException
IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.
getSizeMax
in interface IPersistStream
pcbSize
- A Structure: com.esri.arcgis.system._ULARGE_INTEGER (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void getClassID(GUID[] pClassID) throws IOException, AutomationException
IPersist is a Microsoft interface. Please refer to MSDN for information about this interface.
getClassID
in interface IPersist
pClassID
- A Structure: com.esri.arcgis.support.ms.stdole.GUID (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void interfaceSupportsErrorInfo(GUID riid) throws IOException, AutomationException
Indicates whether the interface supports IErrorInfo.
interfaceSupportsErrorInfo
in interface ISupportErrorInfo
riid
- A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |