|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
com.ibm.as400.vaccess.SpooledFileViewer
The SpooledFileViewer class represents a server spooled file viewer. You can create an instance of this class to view an individual AFPDS or SCS spooled file on the server. Viewer functions such as page forward, page back, set current page, and so on, are provided. The following properties can be set directly, but require the invocation of load() to load the information from the server.
Most errors are reported as ErrorEvents rather than throwing exceptions. Users should listen for ErrorEvents in order to diagnose and recover from error conditions.
SpooledFileViewer objects generate the following events:
The following example creates a spooled file viewer to display a spooled file previously created on the server.
// Assume splf is the spooled file. // Create the spooled file viewer SpooledFileViewer splfv = new SpooledFileViewer(splf, 1); splfv.load(); // Add the spooled file viewer to a frame JFrame frame = new JFrame("My Window"); frame.getContentPane().add(splfv);
SpooledFile
,
Serialized FormNested Class Summary |
---|
Nested classes inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
static int |
A3
Deprecated. Represents A3 paper size (297 x 420 mm) |
static int |
A4
Deprecated. Represents A4 paper size (210 x 297 mm) |
static int |
A5
Deprecated. Represents A5 paper size (148 x 210 mm) |
static int |
ABSOLUTE_FIDELITY
Deprecated. Represents *ABSOLUTE viewing fidelity |
static int |
B4
Deprecated. Represents B4 paper size (257 x 364 mm) |
static int |
B5
Deprecated. Represents B5 paper size (182 x 257 mm) |
static int |
CONT132
Deprecated. Represents continuous feed 132 paper size (13.2 x 11 inches) |
static int |
CONT80
Deprecated. Represents continuous feed 80 paper size (8 x 11 inches) |
static int |
CONTENT_FIDELITY
Deprecated. Represents *CONTENT viewing fidelity |
static int |
EXECUTIVE
Deprecated. Represents executive paper size (7.25 x 10.5 inches) |
static int |
LEDGER
Deprecated. Represents ledger paper size (17 x 11 inches) |
static int |
LEGAL
Deprecated. Represents legal paper size (8.5 x 14 inches) |
static int |
LETTER
Deprecated. Represents letter paper size (8.5 x 11 inches) |
static int |
NONE
Deprecated. Represents no paper size |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
SpooledFileViewer()
Deprecated. Constructs a SpooledFileViewer object. |
|
SpooledFileViewer(SpooledFile spooledFile)
Deprecated. Constructs a SpooledFileViewer object. |
|
SpooledFileViewer(SpooledFile spooledFile,
int page)
Deprecated. Constructs a SpooledFileViewer object. |
Method Summary | |
---|---|
void |
actualSize()
Deprecated. Resets the size of the page image to its original size. |
void |
addErrorListener(ErrorListener listener)
Deprecated. Adds a listener to be notified when an error occurs. |
void |
addPropertyChangeListener(PropertyChangeListener listener)
Deprecated. Adds a listener to be notified when the value of any bound property changes. |
void |
addStatusBar()
Deprecated. Adds the status bar. |
void |
addToolBar()
Deprecated. Adds the tool bar. |
void |
addVetoableChangeListener(VetoableChangeListener listener)
Deprecated. Adds a listener to be notified when the value of any constrained property changes. |
void |
addWorkingListener(WorkingListener listener)
Deprecated. Adds a listener to be notified of a working state. |
void |
close()
Deprecated. Closes the viewer. |
protected void |
finalize()
Deprecated. Closes the viewer. |
void |
fitHeight()
Deprecated. Stretches the size of the page image vertically to the edges of the viewing window. |
void |
fitPage()
Deprecated. Stretches the size of the page image horizontally or vertically so the entire view is contained within the edges of the viewing window. |
void |
fitWidth()
Deprecated. Stretches the size of the page image horizontally to the edges of the viewing window. |
int |
getCurrentPage()
Deprecated. Returns the page number of the current page. |
int |
getNumberOfPages()
Deprecated. Returns the number of pages in the spooled file. |
int |
getPaperSize()
Deprecated. Returns the paper size. |
Dimension |
getPreferredSize()
Deprecated. Returns the preferred size of the viewer. |
SpooledFile |
getSpooledFile()
Deprecated. Returns the spooled file being viewed. |
int |
getViewingFidelity()
Deprecated. Returns the viewing fidelity. |
boolean |
isNumberOfPagesEstimated()
Deprecated. Indicates if the number of pages associated with the spooled file being viewed is estimated. |
void |
load()
Deprecated. Loads the spooled file for viewing. |
void |
loadFlashPage()
Deprecated. Loads the previously viewed page. |
void |
loadPage()
Deprecated. Loads the current page for viewing. |
void |
pageBack()
Deprecated. Sets the view back one page. |
void |
pageForward()
Deprecated. Sets the view forward one page. |
void |
removeErrorListener(ErrorListener listener)
Deprecated. Removes an ErrorListener. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Deprecated. Removes a property change listener. |
void |
removeStatusBar()
Deprecated. Removes the status bar. |
void |
removeToolBar()
Deprecated. Removes the tool bar. |
void |
removeVetoableChangeListener(VetoableChangeListener listener)
Deprecated. Removes a vetoable change listener. |
void |
removeWorkingListener(WorkingListener listener)
Deprecated. Removes a WorkingListener. |
void |
setCurrentPage(int newPage)
Deprecated. Sets the current page. |
void |
setPaperSize(int paperSize)
Deprecated. Sets the papersize. |
void |
setSpooledFile(SpooledFile spooledFile)
Deprecated. Sets the spooled file. |
void |
setViewingFidelity(int viewingFidelity)
Deprecated. Sets the viewing fidelity. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int ABSOLUTE_FIDELITY
public static final int CONTENT_FIDELITY
public static final int LETTER
public static final int LEGAL
public static final int A3
public static final int A4
public static final int A5
public static final int B4
public static final int B5
public static final int EXECUTIVE
public static final int LEDGER
public static final int CONT80
public static final int CONT132
public static final int NONE
Constructor Detail |
public SpooledFileViewer()
public SpooledFileViewer(SpooledFile spooledFile)
spooledFile
- The spooled file to view.public SpooledFileViewer(SpooledFile spooledFile, int page)
spooledFile
- The spooled file to view.page
- The initial page to view.Method Detail |
public void actualSize()
public void addErrorListener(ErrorListener listener)
listener
- The listener.public void addPropertyChangeListener(PropertyChangeListener listener)
listener
- The listener.public void addStatusBar()
public void addToolBar()
public void addVetoableChangeListener(VetoableChangeListener listener)
listener
- The listener.public void addWorkingListener(WorkingListener listener)
listener
- The listener.public void close()
protected void finalize() throws Throwable
Throwable
- If an error occurs during cleanup.public void fitHeight()
public void fitPage()
public void fitWidth()
public int getCurrentPage()
public int getNumberOfPages()
isNumberOfPagesEstimated()
public int getPaperSize()
public Dimension getPreferredSize()
public SpooledFile getSpooledFile()
public int getViewingFidelity()
public boolean isNumberOfPagesEstimated()
getNumberOfPages()
public void load() throws IOException, PropertyVetoException
IOException
- Thrown if the spooled file cannot be initialized.
PropertyVetoException
- Thrown if the property change is vetoed.public void loadFlashPage() throws PropertyVetoException
PropertyVetoException
- Thrown if the property change is vetoed.public void loadPage() throws PropertyVetoException
PropertyVetoException
- Thrown if the property change is vetoed.public void pageBack() throws PropertyVetoException
PropertyVetoException
- Thrown if the property change is vetoed.public void pageForward() throws PropertyVetoException
PropertyVetoException
- Thrown if the property change is vetoed.public void removeErrorListener(ErrorListener listener)
listener
- The listener.public void removePropertyChangeListener(PropertyChangeListener listener)
listener
- The listener.public void removeToolBar()
public void removeStatusBar()
public void removeVetoableChangeListener(VetoableChangeListener listener)
listener
- The listener.public void removeWorkingListener(WorkingListener listener)
listener
- The listener.public void setCurrentPage(int newPage) throws PropertyVetoException
newPage
- The page to view.
PropertyVetoException
- Thrown if the property change is vetoed.public void setPaperSize(int paperSize) throws PropertyVetoException
paperSize
- The paper size to be used for processing spooled file pages.
May be any of the following values:
PropertyVetoException
- Thrown if the property change is vetoed.public void setSpooledFile(SpooledFile spooledFile) throws PropertyVetoException
spooledFile
- The spooled file to view.
PropertyVetoException
- Thrown if the property change is vetoed.public void setViewingFidelity(int viewingFidelity) throws PropertyVetoException
viewingFidelity
- The viewing fidelity. If viewing fidelity specified
by viewingFidelity is not valid, no action is taken.
May be any of the following values:
PropertyVetoException
- Thrown if the property change is vetoed.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |