i-net Clear Reports

com.inet.viewer
Interface ReportView

All Superinterfaces:
ViewerComponent
All Known Implementing Classes:
SwingReportView

public interface ReportView
extends ViewerComponent

The ReportView is the top-level instance for a report, it holds references to the report's NavigationView and StatusBar. It offers various navigation methods, as well as the possibility to extract components and replace them with own components. See SwingReportView for an example implementation of this interface.
To obtain an instance of a ReportView, use the methods ReportViewer.addNewReportView(RenderData) and SwingReportViewer.createReportView(RenderData).

Since:
7.0

Field Summary
static java.lang.String CURRENT_PAGE
          Current page property - to be used for PropertyChangeEvents.
static int EXPORT_CSV
          Export Format CSV (Comma separated values)
static int EXPORT_DATA
          Export Format DATA (Comma separated values)
static int EXPORT_HTML
          Export Format HTML
static int EXPORT_PDF
          Export Format PDF
static int EXPORT_PS
          Export Format PS (PostScript Level 1)
static int EXPORT_PS2
          Export Format PS2 (PostScript Level 2)
static int EXPORT_PS3
          Export Format PS3 (PostScript Level 3)
static int EXPORT_RTF
          Export Format RTF
static int EXPORT_SVG
          Export Format SVG (Scalable Vector Graphics)
static int EXPORT_TXT
          Export Format TXT (Plain Text Format)
static int EXPORT_XLS
          Export Format XLS (Microsoft Excel format)
static int EXPORT_XML
          Export Format XML
static float MAX_ZOOM_FACTOR
          The maximum zoom factor
static float MIN_ZOOM_FACTOR
          The minimum zoom factor
static int MODE_HAND
          For scrolling around by click & drag
static int MODE_SNAPSHOT
          For copying an image snapshot by click & drag
static int MODE_TEXT
          For selecting text by click & drag
static java.lang.String PROP_LOADING_STATUS
          Property name for the current loading status of the report view.
static java.lang.String PROP_TIMESTAMP
          Property name for the timestamp of the latest version received of the report, Property value will be a Long.
static int STATUS_CANCELED
          Constant for getLoadingStatus(), means the loading has been canceled by the user
static int STATUS_FINISHED
          Constant for getLoadingStatus(), means the report has been successfully loaded
static int STATUS_INITIALIZED
          Constant for getLoadingStatus(), means the report view is loading for the first time, no pages have been loaded yet.
static int STATUS_LOADING
          Constant for getLoadingStatus(), means at least one page has been loaded and the report view is currently fetching the other pages of the report if there are any
static java.lang.String TOTAL_PAGE_COUNT
          Total Page Count property - to be used for PropertyChangeEvents.
static int TOTAL_PAGE_COUNT_UNKNOWN
          The total number of pages is as of yet unknown
static int VIEW_DOUBLE_CONTINUOUS
          The report can be scrolled through in its entirety, however showing the pages two by two.
static int VIEW_DOUBLE_PAGE
          Only two pages are shown at a time, one next to the other.
static java.lang.String VIEW_IS_AT_END_OF_REPORT
          Whether or not the scroll view is at the end of the report (property is a boolean)
static java.lang.String VIEW_MODE
          View Mode property - to be used for PropertyChangeEvents.
static int VIEW_SINGLE_CONTINUOUS
          The report can be scrolled through in its entirety, with each page being shown above the next.
static int VIEW_SINGLE_PAGE
          Only one page is shown at a time.
static java.lang.String ZOOM_FACTOR
          Zoom factor property - to be used for PropertyChangeEvents.
static int ZOOM_MANUAL
          No automatic zoom
static int ZOOM_TO_FULLPAGE
          Automatically zoom in or out so that the full page is visible, no more, no less.
static int ZOOM_TO_PAGEHEIGHT
          Automatically zoom in or out so that the full height of the page is visible, no more, no less.
static int ZOOM_TO_PAGEWIDTH
          Automatically zoom in or out so that the full width of the page is visible, no more, no less.
 
Method Summary
 Progress export()
          Exports the report connected to this report view.
 Progress export(int format, java.lang.String file)
          Exports the report connected to this report view into the given file.
 Progress export(java.util.Properties exportProperties)
          Exports the report connected to this report view into the given file.
 NavigationView extractNavigationView()
          Removes the navigation view GUI component from the ReportView and returns it.
 StatusBar extractStatusBar()
          Removes the status bar GUI component from the ReportView and returns it.
 int getAutomaticZoomType()
          Returns which type of automatic zoom is used in the report view whenever the ReportView is displayed anew, for example after resizing the display.
 int getCurrentPage()
          Returns the number of the "current page" being displayed in this ReportView.
 javax.print.attribute.HashPrintRequestAttributeSet getDefaultAttributeSet(int fromPage, int toPage)
          Creates and returns a HashPrintRequestAttributeSet for the given page(s) with the default printing attributes.
 int getLoadingStatus()
          Fetches the current "loading status" of this report view.
 int getMouseActionMode()
          Returns the currently selected mode for mouse actions such as clicking and dragging in this ReportView.
 NavigationView getNavigationView()
          Returns this ReportView's NavigationView, that is, the element containing this ReportView's SearchView, GroupView and/or IndexView.
 RenderData getReportData()
          Returns the RenderData object belonging to this ReportView.
 java.lang.String getReportTitle()
          Returns the title of this report if it is known.
 ReportViewer getReportViewer()
          Returns the parent ReportViewer for this component.
 StatusBar getStatusBar()
          Returns this ReportView's StatusBar, the element which can display messages or progress bars.
 int getTotalPages()
          Returns the total number of pages this report has.
 int getViewMode()
          Returns which type of layout view this ReportView is to take.
 float getZoomFactor()
          Returns the currently set zoom factor of this ReportView - this is not a percentage value, that is, 1.0 is 1x, 2.0 is 2x view, 0.25 is 1/4 view, etc.
 void goToLastPage()
          Navigates directly to the last page in the report - if the current page is already the last page of the report, or if the total page count is not known as of yet (that is, the report is still being rendered), this method does nothing.
 void goToPage(int pageNum)
          Causes the page indicated by the parameter pageNum to be displayed in this ReportView.
 boolean hasGroupTree()
          Returns whether or not this report view is set to show a group tree.
 boolean isDrilldownEnabled()
          Returns whether this report view should allow drill downs on its groups if it has any.
 boolean isExportEnabled()
          Returns if at least one export format is enabled for this ReportView.
 boolean isPageLimitExceeded()
          Returns whether this report view has more pages than the server page limit for a report allows for (causing the later pages to be truncated from the report).
 void nextPage()
          Navigates one step forward in the report - if this is not possible (e.g. the current page is already the last page of the report), this method does nothing.
 void prevPage()
          Navigates one step back in the report - if this is not possible (e.g. the current page is already the first page of the report), this method does nothing.
 Progress print(int fromPage, int toPage, boolean showPrintDialog)
          Prints the current report in the page range with or without any dialogs.
 Progress print(int fromPage, int toPage, java.awt.print.PrinterJob pjob)
          Prints the current report to a PrinterJob without any dialogs.
 Progress print(java.awt.print.PrinterJob printerJob, javax.print.attribute.PrintRequestAttributeSet attributeSet)
          Creates a new PrinterJobProgress with the given attributes and start it.
 void refresh()
          Causes this ReportView to refresh its pages by re-fetching the report data - this causes a re-rendering of the report data.
 void reload()
          Causes this ReportView to reload its pages and show them again, using the already fetched data if possible - if not, this causes a fetching of the report data.
 void replaceNavigationView(java.awt.Component component)
          Inserts the given component at the position of the navigation view.
 void replaceStatusBar(java.awt.Component component)
          Inserts the given component at the position of the status bar.
 void setAutoRefresh(int millis)
          Sets the auto-refresh time for this report view.
 void setAutomaticZoomType(int type)
          Sets the type of zoom to use in the report view when the ReportView is displayed anew (for example after resizing the display).
 void setDrilldownEnabled(boolean enabled)
          Sets whether this report view should allow drill downs on its groups if it has any.
 void setHasGroupTree(boolean hasGroupTree)
          Sets this report view to whether or not it is to show a group tree.
 void setMouseActionMode(int mode)
          Sets the mode this ReportView is to be in for mouse actions such as clicking and dragging.
 void setViewMode(int i)
          Sets the type of view this ReportView is to take and causes this view to be displayed immediately.
 void setZoomFactor(float factor)
          Sets the zoom factor to this value.
 void showError(java.lang.Throwable th)
          Displays an error box showing the Throwable's error message.
 
