|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.levigo.jadice.document.Pages
public class Pages
This utility class contains various methods for gaining information about given Page
s.
Method Summary | |
---|---|
static Format |
getBaseFormat(Page page)
Returns the base format of the given page. |
static Format |
getBaseFormat(Page page,
DocumentLayer layer)
Returns the base format of the given layer in the given Page . |
static Dimension |
getRenderedSize(Page page,
RenderControls rc)
Calculates the rendered size of the given page taking into account the given RenderControls . |
static Dimension |
getScaledSize(Page page,
RenderControls rc)
Calculates the rendered size of the given page taking into account the given RenderControls , but disregarding page rotation. |
static Dimension2D |
getSize(Page page,
Unit u)
Calculates the size of the given page using the given Unit . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Dimension2D getSize(Page page, Unit u)
Unit
.
page
- the Page of which to determine the size
Unit
getScaledSize(Page, RenderControls)
public static Dimension getRenderedSize(Page page, RenderControls rc)
RenderControls
. Three factors of the render controls influence the rotated size:
page
- the Page of which to determine the rendered sizerc
- provides the parameters to calculate the rendered size
NullPointerException
- if one of the arguments is null
.getScaledSize(Page, RenderControls)
public static Dimension getScaledSize(Page page, RenderControls rc)
RenderControls
, but disregarding page rotation. Two factors of the render controls
influence the rotated size:
page
- the Page of which to determine the rendered sizerc
- provides the parameters to calculate the rendered size
NullPointerException
- if one of the arguments is null
.getRenderedSize(Page, RenderControls)
public static Format getBaseFormat(Page page)
Returns the base format of the given page.
Detects the document's default layer
and obtains the containing
page segments format. If the document does not contain a default layer or no page segment is
placed in the default layer this method throws a NullPointerException
.
page
- the Page of which to determine the base format
Format
the AbstractPageSegment
in the document's default layer
representsgetBaseFormat(Page, DocumentLayer)
public static Format getBaseFormat(Page page, DocumentLayer layer)
Returns the base format of the given layer in the given Page
. Detects the given
DocumentLayer
and obtains the containing AbstractPageSegment
's format.
If given page is null
, the document does not contain such a layer or no page
segment is placed in this layer this method throws a NullPointerException
.
page
- the Page of which to determine the base formatlayer
- the layer of the searched page segment format
Format
the AbstractPageSegment
in the given layer represents
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |