com.qoppa.pdfViewer.actions
Class GotoPageRemoteAction

java.lang.Object
  extended by com.qoppa.pdfViewer.actions.Action
      extended by com.qoppa.pdfViewer.actions.GotoPageRemoteAction

public class GotoPageRemoteAction
extends Action

Action that tells the viewer to go to a page in a different PDF document.


Field Summary
static String ACTION_TYPE_DESCRIPTION
           
 
Constructor Summary
GotoPageRemoteAction(String fileName, int pageNumber)
          Constructs the action with a target document and a page number.
GotoPageRemoteAction(String fileName, int pageNumber, int zoomMode)
          Constructs an action to go to another PDF document, with an option for the zoom mode.
 
Method Summary
 String getActionType()
          Returns the action type.
 String getActionTypeDesc()
          Returns the action type description
 String getFileName()
          Gets the target document file name in the PDF file specification format.
 int getPageNumber()
          Gets the target page number.
 int getZoomMode()
          Returns the zoom mode.
 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

ACTION_TYPE_DESCRIPTION

public static String ACTION_TYPE_DESCRIPTION
Constructor Detail

GotoPageRemoteAction

public GotoPageRemoteAction(String fileName,
                            int pageNumber)
Constructs the action with a target document and a page number.

Parameters:
fileName - The name of the file to launch following the PDF file specification format.
  • /r/pdfdocs/spec.pdf for OS path name r:\pdfdocs\spec.pdf
  • //pdfdocs/spec.pdf for OS path name \pdfdocs\spec.pdf
  • any path not starting with / is a path relative to the PDF document file path
pageNumber - The target page.

GotoPageRemoteAction

public GotoPageRemoteAction(String fileName,
                            int pageNumber,
                            int zoomMode)
Constructs an action to go to another PDF document, with an option for the zoom mode.

Parameters:
fileName - The name of the file to launch following the PDF file specification format.
pageNumber - The target page.
zoomMode - The zoom mode. This can be one of the pre-defined values in the GotoPageAction class: ZOOM_FIT, ZOOM_FIT_HORIZONTAL, ZOOM_FIT_VERTICAL, ZOOM_EXPLICIT, ZOOM_RETAIN
Method Detail

getPageNumber

public int getPageNumber()
Gets the target page number.

Returns:
The target page number.

getFileName

public String getFileName()
Gets the target document file name in the PDF file specification format.

Returns:
The target document file name.

getActionType

public String getActionType()
Returns the action type.

Specified by:
getActionType in class Action
Returns:
The action type.

getActionTypeDesc

public String getActionTypeDesc()
Returns the action type description

Specified by:
getActionTypeDesc in class Action

toString

public String toString()
Returns the description of the action.

Overrides:
toString in class Object

getZoomMode

public int getZoomMode()
Returns the zoom mode. The mode tells the viewer how to set the scale after setting the target page. There are values to tell the viewer to fit to width, fit to height, etc.

Returns:
The value of the zoom mode, one of the predefined constants in this class (ZOOM_*)

setZoomMode

public void setZoomMode(int zoomMode)
Sets the zoom mode. The mode tells the viewer how to set the scale after setting the target page. The calling application should use one of the predefined constants in this class: ZOOM_FIT, ZOOM_RETAIN, etc.

Parameters:
zoomMode - The new value of the zoom mode.