Methods inherited from interface com.inet.viewer.ViewerComponent
getComponent
 

Field Detail

ZOOM_MANUAL

static final int ZOOM_MANUAL
No automatic zoom

Since:
7.0
See Also:
Constant Field Values

ZOOM_TO_PAGEWIDTH

static final int ZOOM_TO_PAGEWIDTH
Automatically zoom in or out so that the full width of the page is visible, no more, no less.

Since:
7.0
See Also:
Constant Field Values

ZOOM_TO_PAGEHEIGHT

static final int ZOOM_TO_PAGEHEIGHT
Automatically zoom in or out so that the full height of the page is visible, no more, no less.

Since:
7.0
See Also:
Constant Field Values

ZOOM_TO_FULLPAGE

static final int ZOOM_TO_FULLPAGE
Automatically zoom in or out so that the full page is visible, no more, no less.

Since:
7.0
See Also:
Constant Field Values

MODE_HAND

static final int MODE_HAND
For scrolling around by click & drag

Since:
7.0
See Also:
Constant Field Values

MODE_TEXT

static final int MODE_TEXT
For selecting text by click & drag

Since:
7.0
See Also:
Constant Field Values

MODE_SNAPSHOT

static final int MODE_SNAPSHOT
For copying an image snapshot by click & drag

Since:
7.0
See Also:
Constant Field Values

VIEW_SINGLE_PAGE

static final int VIEW_SINGLE_PAGE
Only one page is shown at a time.

Since:
7.0
See Also:
Constant Field Values

VIEW_SINGLE_CONTINUOUS

static final int VIEW_SINGLE_CONTINUOUS
The report can be scrolled through in its entirety, with each page being shown above the next.

Since:
7.0
See Also:
Constant Field Values

VIEW_DOUBLE_PAGE

static final int VIEW_DOUBLE_PAGE
Only two pages are shown at a time, one next to the other.

Since:
7.0
See Also:
Constant Field Values

VIEW_DOUBLE_CONTINUOUS

static final int VIEW_DOUBLE_CONTINUOUS
The report can be scrolled through in its entirety, however showing the pages two by two.

Since:
7.0
See Also:
Constant Field Values

TOTAL_PAGE_COUNT_UNKNOWN

static final int TOTAL_PAGE_COUNT_UNKNOWN
The total number of pages is as of yet unknown

Since:
7.0
See Also:
Constant Field Values

EXPORT_PDF

static final int EXPORT_PDF
Export Format PDF

Since:
7.0
See Also:
export(int, String), Constant Field Values

EXPORT_HTML

static final int EXPORT_HTML
Export Format HTML

Since:
7.0
See Also:
export(int, String), Constant Field Values

EXPORT_XLS

static final int EXPORT_XLS
Export Format XLS (Microsoft Excel format)

Since:
7.0
See Also:
export(int, String), Constant Field Values

EXPORT_CSV

static final int EXPORT_CSV
Export Format CSV (Comma separated values)

Since:
7.0
See Also:
export(int, String), Constant Field Values

EXPORT_DATA

static final int EXPORT_DATA
Export Format DATA (Comma separated values)

Since:
7.0
See Also:
export(int, String), Constant Field Values

EXPORT_PS

static final int EXPORT_PS
Export Format PS (PostScript Level 1)

Since:
7.0
See Also:
export(int, String), Constant Field Values

EXPORT_PS2

static final int EXPORT_PS2
Export Format PS2 (PostScript Level 2)

Since:
7.0
See Also:
export(int, String), Constant Field Values

EXPORT_PS3

static final int EXPORT_PS3
Export Format PS3 (PostScript Level 3)

Since:
7.0
See Also:
export(int, String), Constant Field Values

EXPORT_TXT

static final int EXPORT_TXT
Export Format TXT (Plain Text Format)

Since:
7.0
See Also:
export(int, String), Constant Field Values

EXPORT_SVG

static final int EXPORT_SVG
Export Format SVG (Scalable Vector Graphics)

Since:
7.0
See Also:
export(int, String), Constant Field Values

EXPORT_XML

static final int EXPORT_XML
Export Format XML

Since:
7.0
See Also:
export(int, String), Constant Field Values

