public class IlvSimplePrintableManager extends Object implements IlvFlowObject
IlvManager
that can be printed
in a flow of text.IlvFlow.add(IlvFlowObject,int)
Constructor and Description |
---|
IlvSimplePrintableManager(IlvManagerView view,
IlvUnit.Dimension size)
Creates an
IlvSimplePrintableManager . |
Modifier and Type | Method and Description |
---|---|
void |
draw(Graphics g,
double xx,
double yy)
Create the pages of this document.
|
IlvRect |
getPrintArea()
Returns the area of the manager that is printed.
|
IlvUnit.Dimension |
getSize()
Returns the size of the object.
|
IlvRect |
getTotalManagerPrintArea()
Returns the total area of the manager to be printed.
|
IlvManagerView |
getView()
Returns the manager view used when creating the document.
|
double |
getZoomLevel()
Returns the zoom level used when printing.
|
IlvTransformer |
getZoomTransformer()
Returns the zoom transformer used when printing.
|
boolean |
isAutomaticZoomLevel()
Returns
true if the automatic zoom level calculation is
enabled. |
boolean |
isPrintingAllManagerBBox()
Returns
true if the area to be printed
is the total area of the manager. |
void |
setAutomaticZoomLevel(boolean enable)
Sets whether the automatic zoom level calculation is
enabled.
|
void |
setPrintArea(IlvRect area)
Changes the area of the manager that is printed.
|
void |
setZoomLevel(double zl)
Changes the zoom level used when printing.
|
void |
setZoomTransformer(IlvTransformer t)
Changes the zoom transformer that is used when printing.
|
public IlvSimplePrintableManager(IlvManagerView view, IlvUnit.Dimension size)
IlvSimplePrintableManager
.view
- The manager view to print.size
- The dimension on the page.public IlvUnit.Dimension getSize()
getSize
in interface IlvFlowObject
public IlvManagerView getView()
public boolean isPrintingAllManagerBBox()
true
if the area to be printed
is the total area of the manager.public IlvRect getTotalManagerPrintArea()
Invisible layers and layers for which
IlvManagerView.isContributingToViewBBox(int)
returns
false
are not taken into account when calculating the area.
If the automatic zoom level calculation is enabled, the returned value may only be an approximation. In particular if the manager contains nonzoomable objects, it is recommended to disable the automatic zoom level calculation and to set the zoom transformer instead, so that the returned value is precise with respect to the given zoom transformer.
public IlvTransformer getZoomTransformer()
In the printout, the print area of the manager must be transformed to fit
to the page area. However, the content of an IlvManager
may
change when displayed at different zoom level (for example when it
contains nonzoomable objects).
The zoom transformer is used to specify the zoom level when
printing. Still, the print area is transformed to fit to the page area,
but the zoom transformer decides how much of this
transformation contributes to the nonzoomable objects.
If the method returns null
, the zoom transformer
of the input view is used instead. In this case, the proportions between
zoomable and nonzoomable objects are in the printout exactly as in the
view.
setZoomTransformer(ilog.views.IlvTransformer)
,
setZoomLevel(double)
,
setAutomaticZoomLevel(boolean)
public void setZoomTransformer(IlvTransformer t)
In the printout, the print area of the manager must be transformed to fit
to the page area. However, the content of an IlvManager
may
change when displayed at different zoom level (for example, when it
contains nonzoomable objects).
The zoom transformer is used to specify the zoom level when
printing. Still, the print area is transformed to fit to the page area,
but the zoom transformer decides how much of this
transformation contributes to the nonzoomable objects.
If the input zoom transformer is null
, the zoom transformer
of the input view is used instead. In this case, the proportions between
zoomable and nonzoomable objects are in the printout exactly as in the
view.
Changing the zoom transformer may affect the result of the printing but will not affect the number of pages or the area on a page that is printed.
getZoomTransformer()
,
setZoomLevel(double)
,
setAutomaticZoomLevel(boolean)
public double getZoomLevel()
public void setZoomLevel(double zl)
public boolean isAutomaticZoomLevel()
true
if the automatic zoom level calculation is
enabled. It is enabled by default.setAutomaticZoomLevel(boolean)
,
setZoomTransformer(ilog.views.IlvTransformer)
public void setAutomaticZoomLevel(boolean enable)
In the printout, the print area of the manager must be transformed to fit
to the page area. However, the content of an IlvManager
may
change when displayed at different zoom level (for example, when it
contains nonzoomable objects). In order to adjust the printing, it
is possible to set the zoom transformer (see setZoomTransformer(ilog.views.IlvTransformer)
),
which however has only an effect if the automatic zoom level calculation
is disabled. If it is enabled, an internal zoom transformer is calculated
automatically and the explicitly set zoom transformer is ignored.
isAutomaticZoomLevel()
,
setZoomTransformer(ilog.views.IlvTransformer)
public void setPrintArea(IlvRect area)
area
- The new area in manager's coordinate system. When area
is null
then the area to print will be the full area
of the manager.getPrintArea()
public IlvRect getPrintArea()
setPrintArea(ilog.views.IlvRect)
public void draw(Graphics g, double xx, double yy)
draw
in interface IlvFlowObject
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.