public abstract static class ExtendedPrintable.Wrapper extends ExtendedPrintable
ExtendedPrintable.Factory, ExtendedPrintable.Wrapper| Modifier | Constructor and Description |
|---|---|
protected |
ExtendedPrintable.Wrapper(ExtendedPrintable source) |
| Modifier and Type | Method and Description |
|---|---|
int |
getDefaultHeight(int width,
Options options)
If this component does not have a required height (i.e.
|
int |
getDefaultWidth(Options options)
If this component does not have a required width (i.e.
|
String |
getDocumentName()
Returns the name of the document that we are printing (if applicable)
|
int |
getMaximumHeight(int width,
Options options)
Get the maximum height (inclusive) of the component when saved as an image.
|
int |
getMaximumWidth(Options options)
Get the maximum width (inclusive) of the component when saved as an image.
|
int |
getMinimumHeight(int width,
Options options)
Get the minimum height (inclusive) of the component when saved as an image.
|
int |
getMinimumWidth(Options options)
Get the minimum width (inclusive) of the component when saved as an image.
|
Options |
getOptions(boolean isSavingToFile)
Optionally provide additional printing and/or saving image to file options.
|
int |
getPagesRequired(Dimension dimensions,
Options options) |
int |
getRequiredHeight(int width,
Options options) |
int |
getRequiredWidth(Options options) |
int |
print(Graphics2D graphics,
Dimension dimensions,
int pageIndex,
Options options)
print a single page of this component.
|
protected ExtendedPrintable.Wrapper(ExtendedPrintable source)
public Options getOptions(boolean isSavingToFile)
ExtendedPrintablegetOptions in class ExtendedPrintableisSavingToFile - true when saving to a file, false when printingpublic String getDocumentName()
ExtendedPrintablegetDocumentName in class ExtendedPrintablepublic int print(Graphics2D graphics, Dimension dimensions, int pageIndex, Options options) throws PrinterException
ExtendedPrintableprint in class ExtendedPrintablegraphics - the graphics to render to.dimensions - the dimensions of the page to be printed to.pageIndex - index of the page to be printed or saved as an image.options - an options panel returned by ExtendedPrintable.getOptions(boolean)Printable.PAGE_EXISTS or Printable.NO_SUCH_PAGEPrinterException - the printerexceptionpublic int getRequiredWidth(Options options)
getRequiredWidth in class ExtendedPrintableoptions - an options panel returned by ExtendedPrintable.getOptions(boolean)public int getDefaultWidth(Options options)
ExtendedPrintableExtendedPrintable.getRequiredWidth(Options) returned 0)), then this
returns the default width for the component, which the user may adjust.getDefaultWidth in class ExtendedPrintableoptions - an options panel returned by ExtendedPrintable.getOptions(boolean)ExtendedPrintable.getMinimumWidth(Options),
ExtendedPrintable.getMinimumWidth(Options),
ExtendedPrintable.getDefaultHeight(int, Options)public int getMaximumWidth(Options options)
ExtendedPrintablegetMaximumWidth in class ExtendedPrintableoptions - an options panel returned by ExtendedPrintable.getOptions(boolean)public int getMinimumWidth(Options options)
ExtendedPrintablegetMinimumWidth in class ExtendedPrintableoptions - an options panel returned by ExtendedPrintable.getOptions(boolean)public int getRequiredHeight(int width,
Options options)
getRequiredHeight in class ExtendedPrintablewidth - a width chosen either by the user or returned from ExtendedPrintable.getRequiredWidth(Options)options - an options panel returned by ExtendedPrintable.getOptions(boolean)public int getDefaultHeight(int width,
Options options)
ExtendedPrintableExtendedPrintable.getRequiredHeight(int, Options) returned 0), then this
returns the default height for the component, which the user may adjust.getDefaultHeight in class ExtendedPrintablewidth - a width chosen either by the user or returned from ExtendedPrintable.getDefaultWidth(Options)options - an options panel returned by ExtendedPrintable.getOptions(boolean)ExtendedPrintable.getMinimumHeight(int, Options),
ExtendedPrintable.getMaximumHeight(int, Options),
ExtendedPrintable.getDefaultWidth(Options)public int getMaximumHeight(int width,
Options options)
ExtendedPrintablegetMaximumHeight in class ExtendedPrintablewidth - a width chosen either by the user or returned from ExtendedPrintable.getDefaultWidth(Options)options - an options panel returned by ExtendedPrintable.getOptions(boolean)public int getMinimumHeight(int width,
Options options)
ExtendedPrintablegetMinimumHeight in class ExtendedPrintablewidth - a width chosen either by the user or returned from ExtendedPrintable.getDefaultWidth(Options)options - an options panel returned by ExtendedPrintable.getOptions(boolean)public int getPagesRequired(Dimension dimensions, Options options)
getPagesRequired in class ExtendedPrintabledimensions - the dimensionsoptions - an options panel returned by ExtendedPrintable.getOptions(boolean)