EXPORT_RTF

static final int EXPORT_RTF
Export Format RTF

Since:
7.0
See Also:
export(int, String), Constant Field Values

MIN_ZOOM_FACTOR

static final float MIN_ZOOM_FACTOR
The minimum zoom factor

Since:
7.0
See Also:
Constant Field Values

MAX_ZOOM_FACTOR

static final float MAX_ZOOM_FACTOR
The maximum zoom factor

Since:
7.0
See Also:
Constant Field Values

STATUS_INITIALIZED

static final int STATUS_INITIALIZED
Constant for getLoadingStatus(), means the report view is loading for the first time, no pages have been loaded yet.

Since:
7.0
See Also:
Constant Field Values

STATUS_LOADING

static final int STATUS_LOADING
Constant for getLoadingStatus(), means at least one page has been loaded and the report view is currently fetching the other pages of the report if there are any

Since:
7.0
See Also:
Constant Field Values

STATUS_FINISHED

static final int STATUS_FINISHED
Constant for getLoadingStatus(), means the report has been successfully loaded

Since:
7.0
See Also:
Constant Field Values

STATUS_CANCELED

static final int STATUS_CANCELED
Constant for getLoadingStatus(), means the loading has been canceled by the user

Since:
7.0
See Also:
Constant Field Values

PROP_TIMESTAMP

static final java.lang.String PROP_TIMESTAMP
Property name for the timestamp of the latest version received of the report, Property value will be a Long. Property changes will be fired as PropertyChangeEvents on Swing implementations of this interface.

Since:
7.0
See Also:
Constant Field Values

PROP_LOADING_STATUS

static final java.lang.String PROP_LOADING_STATUS
Property name for the current loading status of the report view. Property value will be an Integer. Property changes will be fired as PropertyChangeEvents on Swing implementations of this interface.

Since:
7.0
See Also:
getLoadingStatus(), STATUS_CANCELED, STATUS_FINISHED, STATUS_LOADING, STATUS_INITIALIZED, Constant Field Values

VIEW_IS_AT_END_OF_REPORT

static final java.lang.String VIEW_IS_AT_END_OF_REPORT
Whether or not the scroll view is at the end of the report (property is a boolean)

Since:
9.1
See Also:
Constant Field Values

VIEW_MODE

static final java.lang.String VIEW_MODE
View Mode property - to be used for PropertyChangeEvents.

Since:
9.1
See Also:
Constant Field Values

TOTAL_PAGE_COUNT

static final java.lang.String TOTAL_PAGE_COUNT
Total Page Count property - to be used for PropertyChangeEvents.

Since:
9.1
See Also:
Constant Field Values

CURRENT_PAGE

static final java.lang.String CURRENT_PAGE
Current page property - to be used for PropertyChangeEvents.

Since:
9.1
See Also:
Constant Field Values

ZOOM_FACTOR

static final java.lang.String ZOOM_FACTOR
Zoom factor property - to be used for PropertyChangeEvents.

Since:
9.1
See Also:
Constant Field Values
Method Detail

getDefaultAttributeSet

javax.print.attribute.HashPrintRequestAttributeSet getDefaultAttributeSet(int fromPage,
                                                                          int toPage)
Creates and returns a HashPrintRequestAttributeSet for the given page(s) with the default printing attributes. If the first page was not loaded then it will wait until the first page is available.

Parameters:
fromPage - Number of the first page for which to create the HashPrintRequestAttributeSet. The first page of a report has the value 1.
toPage - Number of the last page for which to create the HashPrintRequestAttributeSet. A value of -1 means to create the AttributeSet for all pages starting at startPage.
Returns:
The list of printing attributes for the given pages.
Since:
8.0
See Also:
HashPrintRequestAttributeSet

print

Progress print(int fromPage,
               int toPage,
               boolean showPrintDialog)
Prints the current report in the page range with or without any dialogs. If the first page was not loaded then it will wait until the first page is available.

Parameters:
fromPage - the index of the start page to be printed, the first page is 1.
toPage - the index of the last page to be printed. A value of -1 means all pages.
showPrintDialog - if true, a print dialog is showing.
Returns:
PrinterJobProgress of the running printing job.
Since:
7.0
See Also:
print(int, int, PrinterJob), PrinterJobProgress

print

