public class InitialViewSettings extends Object
PDFViewerBean
uses to display documents
when they are loaded. Each PDFViewerBean
creates an instance of
this class which is accessed with
PDFViewerBean.getInitialViewSettings()
.
The static properties are used to initialize the values when this class is instantiated.
By default, the PDFViewerBean
will not override the document's
initial view settings. If the document does not contain initial view
settings, the PDFViewerBean
will use the properties of this
class for the page mode, page layout, and magnification. If the
override...()
flag is true, the document's initial view setting
will be ignored, and the InitialViewSettings
property will be
used.
Note: Not all of the PDF document initial view options are
not supported by the PDFViewerBean
. Refer to the
setPageMode(java.lang.String)
, setPageLayout(java.lang.String)
and setMagnification(java.lang.String)
methods for the properties that are supported.
Modifier and Type | Field and Description |
---|---|
static String |
XMLKEY_INITIAL_VIEW
XML Element name used for reading/writing as an XML string
|
Modifier and Type | Method and Description |
---|---|
static String |
getDefaultMagnification()
Returns the default magnification property.
|
static String |
getDefaultPageLayout()
Returns the default pageLayout property.
|
static String |
getDefaultPageMode()
Returns the default pageMode property.
|
String |
getMagnification()
Returns the magnification property used by the
PDFViewerBean
when a document is loaded. |
String |
getPageLayout()
Returns the pageLayout property used by the
PDFViewerBean
when a document is loaded. |
String |
getPageMode()
Returns the pageMode property used by the
PDFViewerBean when
a document is loaded. |
static boolean |
isDefaultOverrideMagnification()
Returns the default overrideMagnification value.
|
static boolean |
isDefaultOverridePageLayout()
Returns the default overridePageLayout value.
|
static boolean |
isDefaultOverridePageMode()
Returns the default overridePageMode value.
|
boolean |
isOverrideMagnification()
Returns whether or not the
PDFViewerBean should ignore a
document's magnification and use this class's magnification value instead
when a document is loaded. |
boolean |
isOverridePageLayout()
Returns whether or not the
PDFViewerBean should ignore a
document's page layout and use this class's page layout value instead
when a document is loaded. |
boolean |
isOverridePageMode()
Returns whether or not the
PDFViewerBean should ignore a
document's page mode and use this class's page mode value instead when a
document is loaded. |
static void |
setDefaultMagnification(String defaultMagnification)
Sets the default magnification property used to initialize new instances
of this class.
|
static void |
setDefaultOverrideMagnification(boolean override)
Sets the default overrideMagnification value used to initialize new
instances of this class.
|
static void |
setDefaultOverridePageLayout(boolean override)
Sets the default overridePageLayout value used to initialize new
instances of this class.
|
static void |
setDefaultOverridePageMode(boolean override)
Sets the default overridePageMode value used to initialize new instances
of this class.
|
static void |
setDefaultPageLayout(String defaultPageLayout)
Sets the default pageLayout property used to initialize new instances of
this class.
|
static void |
setDefaultPageMode(String defaultPageMode)
Sets the default pageMode property used to initialize new instances of
this class.
|
static void |
setFromXML(String xmlString)
This method sets the default InitialViewSettings properties with a
properly formatted
String xml element. |
void |
setMagnification(String magnification)
Sets the magnification property used by the
PDFViewerBean
when a document is loaded. |
void |
setOverrideMagnification(boolean override)
Sets whether or not the
PDFViewerBean should ignore a
document's magnification and use this class's magnification value instead
when a document is loaded. |
void |
setOverridePageLayout(boolean override)
Sets whether or not the
PDFViewerBean should ignore a
document's page layout and use this class's page layout value instead
when a document is loaded. |
void |
setOverridePageMode(boolean override)
Sets whether or not the
PDFViewerBean should ignore a
document's page mode and use this class's page mode value instead when a
document is loaded. |
void |
setPageLayout(String pageLayout)
Sets the pageLayout property used by the
PDFViewerBean when
a document is loaded. |
void |
setPageMode(String pageMode)
Sets the pageMode property used by the
PDFViewerBean when a
document is loaded. |
static String |
toXMLString()
This method creates a
String that contains an xml element of
the default InitialViewSettings properties. |
public static final String XMLKEY_INITIAL_VIEW
public static String getDefaultPageMode()
pageMode
propertysetDefaultPageMode(java.lang.String)
public static void setDefaultPageMode(String defaultPageMode)
PDFViewerBean
internal
default setting
defaultPageMode
- one of the four values listed above or emptyIllegalArgumentException
- if defaultPageMode
is not one of the legal
values shown abovepublic static String getDefaultPageLayout()
pageLayout
propertysetDefaultPageLayout(java.lang.String)
public static void setDefaultPageLayout(String defaultPageLayout)
PDFViewerBean
internal
default setting
defaultPageLayout
- one of the four values listed above or emptyIllegalArgumentException
- if defaultPageLayout
is not one of the legal
values shown abovepublic static String getDefaultMagnification()
magnification
propertysetDefaultMagnification(java.lang.String)
public static void setDefaultMagnification(String defaultMagnification)
PDFViewerBean
internal
default setting
defaultMagnification
- one of the four values listed above or emptyIllegalArgumentException
- if defaultMagnification
is not one of the
legal values shown abovepublic static boolean isDefaultOverridePageMode()
public static void setDefaultOverridePageMode(boolean override)
override
- true if the document's page mode should be overridden, false
otherwisepublic static boolean isDefaultOverridePageLayout()
public static void setDefaultOverridePageLayout(boolean override)
override
- true if the document's page layout should be overridden, false
otherwisepublic static boolean isDefaultOverrideMagnification()
public static void setDefaultOverrideMagnification(boolean override)
override
- true if the document's magnification should be overridden,
false otherwisepublic String getPageMode()
PDFViewerBean
when
a document is loaded.pageMode
propertysetPageMode(java.lang.String)
public void setPageMode(String pageMode)
PDFViewerBean
when a
document is loaded. PDFViewerBean
internal
default setting
pageMode
- one of the four values listed above or emptyIllegalArgumentException
- if pageMode
is not one of the legal values
shown abovepublic String getPageLayout()
PDFViewerBean
when a document is loaded.pageLayout
propertysetPageLayout(java.lang.String)
public void setPageLayout(String pageLayout)
PDFViewerBean
when
a document is loaded. PDFViewerBean
internal
default setting
pageLayout
- one of the four values listed above or emptyIllegalArgumentException
- if pageLayout
is not one of the legal values
shown abovepublic String getMagnification()
PDFViewerBean
when a document is loaded.magnification
propertysetMagnification(java.lang.String)
public void setMagnification(String magnification)
PDFViewerBean
when a document is loaded. PDFViewerBean
internal
default setting
magnification
- one of the four values listed above or emptyIllegalArgumentException
- if magnification
is not one of the legal
values shown abovepublic boolean isOverridePageMode()
PDFViewerBean
should ignore a
document's page mode and use this class's page mode value instead when a
document is loaded.public void setOverridePageMode(boolean override)
PDFViewerBean
should ignore a
document's page mode and use this class's page mode value instead when a
document is loaded.override
- true if the document's page mode should be overridden, false
otherwisepublic boolean isOverridePageLayout()
PDFViewerBean
should ignore a
document's page layout and use this class's page layout value instead
when a document is loaded.public void setOverridePageLayout(boolean override)
PDFViewerBean
should ignore a
document's page layout and use this class's page layout value instead
when a document is loaded.override
- true if the document's page layout should be overridden, false
otherwisepublic boolean isOverrideMagnification()
PDFViewerBean
should ignore a
document's magnification and use this class's magnification value instead
when a document is loaded.public void setOverrideMagnification(boolean override)
PDFViewerBean
should ignore a
document's magnification and use this class's magnification value instead
when a document is loaded.override
- true if the document's magnification should be overridden,
false otherwisepublic static String toXMLString()
String
that contains an xml element of
the default InitialViewSettings properties. This String
can
be stored and used to set the default InitialViewSettings.String
containing an xml element of the
InitialViewSettings properties.setFromXML(String)
public static void setFromXML(String xmlString)
String
xml element.toXMLString()