Style Intelligence v12.0

inetsoft.report
Interface PreviewView

All Known Implementing Classes:
Previewer, ViewFrame, ViewPreviewPane

public interface PreviewView

The PreviewView interface defines the API for previewers. An instance of a PreviewView can be obtained by calling Previewer.getPreviewView(). The type of the returned previewer depends on the runtime environment of the application/applet. If it's running in JDK1.2 or later, the previewer instance is a Previewer2D object, which is based on the Swing and Java2D APIs. If it's running in JDK1.1 environment, the previewer instance is a Previewer object, which is based on the AWT components and the basic graphics API.

    PreviewView previewer = Previewer.getPreviewView();
    previewer.pack();
    previewer.setVisible(true);
    previewer.print(report);
 


Field Summary
static int CLOSE_BUTTON
          Close button.
static int FULL_SCREEN_BUTTON
          Full screen button.
static int N_PAGE_BUTTON
          Multiple page button.
static int ONE_PAGE_BUTTON
          One page button.
static int PRINT_BUTTON
          Print button.
static int ZOOM_BUTTON
          Zoom control.
 
Method Summary
 void addDisposeListener(ActionListener l)
          Add a dispose listener which will be notified when the preview view be disposed.
 void addSelectionListener(SelectionListener l)
          Add a selection listener.
 void addToolbarComponent(Component comp)
          Add a component to the toolbar.
 int getOrientation()
          Returns the orientation of this PageFormat.
 double getPageHeight()
          Get the page height in inches.
 int getPageResolution()
          Deprecated. as of 5.1.
 double getPageWidth()
          Get the page width in inches.
 ReportSheet getReport()
          Get the report displayed in this previewer.
 Enumeration getStylePages()
          Get the style pages in the preview frame.
 double getZoom()
          Get the zoom percentage.
 void pack()
          Causes this Window to be sized to fit the preferred size and layouts of its subcomponents.
 void print(ReportSheet sheet)
          Print the report in this previewer.
 void printAction()
          Start printing to printer.
 void removeSelectionListener(SelectionListener l)
          Remove a selection listener.
 void setExitOnClose(boolean exitit)
          If the ExitOnClose is set to true, the Previewer exits from the application when the previewer window is closed.
 void setOrientation(int orientation)
          Deprecated. as of 5.1.
 void setPageHeight(double height)
          Deprecated. as of 5.1.
 void setPageResolution(int res)
          Deprecated. as of 5.1.
 void setPageWidth(double width)
          Deprecated. as of 5.1.
 void setPreferredSize(Dimension size)
          Set the preferred size of the previewer window.
 void setStylePages(Enumeration pages)
          Display the StylePages in the preview pane.
 void setTitle(String title)
          Set the preview window title.
 void setToolbarButtons(int buttons)
          Set the buttons on the toolbar.
 void setVisible(boolean b)
          Shows or hides this component depending on the value of parameter b.
 void writeReport(OutputStream os)
          Writes the previewed report to a .sro file
 void zoom(double perc)
          Set the zooming percentage.
 

Field Detail

PRINT_BUTTON

static final int PRINT_BUTTON
Print button.

See Also:
Constant Field Values

ONE_PAGE_BUTTON

static final int ONE_PAGE_BUTTON
One page button.

See Also:
Constant Field Values

N_PAGE_BUTTON

static final int N_PAGE_BUTTON
Multiple page button.

See Also:
Constant Field Values

FULL_SCREEN_BUTTON

static final int FULL_SCREEN_BUTTON
Full screen button.

See Also:
Constant Field Values

ZOOM_BUTTON

static final int ZOOM_BUTTON
Zoom control.

See Also:
Constant Field Values

CLOSE_BUTTON

static final int CLOSE_BUTTON
Close button.

See Also:
Constant Field Values
Method Detail

setTitle

void setTitle(String title)
Set the preview window title.

Parameters:
title - previewer title.

setToolbarButtons

void setToolbarButtons(int buttons)
Set the buttons on the toolbar.

Parameters:
buttons - bit-wise OR of the button masks.

addToolbarComponent

void addToolbarComponent(Component comp)
Add a component to the toolbar.


setPageWidth

void setPageWidth(double width)
Deprecated. as of 5.1.

Set the page width in inches. This is the width after the orientation is taken into account.

Parameters:
width - page width.

getPageWidth

double getPageWidth()
Get the page width in inches.

Returns:
page width.

setPageHeight

void setPageHeight(double height)
Deprecated. as of 5.1.

Set the page height in inches. This is the height after the orientation is taken into account.

Parameters:
height - page height.

getPageHeight

double getPageHeight()
Get the page height in inches.

Returns:
page height.

setOrientation

void setOrientation(int orientation)
Deprecated. as of 5.1.

Sets the page orientation. orientation must be one of the constants: PORTRAIT, LANDSCAPE.

Parameters:
orientation - the new orientation for the page

getOrientation

int getOrientation()
Returns the orientation of this PageFormat.

Returns:
this PageFormat object's orientation.

setPageResolution

void setPageResolution(int res)
Deprecated. as of 5.1.

Set the page resolution, as number of dots per inch. The default is 72.

Parameters:
res - page resolution.

getPageResolution

int getPageResolution()
Deprecated. as of 5.1.

Get the page resolution.

Returns:
page resolution.

getStylePages

Enumeration getStylePages()
Get the style pages in the preview frame.


setStylePages

void setStylePages(Enumeration pages)
Display the StylePages in the preview pane.

Parameters:
pages - return a collection of StylePage objects.

print

void print(ReportSheet sheet)
Print the report in this previewer.

Parameters:
sheet - report.

getReport

ReportSheet getReport()
Get the report displayed in this previewer.


zoom

void zoom(double perc)
Set the zooming percentage. 100% is 1.0.

Parameters:
perc - zooming percentage.

getZoom

double getZoom()
Get the zoom percentage.


printAction

void printAction()
Start printing to printer. This will popup the print dialog. It has the same effect as an user clicking on the 'printer' button.


addSelectionListener

void addSelectionListener(SelectionListener l)
Add a selection listener. The listener is notified if an user clicks inside a table or a chart.


removeSelectionListener

void removeSelectionListener(SelectionListener l)
Remove a selection listener.


setExitOnClose

void setExitOnClose(boolean exitit)
If the ExitOnClose is set to true, the Previewer exits from the application when the previewer window is closed.


setPreferredSize

void setPreferredSize(Dimension size)
Set the preferred size of the previewer window.


pack

void pack()
Causes this Window to be sized to fit the preferred size and layouts of its subcomponents. If the window and/or its owner are not yet displayable, both are made displayable before calculating the preferred size. The Window will be validated after the preferredSize is calculated.

See Also:
Component.isDisplayable()

setVisible

void setVisible(boolean b)
Shows or hides this component depending on the value of parameter b.

Parameters:
b - If true, shows this component; otherwise, hides this component.

addDisposeListener

void addDisposeListener(ActionListener l)
Add a dispose listener which will be notified when the preview view be disposed.


writeReport

void writeReport(OutputStream os)
Writes the previewed report to a .sro file


Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.