Progress print(int fromPage,
               int toPage,
               java.awt.print.PrinterJob pjob)
Prints the current report to a PrinterJob without any dialogs. It uses the default PrintRequestAttributeSet of the view. If the first page was not loaded then it will wait until the first page is available.

Parameters:
fromPage - the index of the start page to be printed, the first page is 1.
toPage - the index of the last page to be printed. A value of -1 means all pages.
pjob - A java.awt.print.PrinterJob object.
Returns:
PrinterJobProgress of the running printing job.
Since:
7.0
See Also:
print(int,int,boolean), PrinterJobProgress

print

Progress print(java.awt.print.PrinterJob printerJob,
               javax.print.attribute.PrintRequestAttributeSet attributeSet)
Creates a new PrinterJobProgress with the given attributes and start it.

Parameters:
printerJob - The PrinterJob with the target PrintService.
attributeSet - attributeSet A list of attributes that can override values in the report design, for example paper format, paper orientation and page margins.
Returns:
a PrinterJobProgress
Since:
8.0
See Also:
getDefaultAttributeSet(int, int), PrinterJobProgress

export

Progress export()
Exports the report connected to this report view. At first the export dialog will be displayed. If the user does not cancel the export in the dialog, the export progress will be started after the export dialog has been closed.

Returns:
ExportProgress of running export
Throws:
ViewerException - If exporting has been disabled for this report or no export format has been enabled for this report
Since:
7.0
See Also:
ExportProgress

export

Progress export(int format,
                java.lang.String file)
Exports the report connected to this report view into the given file.
Export formats creating multiple files, e.g. HTML and SVG, creating a sub directory with the name of the first file. All files will be saved in that directory expecting the first file.
This method use the default value for all properties expecting the export format. To export a report into a file without preview in the Java viewer we recommend to use the Engine directly instead of using the Viewer API because the Java viewer have to request the first report page in the Java viewer format before it can request the report in the specified export format.

Parameters:
format - The export format in that the report will be exported.
file - Name of the file in that the report will be exported.
Returns:
ExportProgress of running export
Throws:
ViewerException - If exporting has been disabled for this report or the requested export format is not available for this report
Since:
7.0
See Also:
ExportProgress, EXPORT_CSV, EXPORT_DATA, EXPORT_HTML, EXPORT_PDF, EXPORT_PS, EXPORT_PS2, EXPORT_PS3, EXPORT_RTF, EXPORT_SVG, EXPORT_TXT, EXPORT_XLS, EXPORT_XML

export

Progress export(java.util.Properties exportProperties)
Exports the report connected to this report view into the given file.
This method use the default value for all not specified properties. For a complete list of report URL properties see the documentation.
To export a report into a file without preview in the Java viewer we recommend to use the Engine directly instead of using the Viewer API because the Java viewer have to request the first report page in the Java viewer format before it can request the report in the specified export format.

Parameters:
exportProperties - Properties for the export, including format, file and other properties if they are available for the selected format.
Returns:
ExportProgress of running export
Throws:
ViewerException - If exporting has been disabled for this report or the requested export format is not available for this report
Since:
7.0
See Also:
ExportProgress

isExportEnabled

boolean isExportEnabled()
Returns if at least one export format is enabled for this ReportView.

Returns:
exportEnabled Export enabled for this report; true if at least one format is enabled, false otherwise
Since:
7.0

showError

void showError(java.lang.Throwable th)
Displays an error box showing the Throwable's error message. If a ViewerException is thrown, the special messages and properties of the ViewerException are shown. Otherwise, only the getMessage() as well as the stack trace are shown.

Parameters:
th - Throwable to display in an error box. Best if this Throwable is a ViewerException.
Since:
7.0

getNavigationView

NavigationView getNavigationView()
Returns this ReportView's NavigationView, that is, the element containing this ReportView's SearchView, GroupView and/or IndexView.

Returns:
NavigationView belonging to this ReportView.
Since:
7.0

getStatusBar

StatusBar getStatusBar()
Returns this ReportView's StatusBar, the element which can display messages or progress bars.

Returns:
StatusBar belonging to this ReportView
Since:
7.0

extractStatusBar

StatusBar extractStatusBar()
Removes the status bar GUI component from the ReportView and returns it. If the status bar has already been extracted, nothing happens, and in this case this method is equivalent to getStatusBar().

