|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.qoppa.pdfViewer.actions.Action
com.qoppa.pdfViewer.actions.GotoPageAction
public class GotoPageAction
A GotoPageAction can be used to position the display a page in a PDF document.
PDFViewerBean.handleAction(Action)| Field Summary | |
|---|---|
static String |
ACTION_TYPE_DESCRIPTION
|
static int |
ZOOM_EXPLICIT
Set the zoom scale explicitly. |
static int |
ZOOM_FIT
Zoom the view to fit the target page both horizontally and vertically. |
static int |
ZOOM_FIT_HORIZONTAL
Zoom the target page so that it will fit horizontally. |
static int |
ZOOM_FIT_VERTICAL
Zoom the target page so that it will fit vertically. |
static int |
ZOOM_RETAIN
Do not adjust the zoom scale, retain the current value. |
| Constructor Summary | |
|---|---|
GotoPageAction(IPDFPage pdfPage)
Constructs a GotoPageAction with an IPDFPage. |
|
GotoPageAction(IPDFPage pdfPage,
int zoomMode)
Constructs a GotoPageAction with an IPDFPage and a zoom
mode. |
|
GotoPageAction(IPDFPage pdfPage,
int x,
int y,
double scale)
Constructs a GotoPageAction with an IPDFPage and with values
to set the x and y coordinates as well as the zoom scale. |
|
| Method Summary | |
|---|---|
String |
getActionType()
Returns the action type. |
String |
getActionTypeDesc()
Returns the action type description |
IPDFPage |
getPage()
Returns the page for this GotoPageAction. |
double |
getScale()
Returns the scale, the value of the scale that the viewer will use after setting the page. |
int |
getX()
Returns the x coordinate of the GotoPageAction. |
int |
getY()
Returns the y coordinate of the GotoPageAction. |
int |
getZoomMode()
Returns the zoom mode. |
void |
setScale(double scale)
Sets the scale, 0..1. |
void |
setX(int x)
Sets the x coordinate of the GotoPageAction. |
void |
setY(int y)
Sets the y coordinate of the GotoPageAction. |
void |
setZoomMode(int zoomMode)
Sets the zoom mode. |
String |
toString()
Returns the description of the action. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static String ACTION_TYPE_DESCRIPTION
public static final int ZOOM_RETAIN
public static final int ZOOM_FIT
public static final int ZOOM_FIT_HORIZONTAL
public static final int ZOOM_FIT_VERTICAL
public static final int ZOOM_EXPLICIT
| Constructor Detail |
|---|
public GotoPageAction(IPDFPage pdfPage)
IPDFPage. This
constructor will create an action that will retain the current zoom
level.
pdfPage - The IPDFPage to display
public GotoPageAction(IPDFPage pdfPage,
int x,
int y,
double scale)
IPDFPage and with values
to set the x and y coordinates as well as the zoom scale.
pdfPage - The IPDFPage to displayx - The x coordinatey - The y coordinatescale - The zoom scale as a decimal. .5 will be 50% zoom, 5 will be
500%. If set to -1 or 0 to retain the current value
public GotoPageAction(IPDFPage pdfPage,
int zoomMode)
IPDFPage and a zoom
mode. The zoom mode can be any of the predefined constants in this class
that start with ZOOM_.
pdfPage - The IPDFPage to displayzoomMode - The new mode. If the mode is fit horizontal, or fit vertical,
the viewer will also look at the TagetTop and TargetLeft
values respectively.| Method Detail |
|---|
public IPDFPage getPage()
public String getActionType()
getActionType in class Actionpublic String getActionTypeDesc()
getActionTypeDesc in class Actionpublic String toString()
toString in class Objectpublic int getX()
public void setX(int x)
x - coordinate of the GotoPageActionpublic int getY()
public void setY(int y)
y - coordinate of the GotoPageActionpublic double getScale()
public void setScale(double scale)
scale - public int getZoomMode()
public void setZoomMode(int zoomMode)
zoomMode - The new value of the zoom mode.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||