public interface ReportViewer extends ViewerComponent
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROP_STATUS_MESSAGE
Property for use by the
PropertyChangeListener , standing for a change in the status bar
message |
static java.lang.String |
UIPROP_SCROLLPANE_BACKGROUND
UI property key for setting the background color in the scroll pane area of the
Viewer where no page can be seen.
|
Modifier and Type | Method and Description |
---|---|
ReportView |
addNewReportView(RenderData data,
boolean isClosable)
Creates a new ReportView object, using the RenderData parameter as its source of report data.
|
ReportView |
addNewReportView(RenderData data)
Creates a new ReportView object, using the RenderData parameter as its source of report data.
|
void |
addReportView(ReportView view,
boolean isClosable)
Adds a given ReportView to the ReportViewer - this ReportView need not be
initialized at this point in time.
|
void |
addReportView(ReportView view)
Adds a given ReportView to the ReportViewer - this ReportView need not be
initialized at this point in time.
|
void |
addReportViewChangeListener(ReportViewChangeListener rvcl)
Adds an
ReportViewChangeListener to the ReportView. |
void |
addStateChangeListener(java.beans.PropertyChangeListener l)
Adds a
PropertyChangeListener to the listener list. |
void |
closeAllReportViews()
This method permanently closes and removes all ReportViews currently in the ReportViewer.
|
void |
closeReportView(int index)
Permanently closes and removes the ReportView at the given index, 0-based.
|
void |
closeReportView(ReportView view)
Permanently closes and disposes the ReportView given as the parameter and removes it from the ReportViewer.
|
ReportView |
getCurrentReportView()
Returns the currently visible or selected ReportView object.
|
ProgressPool |
getProgressPool()
Returns the
ProgressPool of the viewer. |
ReportView |
getReportView(int i)
Returns the report view at the given index.
|
int |
getReportViewCount()
Returns the number of ReportViews registered and added to this viewer.
|
ToolBar |
getToolBar()
Returns the current ToolBar - this tool bar belongs to the currently visible or
selected ReportView object.
|
ViewerContext |
getViewerContext()
Returns the current ViewerContext for this viewer, which is used for reacting to and handling events occurring in the viewer.
|
boolean |
hasGroupTree()
Returns whether the global "hasGroupTree" setting is on or off (by default it is
on).
|
boolean |
hasStatusBar()
Returns whether the global setting of "hasStatusBar" is on or off (by default it is on).
|
void |
removeReportViewChangeListener(ReportViewChangeListener rvcl)
Removes an
ReportViewChangeListener from the ReportView. |
void |
removeStateChangeListener(java.beans.PropertyChangeListener l)
Removes a
PropertyChangeListener from the list of listeners. |
void |
setCurrentReportView(ReportView view)
Sets which ReportView is currently selected and to be affected by any toolbar
actions, etc.
|
void |
setCustomPromptEditor(java.lang.String promptName,
int valueType,
CustomPromptEditor editor)
Registers the given
CustomPromptEditor for prompts with the given name and value type,
case-insensitive. |
void |
setHasGroupTree(boolean hasGroupTree)
Sets all report views to whether or not they are to show a group tree.
|
void |
setHasStatusBar(boolean hasStatusBar)
Sets for all report views whether or not they are to show a status bar.
|
void |
setViewerContext(ViewerContext context)
Sets the ViewerContext for this viewer, used for reacting to and handling events which occur in the viewer.
|
getComponent
static final java.lang.String PROP_STATUS_MESSAGE
PropertyChangeListener
, standing for a change in the status bar
messagestatic final java.lang.String UIPROP_SCROLLPANE_BACKGROUND
Color.LIGHT_GRAY
is
taken by default.ReportView getCurrentReportView()
int getReportViewCount()
getReportView(int)
.ReportView getReportView(int i)
getReportViewCount()-1
, the minimum allowed is 0.i
- Index of report view to fetch.java.lang.IndexOutOfBoundsException
- If index is smaller than 0 or is greater than or equal to getReportViewCount().void setCurrentReportView(ReportView view)
getCurrentReportView()
. This method makes
sure that the correct report view is set as "current".ReportViewChangeListener
of a change in
the currently selected report view.view
- ReportView to give focus to and to set as "current" report view.getCurrentReportView()
ToolBar getToolBar()
void addReportView(ReportView view, boolean isClosable)
closeReportView(int)
or closeAllReportViews()
.view
- ReportView to addisClosable
- Whether the report view is to have a close buttoncloseReportView(int)
,
closeReportView(ReportView)
,
closeAllReportViews()
ReportView addNewReportView(RenderData data, boolean isClosable)
closeReportView(int)
or closeAllReportViews()
.
data
- RenderData object specifying the source of report dataisClosable
- Whether the report view is to have a close buttoncloseReportView(int)
,
closeReportView(ReportView)
,
closeAllReportViews()
void addReportView(ReportView view)
closeReportView(int)
or closeAllReportViews()
. In this case, it can not be added
back to the viewer via this method. Instead it must be recreated with the RenderData
.addReportView(ReportView, boolean)
instead, where you can manually set whether or not the view
is to have a close button.view
- ReportView to addjava.lang.IllegalStateException
- if this view has previously been removed via
closeReportView(ReportView)
or closeReportView(int)
or closeAllReportViews()
.closeReportView(int)
,
closeReportView(ReportView)
,
closeAllReportViews()
,
addReportView(ReportView, boolean)
ReportView addNewReportView(RenderData data)
closeReportView(int)
or closeAllReportViews()
. In this case, it can not be added
back to the Viewer via this method. Instead it must be recreated with the RenderData.addNewReportView(RenderData, boolean)
instead, where you can manually set whether or not the view
is to have a close button.
data
- RenderData object specifying the source of report datajava.lang.IllegalStateException
- if this view has previously been removed via
closeReportView(ReportView)
or closeReportView(int)
or
closeAllReportViews()
.closeReportView(int)
,
closeReportView(ReportView)
,
closeAllReportViews()
,
addNewReportView(RenderData, boolean)
void closeReportView(int index)
closeReportView(0)
will close and remove the first ReportView added to the Viewer, closeReportView(1)
the second, etc.
This will also close any currently open connections to the ReportView's RenderData object.
Note that this causes the report view to be disposed of - trying to add it back to the viewer
via addReportView(ReportView, boolean)
will result in an IllegalStateException. Instead
simply create a new report view with the same RenderData.
If there is no ReportView at this index, this method will throw a ViewerException.index
- Index of ReportView to close and remove.void closeReportView(ReportView view)
addReportView(ReportView, boolean)
will result in an IllegalStateException. Instead
simply create a new report view with the same RenderData.view
- ReportView to close and remove from the ReportViewervoid closeAllReportViews()
addReportView(ReportView, boolean)
will result in an IllegalStateException. Instead
simply create a new report view with the same RenderData.void addReportViewChangeListener(ReportViewChangeListener rvcl)
ReportViewChangeListener
to the ReportView.rvcl
- the ReportViewChangeListener
to be addedvoid removeReportViewChangeListener(ReportViewChangeListener rvcl)
ReportViewChangeListener
from the ReportView.rvcl
- the listener to be removedvoid setHasGroupTree(boolean hasGroupTree)
hasGroupTree
- Are all report views to show a group tree?boolean hasGroupTree()
void setHasStatusBar(boolean hasStatusBar)
hasStatusBar
- Are all report views to show a status bar?boolean hasStatusBar()
ProgressPool getProgressPool()
ProgressPool
of the viewer. The ProgressPool handles all progresses
of the viewer. You can add listeners to the ProgressPool to watch status changes of
the progresses.void addStateChangeListener(java.beans.PropertyChangeListener l)
PropertyChangeListener
to the listener list. The listener will
be informed about status changes of all progresses and messages changes
in the StatusBar.l
- PropertyChangeListener to add to the list of listenersvoid removeStateChangeListener(java.beans.PropertyChangeListener l)
PropertyChangeListener
from the list of listeners.l
- PropertyChangeListener to remove from the list of listeners.void setViewerContext(ViewerContext context)
context
- ViewerContext to use for this viewer. Can not be null.java.lang.IllegalArgumentException
- If context is null.ViewerContext
ViewerContext getViewerContext()
SwingViewerContext
.ViewerContext
void setCustomPromptEditor(java.lang.String promptName, int valueType, CustomPromptEditor editor)
CustomPromptEditor
for prompts with the given name and value type,
case-insensitive. Setting null as the editor unregisters any CustomPromptEditor
for the given name and value type. An existing CustomPromptEditor
for the given name and value type will be
replaced with the one set with this method.
Depending on the value type of the prompt, your custom prompt editor should return
one of the following types:
For single value prompts:
promptName
- name of prompt to register custom prompt editor for, may not be nullvalueType
- value type of the promptName. Use the constants form the class PromptData for the types.editor
- custom prompt editor for prompting certain prompts with
your own components.java.lang.NullPointerException
- if promptName is nullCopyright © 1999-2020 by i-net software GmbH