Returns:
StatusBar of this ReportView
Since:
7.0

extractNavigationView

NavigationView extractNavigationView()
Removes the navigation view GUI component from the ReportView and returns it. If the navigation view has already been extracted, nothing happens, and in this case this method is equivalent to getNavigationView().

Returns:
NavigationView of this ReportView
Since:
7.0

replaceStatusBar

void replaceStatusBar(java.awt.Component component)
Inserts the given component at the position of the status bar. If a status bar component is already there (which is by default), the component is replaced by the given component. Note the status bar itself remains referenced (getStatusBar will return the same object even after calling this method), this method simply places adds a java.awt.Component in its place. If the given component is null, the status bar will simply be removed, equivalent to calling extractStatusBar.

Parameters:
component - Component to position at the status bar position, null if the status bar is simply to be removed.
Since:
7.0

replaceNavigationView

void replaceNavigationView(java.awt.Component component)
Inserts the given component at the position of the navigation view. If a navigation view component is already there (which is by default), the component is replaced by the given component. Note the navigation view itself remains referenced (getNavigationView will return the same object even after calling this method) - this method simply places adds a java.awt.Component in its place. If the given component is null, the navigation view will simply be removed, equivalent to calling extractNavigationView.

Parameters:
component - Component to position at the navigation view position, null if the navigation view is simply to be removed
Since:
7.0

reload

void reload()
Causes this ReportView to reload its pages and show them again, using the already fetched data if possible - if not, this causes a fetching of the report data.

Since:
7.0
See Also:
refresh()

refresh

void refresh()
Causes this ReportView to refresh its pages by re-fetching the report data - this causes a re-rendering of the report data. If "promptOnRefresh" is set, this will cause the prompts to be fetched again as well.

Since:
7.0
See Also:
reload()

goToPage

void goToPage(int pageNum)
Causes the page indicated by the parameter pageNum to be displayed in this ReportView. If this page does not exist in the report, calling this method will do nothing at all. Note this is an asynchronous call - the page will be displayed at some point, but it is not guaranteed that the page is actually visible as soon as this method returns.

Parameters:
pageNum - Number of page (starting at 1) to be displayed in this ReportView.
Since:
7.0

getCurrentPage

int getCurrentPage()
Returns the number of the "current page" being displayed in this ReportView. If more than one PageView is visible, this returns the lowest page visible at this time. If no PageView is visible, this returns 0.

Returns:
Number of the first page currently visible in this ReportView, or 0 if no page is visible.
Since:
7.0

getTotalPages

int getTotalPages()
Returns the total number of pages this report has. If the total number of pages is as of yet unknown (for example if the report is still being rendered), this will return TOTAL_PAGE_COUNT_UNKNOWN.

Returns:
Total number of pages in the report, or TOTAL_PAGE_COUNT_UNKNOWN if still unknown.
Since:
7.0
See Also:
TOTAL_PAGE_COUNT_UNKNOWN

prevPage

void prevPage()
Navigates one step back in the report - if this is not possible (e.g. the current page is already the first page of the report), this method does nothing.

Since:
7.0

nextPage

void nextPage()
Navigates one step forward in the report - if this is not possible (e.g. the current page is already the last page of the report), this method does nothing.

Since:
7.0

goToLastPage

void goToLastPage()
Navigates directly to the last page in the report - if the current page is already the last page of the report, or if the total page count is not known as of yet (that is, the report is still being rendered), this method does nothing. Note this is an asynchronous call - the page will be displayed at some point, but it is not guaranteed that the page is actually visible as soon as this method returns.

Since:
7.0

setViewMode

void setViewMode(int i)
Sets the type of view this ReportView is to take and causes this view to be displayed immediately. By default, possible values are: ReportView.SINGLE_PAGE - only one page is shown at a time. ReportView.SINGLE_CONTINUOUS - the report can be scrolled through in its entirety, with each page being shown above the next. ReportView.DOUBLE_PAGE - only two pages are shown at a time, next to each other. ReportView.DOUBLE_CONTINUOUS - the report can be scrolled through in its entirety, however showing the pages two by two.

Parameters:
i - Layout type to display in this ReportView.
Since:
7.0
See Also:
VIEW_DOUBLE_CONTINUOUS, VIEW_DOUBLE_PAGE, VIEW_SINGLE_PAGE, VIEW_SINGLE_CONTINUOUS

getViewMode

int getViewMode()
Returns which type of layout view this ReportView is to take. By default, possible values are: ReportView.SINGLE_PAGE - only one page is shown at a time. (This is the default setting) ReportView.SINGLE_CONTINUOUS - the report can be scrolled through in its entirety, with each page being shown above the next. ReportView.DOUBLE_PAGE - only two pages are shown at a time, next to each other. ReportView.DOUBLE_CONTINUOUS - the report can be scrolled through in its entirety, however showing the pages two by two.

Returns:
Layout type used by this ReportView
Since:
7.0
See Also:
setViewMode(int), VIEW_DOUBLE_CONTINUOUS, VIEW_DOUBLE_PAGE, VIEW_SINGLE_PAGE, VIEW_SINGLE_CONTINUOUS

setZoomFactor

void setZoomFactor(float factor)
Sets the zoom factor to this value. Only values greater than 0 are allowed. This value is not a percentage value, that is, 2.0 is 2x view, 0.25 is 1/4 view, etc.
If the value is less than MIN_ZOOM_FACTOR, this has the same effect as calling setZoomFactor(MIN_ZOOM_FACTOR).
If the value is greater than MAX_ZOOM_FACTOR, this has the same effect as calling setZoomFactor(MAX_ZOOM_FACTOR).
If you want to zoom relative to the page's size, you shouldn't use this method but rather setAutomaticZoomType(int)

Parameters:
factor - Factor to zoom to - 1.0 as 100%, 2.0 as 200%, etc.
Since:
7.0
See Also:
MIN_ZOOM_FACTOR, MAX_ZOOM_FACTOR, setAutomaticZoomType(int)

setAutomaticZoomType

void setAutomaticZoomType(int type)
Sets the type of zoom to use in the report view when the ReportView is displayed anew (for example after resizing the display). By default, possible values are: ReportView.ZOOM_MANUAL - always use the set zoom factor (settable with setZoom(float factor)) ReportView.ZOOM_TO_PAGEWIDTH - always zoom in or out far enough to see the full width of a page. ReportView.ZOOM_TO_PAGEHEIGHT - always zoom in or out far enough to see the full height of a page. ReportView.ZOOM_TO_FULLPAGE - always zoom in or out far enough to see the full page - this is equivalent to ZOOM_TO_PAGEHEIGHT when the page is a portrait view, or to ZOOM_TO_PAGEWIDTH when the page is a landscape view.

Parameters:
type - Zoom type to use when displaying the ReportView.
Since:
7.0
See Also:
ZOOM_MANUAL, ZOOM_TO_FULLPAGE, ZOOM_TO_PAGEHEIGHT, ZOOM_TO_PAGEWIDTH, getAutomaticZoomType()

getAutomaticZoomType

int getAutomaticZoomType()
Returns which type of automatic zoom is used in the report view whenever the ReportView is displayed anew, for example after resizing the display. By default, possible values are: ReportView.ZOOM_MANUAL - always use the set zoom factor (default setting. Zoom factor is settable with setZoom(float factor)) ReportView.ZOOM_TO_PAGEWIDTH - always zoom in or out far enough to see the full width of a page. ReportView.ZOOM_TO_PAGEHEIGHT - always zoom in or out far enough to see the full height of a page. ReportView.ZOOM_TO_FULLPAGE - always zoom in or out far enough to see the full page - this is equivalent to ZOOM_TO_PAGEHEIGHT when the page is a portrait view, or to ZOOM_TO_PAGEWIDTH when the page is a landscape view.

Returns:
Currently chosen automatic zoom type used by this ReportView
Since:
7.0
See Also:
ZOOM_MANUAL, ZOOM_TO_PAGEHEIGHT, ZOOM_TO_PAGEWIDTH, ZOOM_TO_FULLPAGE, setAutomaticZoomType(int)

getZoomFactor

float getZoomFactor()
Returns the currently set zoom factor of this ReportView - this is not a percentage value, that is, 1.0 is 1x, 2.0 is 2x view, 0.25 is 1/4 view, etc.

Returns:
The zoom factor currently set for this ReportView.
Since:
7.0

setMouseActionMode

void setMouseActionMode(int mode)
Sets the mode this ReportView is to be in for mouse actions such as clicking and dragging. By default, possible values are: ReportView.MODE_HAND - Click and drag causes a scrolling of the page along with the mouse movement. ReportView.MODE_TEXT - Click and drag causes a text selection, line by line. ReportView.MODE_SNAPSHOT - Click and drag causes an image snapshot within a box at release of the mouse button.

Parameters:
mode - Mouse mode to be used in the ReportView.
Since:
7.0
See Also:
MODE_HAND, MODE_SNAPSHOT, MODE_TEXT

getMouseActionMode

int getMouseActionMode()
Returns the currently selected mode for mouse actions such as clicking and dragging in this ReportView. By default, possible values are: ReportView.MODE_HAND - Click and drag causes a scrolling of the page along with the mouse movement. ReportView.MODE_TEXT - Click and drag causes a text selection, line by line. ReportView.MODE_SNAPSHOT - Click and drag causes an image snapshot within a box at release of the mouse button.

Returns:
The currently selected mode for mouse actions such as clicking and dragging within this ReportView
Since:
7.0
See Also:
MODE_HAND, MODE_SNAPSHOT, MODE_TEXT

setHasGroupTree

void setHasGroupTree(boolean hasGroupTree)
Sets this report view to whether or not it is to show a group tree. If this is false, the report view should not show any group tree, regardless of whether or not its report has groups.

Parameters:
hasGroupTree - Is this report view to show a group tree?
Since:
7.0
See Also:
getNavigationView(), extractNavigationView()

hasGroupTree

boolean hasGroupTree()
Returns whether or not this report view is set to show a group tree. If it is false, the report view will not show any group tree. Note this says nothing about whether or not the report actually has groups or not.

Returns:
Whether this report view is to show a group tree or not if the report should have groups
Since:
7.0

getReportData

RenderData getReportData()
Returns the RenderData object belonging to this ReportView. The RenderData object is the source of report data for this ReportView. If this is null, the ReportView has no connection to a RenderData source and should be considered obsolete.

Returns:
The RenderData object belonging to this ReportView
Since:
7.0

getReportViewer

ReportViewer getReportViewer()
Returns the parent ReportViewer for this component.

Returns:
the parent ReportViewer for this component
Since:
7.0

getReportTitle

java.lang.String getReportTitle()
Returns the title of this report if it is known. If not known, the title returned will be null.

Returns:
The report title of this report if known. Will return null if not known
Since:
7.0
See Also:
RenderData.setReportTitle(String)

getLoadingStatus

int getLoadingStatus()
Fetches the current "loading status" of this report view. By default, possible values are:

Returns:
Current loading status of the report view.
Since:
7.0
See Also:
STATUS_CANCELED, STATUS_FINISHED, STATUS_INITIALIZED, STATUS_LOADING

setAutoRefresh

void setAutoRefresh(int millis)
Sets the auto-refresh time for this report view. This will cause this view to be refreshed every millis milliseconds. Note that if the report has prompts, its prompts will not be re-requested at each auto-refresh. Also, a refresh will be skipped if the prompt dialog is currently open, if the report is already currently being refreshed, if the report was manually canceled or if it was stopped due to an error.

Parameters:
millis - number of milliseconds for auto-refresh cycle, 0 to turn off auto-refresh
Since:
9.0

setDrilldownEnabled

void setDrilldownEnabled(boolean enabled)
Sets whether this report view should allow drill downs on its groups if it has any. If not, right clicking a group node will not offer "drill down" as an option. The default value for this is "true" unless set differently as a ViewerSettings entry.

Parameters:
enabled - true if it is to be enabled
Since:
10.0

isDrilldownEnabled

boolean isDrilldownEnabled()
Returns whether this report view should allow drill downs on its groups if it has any. If not, right clicking a group node will not offer "drill down" as an option. The default value for this is "true" unless set differently in setDrilldownEnabled(boolean) and/or as a ViewerSettings entry.

Returns:
whether this report view should allow drill downs on its groups
Since:
10.0

isPageLimitExceeded

boolean isPageLimitExceeded()
Returns whether this report view has more pages than the server page limit for a report allows for (causing the later pages to be truncated from the report).

Returns:
whether this report view has more pages than the server page limit
Since:
10.1

i-net Clear Reports

Copyright © 1999-2011 by i-net software GmbH