i-net Clear Reports

com.inet.designer
Class AbstractDesignerDataModel

java.lang.Object
  extended by com.inet.designer.AbstractDesignerDataModel
All Implemented Interfaces:
DesignerDataModel
Direct Known Subclasses:
BasicDesignerDataModel

public abstract class AbstractDesignerDataModel
extends java.lang.Object
implements DesignerDataModel

The data model describes the way the i-net Designer creates, loads and stores its reports. The default implementation is based on the file system, but you may want to store the reports in a database instead or maybe you simply want to restrict the access to certain files.


Field Summary
 
Fields inherited from interface com.inet.designer.DesignerDataModel
TYPE_COMMAND, TYPE_CONNECTION, TYPE_SPROC, TYPE_SPROC_WITH_PARAM, TYPE_SYSTEM_TABLE, TYPE_TABLE, TYPE_VIEW, TYPE_VIEW_WITH_PARAM
 
Constructor Summary
AbstractDesignerDataModel()
          Initializes this DesignerDataModel implementation.
 
Method Summary
 void addedElement(Element element)
          This method is called if the user has added an element to the report.
 void addedGroup(Group group)
          This method is called if a group was added to the report by the user.
 void addedSubreport(Engine engine)
          This method is called if a subreport was added to the current report.
 void closedReport(Engine engine)
          This method is called if a report was closed.
 void closedSubreport(Engine engine)
          This method is called if a subreport was closed by the user.
 SwingReportViewer createViewer()
          creates a new SwingReportViewer and initializes it with the necessary ViewerContext, as well as piping its log stream to the appropriate position (via SwingReportViewer.setLoggingStream(java.io.PrintStream).
 java.io.File getApplicationDirectory()
          Returns the location of the application directory which is the directory where the designer is located in.
 java.util.ArrayList getAvailableFonts()
          Returns a list of all available fonts for the designer.
 java.util.List getAvailableFontsFromRepository()
          fetches a list of fonts available on the repository configured for the designer
 boolean isAddElementAllowed(int elementType)
          This method checks if its allowed to add a element to a report with the i-net Designer.
 boolean isAddGroupAllowed()
          This method checks if its allowed to add new groups to any report.
 boolean isAddSectionAllowed()
          This method checks if its allowed to add a new section to a report with the i-net Designer.
 boolean isCloseAllowed()
          This method checks if its allowed to close reports opened with the i-net Designer.
 boolean isDataSourceManagerAllowed()
          Returns whether the datasource manager dialog is accessible or not.
 boolean isDatabaseChangeAllowed()
          Check if the database configuration may be changed.
 boolean isDatabaseObjectVisible(int databaseObjectType, java.lang.String databaseObjectName)
          Checks if the given database object should be visible in the database browser.
 boolean isDesignNeedsConnection()
          This method checks if the with the i-net Designer opened reports need a database connection.
 boolean isInetTemplatesEnabled()
          Returns true if the templates supplied through i-net will be enabled or not.
 boolean isInvalidSPSelectable()
          This method checks if a invalid connection is selectable in the virtual database dialog.
 boolean isOpenAllowed()
          Check if opening reports is allowed.
 boolean isPreviewTabVisible()
          Checks if the preview tab should be visible or not.
 boolean isRemoveElementAllowed(int elementType)
          This method checks if its allowed to remove a element from a report with the i-net Designer.
 boolean isRemoveGroupAllowed()
          This method checks if its allowed to remove a group from the report opened with the i-net Designer.
 boolean isRemoveSectionAllowed()
          This method checks if its allowed to remove section from a report with the i-net Designer.
 boolean isReopenAllowed()
          This method checks if its allowed to reopen a report with the i-net Designer.
 boolean isReportWizardEnabled()
          Returns true if a new report shall be created using the ReportWizard.
 boolean isSaveAllowed()
          Check if save is allowed.
 boolean isSaveAsAllowed()
          Check if save as is allowed.
 boolean isTablesChangeAllowed()
          Check if tables may be added or removed and if the links may be changed.
 Engine[] loadReportsFrom(java.awt.Component parent, java.net.URL initialURL)
          Loads one or more report.
 void openFromRepository()
          Opens a dialog enabling the user to choose a report file to open from the repository configured for the designer.
 void openGroupDialog(Group group)
          This method is called if the user wants to open the dialog for a group.
 FormulaField openGroupSelectionFormulaDialog(FormulaField formulafield)
          This method is called if the user wants to open the dialog for a group selection formula.
 void openJavaBeanDialog()
          This method is called if the user wants to open the Java Bean dialog.
 void openPageLayoutDialog()
          This method is called if the user wants to open the Page Layout dialog.
 void openParameterDialog(PromptField parameterField)
          This method is called if the user wants to open the dialog for a parameter field.
 FormulaField openPropertyFormulaDialog(FormulaField formulafield, int valueType, Element element, java.lang.Object defaultValue)
          This method is called if the user wants to open the dialog for a property formula.
 FormulaField openRecordSelectionFormulaDialog(FormulaField formulafield)
          This method is called if the user wants to open the dialog for a record selection formula.
 void openRepositoryConfigDialog()
          Opens a repository configuration dialog which enables the user to choose the repository URL he wants to employ when opening and saving reports on a repository.
 SQLField openSQLDialog(SQLField sqlField)
          This method is called if the user wants to open the dialog for a SQL field.
 void openSectionDialog(Section section)
          This method is called if the user wants to open the Section dialog.
 void openSortRecordsDialog()
          This method is called if the user wants to open the Records dialog.
 void openSubreportLinksDialog(java.lang.String reportName)
          This method is called if the user wants to open the Subreport links dialog.
 void openSumDialog(SummaryField sumfield)
          This method is called if the user wants to open the dialog for a summary field.
 void openSummaryInfoDialog()
          This method is called if the user wants to open the Summary Info dialog.
 FormulaField openUserFormulaDialog(FormulaField formulafield)
          This method is called if the user wants to open the dialog for a user defined formula.
 void openVisualDatabaseWizardDialog()
          This method is called if the user wants to open the Visual Database Wizard dialog.
 void openedSubreport(Engine engine)
          This method is called if a subreport was opened by the user to edit it.
 void removedElement(Element element)
          This method is called if the user has removed an element from the report.
 void removedGroup(Group group)
          This method is called if a group was removed from the report by the user.
 void removedSubreport(Engine engine)
          This method will be called if a subreport was removed from the current report.
 Engine reopenReport(java.io.File reportFile)
          Load a report.
 void saveOnRepository()
          Opens up a save dialog which enables the user to save a report onto the repository configured for the designer.
 void setAddElementAllowed(boolean isAddElementAllowed, int elementType)
          Set if its allowed to add a element to a report with the i-net Designer.
 void setAddGroupAllowed(boolean isAddGroupAllowed)
          Set if its allowed to add new groups to the reports.
 void setAddSectionAllowed(boolean isAddSectionAllowed)
          Set if its allowed to add a new section to a report with the i-net Designer.
 void setCloseAllowed(boolean isCloseAllowed)
          Set if its allowed to close reports opened with the i-net Designer.
 void setDataSourceManagerAllowed(boolean isAllowed)
          Sets whether the datasource manager dialog shall be accessible or not.
 void setDatabaseChangeAllowed(boolean databaseChangeAllowed)
          Set if changes to the connection are allowed.
 void setDesignNeedsConnection(boolean designNeedsConnection)
          Set if the with the i-net Designer opened reports need a database connection.
 void setIsInvalidSPSelectable(boolean newSIISPS)
          Set if a invalid connection is selectable in the virtual database dialog.
 void setOpenAllowed(boolean openAllowed)
          Set if open is allowed.
 void setPreviewTabVisible(boolean previewTabVisible)
          Use this method to enable/disable the preview tab of the i-net Designer.
 void setRemoveElementAllowed(boolean isRemoveElementAllowed, int elementType)
          Set if its allowed to remove a element from a report with the i-net Designer.
 void setRemoveGroupAllowed(boolean isRemoveGroupAllowed)
          Set if its allowed to remove a group from the report opened with the i-net Designer.
 void setRemoveSectionAllowed(boolean isRemoveSectionAllowed)
          Set if its allowed to remove a section from a report with the i-net Designer.
 void setReopenAllowed(boolean isReopenAllowed)
          Set if its allowed to reopen a report with the i-net Designer.
 void setSaveAllowed(boolean saveAllowed)
          Set if save is allowed.
 void setSaveAsAllowed(boolean saveAsAllowed)
          Set if save as is allowed.
 void setTablesChangeAllowed(boolean tablesChangeAllowed)
          Set if tables may be changed.
 
Methods inherited from interface com.inet.designer.DesignerDataModel
createNewReport, loadReport, loadReportFrom, saveReport
 

Constructor Detail

AbstractDesignerDataModel

public AbstractDesignerDataModel()
Initializes this DesignerDataModel implementation.

Method Detail

getApplicationDirectory

public java.io.File getApplicationDirectory()
Returns the location of the application directory which is the directory where the designer is located in.

Specified by:
getApplicationDirectory in interface DesignerDataModel
Returns:
The directory where the designer is located in.
Since:
7.0

isReportWizardEnabled

public boolean isReportWizardEnabled()
Returns true if a new report shall be created using the ReportWizard.

Specified by:
isReportWizardEnabled in interface DesignerDataModel
Returns:
true <=> Create a new report using the ReportWizard.
Since:
7.0

isInetTemplatesEnabled

public boolean isInetTemplatesEnabled()
Returns true if the templates supplied through i-net will be enabled or not.

Specified by:
isInetTemplatesEnabled in interface DesignerDataModel
Returns:
true <=> The templates supplied through i-net will be enabled.
Since:
7.0

getAvailableFonts

public java.util.ArrayList getAvailableFonts()
Returns a list of all available fonts for the designer.

Specified by:
getAvailableFonts in interface DesignerDataModel
Returns:
A list of all available fonts.
Since:
9.1

getAvailableFontsFromRepository

public java.util.List getAvailableFontsFromRepository()
fetches a list of fonts available on the repository configured for the designer

Specified by:
getAvailableFontsFromRepository in interface DesignerDataModel
Returns:
list of fonts available on the repository configured for the designer
Since:
9.2

isPreviewTabVisible

public boolean isPreviewTabVisible()
Checks if the preview tab should be visible or not.

Specified by:
isPreviewTabVisible in interface DesignerDataModel
Returns:
true if the preview tab should be visible otherwise false

setPreviewTabVisible

public void setPreviewTabVisible(boolean previewTabVisible)
Use this method to enable/disable the preview tab of the i-net Designer.

Specified by:
setPreviewTabVisible in interface DesignerDataModel
Parameters:
previewTabVisible - true to allow, false to deny

isDatabaseObjectVisible

public boolean isDatabaseObjectVisible(int databaseObjectType,
                                       java.lang.String databaseObjectName)
Checks if the given database object should be visible in the database browser.

Specified by:
isDatabaseObjectVisible in interface DesignerDataModel
Parameters:
databaseObjectType - The type of the database object. This will be one of the following table, system table, view or stored procedure
databaseObjectName - The name of the database object (e.g. of a table)
Returns:
In the AbstractDesignerDataModel this will always return true

isDatabaseChangeAllowed

public boolean isDatabaseChangeAllowed()
Check if the database configuration may be changed.

Specified by:
isDatabaseChangeAllowed in interface DesignerDataModel
Returns:
true if it is allowed to change the database configuration.

isOpenAllowed

public boolean isOpenAllowed()
Check if opening reports is allowed.

Specified by:
isOpenAllowed in interface DesignerDataModel
Returns:
true if it is allowed to open reports

isSaveAllowed

public boolean isSaveAllowed()
Check if save is allowed.

Specified by:
isSaveAllowed in interface DesignerDataModel
Returns:
true if it is allowed to save reports

isSaveAsAllowed

public boolean isSaveAsAllowed()
Check if save as is allowed.

Specified by:
isSaveAsAllowed in interface DesignerDataModel
Returns:
true if it is allowed to save reports with a new name (Save As)

isTablesChangeAllowed

public boolean isTablesChangeAllowed()
Check if tables may be added or removed and if the links may be changed.

Specified by:
isTablesChangeAllowed in interface DesignerDataModel
Returns:
true if it is allowed to add or remove tables

setDatabaseChangeAllowed

public void setDatabaseChangeAllowed(boolean databaseChangeAllowed)
Set if changes to the connection are allowed.

Specified by:
setDatabaseChangeAllowed in interface DesignerDataModel
Parameters:
databaseChangeAllowed - true to allow, false to deny

setOpenAllowed

public void setOpenAllowed(boolean openAllowed)
Set if open is allowed.

Specified by:
setOpenAllowed in interface DesignerDataModel
Parameters:
openAllowed - true to allow, false to deny

setSaveAllowed

public void setSaveAllowed(boolean saveAllowed)
Set if save is allowed.

Specified by:
setSaveAllowed in interface DesignerDataModel
Parameters:
saveAllowed - true to allow, false to deny

setSaveAsAllowed

public void setSaveAsAllowed(boolean saveAsAllowed)
Set if save as is allowed.

Specified by:
setSaveAsAllowed in interface DesignerDataModel
Parameters:
saveAsAllowed - true to allow, false to deny

setTablesChangeAllowed

public void setTablesChangeAllowed(boolean tablesChangeAllowed)
Set if tables may be changed.

Specified by:
setTablesChangeAllowed in interface DesignerDataModel
Parameters:
tablesChangeAllowed - true to allow, false to deny

isDesignNeedsConnection

public boolean isDesignNeedsConnection()
This method checks if the with the i-net Designer opened reports need a database connection.

Specified by:
isDesignNeedsConnection in interface DesignerDataModel
Returns:
true if the report needs a connection, false if not.

setDesignNeedsConnection

public void setDesignNeedsConnection(boolean designNeedsConnection)
Set if the with the i-net Designer opened reports need a database connection.

Specified by:
setDesignNeedsConnection in interface DesignerDataModel
Parameters:
designNeedsConnection - true if the report needs a connection, false if not.

isInvalidSPSelectable

public boolean isInvalidSPSelectable()
This method checks if a invalid connection is selectable in the virtual database dialog.

Specified by:
isInvalidSPSelectable in interface DesignerDataModel
Returns:
true if invalid SPs are selectable, false if not.

setIsInvalidSPSelectable

public void setIsInvalidSPSelectable(boolean newSIISPS)
Set if a invalid connection is selectable in the virtual database dialog.

Parameters:
newSIISPS - true if invalid SPs are selectable, false if not.

isAddGroupAllowed

public boolean isAddGroupAllowed()
This method checks if its allowed to add new groups to any report.

Specified by:
isAddGroupAllowed in interface DesignerDataModel
Returns:
true if its allowed to add new groups, false if not.

setAddGroupAllowed

public void setAddGroupAllowed(boolean isAddGroupAllowed)
Set if its allowed to add new groups to the reports.

Specified by:
setAddGroupAllowed in interface DesignerDataModel
Parameters:
isAddGroupAllowed - true if its allowed to add new groups, false if not.

isCloseAllowed

public boolean isCloseAllowed()
This method checks if its allowed to close reports opened with the i-net Designer.

Specified by:
isCloseAllowed in interface DesignerDataModel
Returns:
true if its allowed to close the report, false if not.

setCloseAllowed

public void setCloseAllowed(boolean isCloseAllowed)
Set if its allowed to close reports opened with the i-net Designer.

Specified by:
setCloseAllowed in interface DesignerDataModel
Parameters:
isCloseAllowed - true if its allowed to close the report, false if not.

isRemoveGroupAllowed

public boolean isRemoveGroupAllowed()
This method checks if its allowed to remove a group from the report opened with the i-net Designer.

Specified by:
isRemoveGroupAllowed in interface DesignerDataModel
Returns:
true if its allowed to remove groups, false if not.

setRemoveGroupAllowed

public void setRemoveGroupAllowed(boolean isRemoveGroupAllowed)
Set if its allowed to remove a group from the report opened with the i-net Designer.

Specified by:
setRemoveGroupAllowed in interface DesignerDataModel
Parameters:
isRemoveGroupAllowed - true if its allowed to remove groups, false if not.

isReopenAllowed

public boolean isReopenAllowed()
This method checks if its allowed to reopen a report with the i-net Designer.

Specified by:
isReopenAllowed in interface DesignerDataModel
Returns:
true if its allowed to reopen a report, false if not.

setReopenAllowed

public void setReopenAllowed(boolean isReopenAllowed)
Set if its allowed to reopen a report with the i-net Designer.

Specified by:
setReopenAllowed in interface DesignerDataModel
Parameters:
isReopenAllowed - true if its allowed to reopen a report, false if not.

setAddElementAllowed

public void setAddElementAllowed(boolean isAddElementAllowed,
                                 int elementType)
Set if its allowed to add a element to a report with the i-net Designer.

Specified by:
setAddElementAllowed in interface DesignerDataModel
Parameters:
isAddElementAllowed - true if its allowed to add the element, false if not.
elementType - Type of the element you want to allow/deny.
See Also:
Element.TEXT, Element.LINE, Element.BOX, Element.CROSSTAB, Element.CHART, Element.FIELD, Element.JAVABEAN, Element.SUBREPORT, Element.PICTURE

isAddElementAllowed

public boolean isAddElementAllowed(int elementType)
This method checks if its allowed to add a element to a report with the i-net Designer.

Specified by:
isAddElementAllowed in interface DesignerDataModel
Parameters:
elementType - Type of the element you want to allow/deny.
Returns:
True if elements of the supplied type can be added to the report false otherwise.
See Also:
Element.TEXT, Element.LINE, Element.BOX, Element.CROSSTAB, Element.CHART, Element.FIELD, Element.JAVABEAN, Element.SUBREPORT, Element.PICTURE

setRemoveElementAllowed

public void setRemoveElementAllowed(boolean isRemoveElementAllowed,
                                    int elementType)
Set if its allowed to remove a element from a report with the i-net Designer.

Specified by:
setRemoveElementAllowed in interface DesignerDataModel
Parameters:
isRemoveElementAllowed - true if its allowed to remove the element, false if not.
elementType - Type of the element you want to allow/deny.
See Also:
Element.TEXT, Element.LINE, Element.BOX, Element.CROSSTAB, Element.CHART, Element.FIELD, Element.JAVABEAN, Element.SUBREPORT, Element.PICTURE

isRemoveElementAllowed

public boolean isRemoveElementAllowed(int elementType)
This method checks if its allowed to remove a element from a report with the i-net Designer.

Specified by:
isRemoveElementAllowed in interface DesignerDataModel
Parameters:
elementType - Type of the element you want to allow/deny.
Returns:
True if elements of the supplied type can be removed from the report false otherwise.
See Also:
Element.TEXT, Element.LINE, Element.BOX, Element.CROSSTAB, Element.CHART, Element.FIELD, Element.JAVABEAN, Element.SUBREPORT, Element.PICTURE

isAddSectionAllowed

public boolean isAddSectionAllowed()
This method checks if its allowed to add a new section to a report with the i-net Designer.

Specified by:
isAddSectionAllowed in interface DesignerDataModel
Returns:
true if its allowed to add a section to a report, false if not.

setAddSectionAllowed

public void setAddSectionAllowed(boolean isAddSectionAllowed)
Set if its allowed to add a new section to a report with the i-net Designer.

Specified by:
setAddSectionAllowed in interface DesignerDataModel
Parameters:
isAddSectionAllowed - true if its allowed to add a section to a report, false if not.

isRemoveSectionAllowed

public boolean isRemoveSectionAllowed()
This method checks if its allowed to remove section from a report with the i-net Designer.

Specified by:
isRemoveSectionAllowed in interface DesignerDataModel
Returns:
true if its allowed to remove a section from a report, false if not.

setRemoveSectionAllowed

public void setRemoveSectionAllowed(boolean isRemoveSectionAllowed)
Set if its allowed to remove a section from a report with the i-net Designer.

Specified by:
setRemoveSectionAllowed in interface DesignerDataModel
Parameters:
isRemoveSectionAllowed - true if its allowed to remove a section from a report, false if not.

openParameterDialog

public void openParameterDialog(PromptField parameterField)
This method is called if the user wants to open the dialog for a parameter field. The dialog is responsible to create an undo point in case of a modification. This function may be called only if an editor has been opened.

Specified by:
openParameterDialog in interface DesignerDataModel
Parameters:
parameterField - The parameter field if already existent, otherwise null Note: Since version 7.0 this method does not return the modified field anymore.

openSQLDialog

public SQLField openSQLDialog(SQLField sqlField)
This method is called if the user wants to open the dialog for a SQL field. The dialog is responsible to create an undo point in case of a modification.

Specified by:
openSQLDialog in interface DesignerDataModel
Parameters:
sqlField - The SQL field if already existent, otherwise null
Returns:
The new SQL field or null if no field was created

openSumDialog

public void openSumDialog(SummaryField sumfield)
This method is called if the user wants to open the dialog for a summary field. The dialog is responsible to create an undo point in case of a modification. This function may only be called if an editor has been opened.

Specified by:
openSumDialog in interface DesignerDataModel
Parameters:
sumfield - The parameter field if already existent, otherwise null

openGroupDialog

public void openGroupDialog(Group group)
This method is called if the user wants to open the dialog for a group. The dialog is responsible to create an undo point in case of a modification.

Specified by:
openGroupDialog in interface DesignerDataModel
Parameters:
group - The group if already existent, otherwise null

openSummaryInfoDialog

public void openSummaryInfoDialog()
This method is called if the user wants to open the Summary Info dialog. The dialog is responsible to create an undo point in case of a modification.

Specified by:
openSummaryInfoDialog in interface DesignerDataModel

openSortRecordsDialog

public void openSortRecordsDialog()
This method is called if the user wants to open the Records dialog. The dialog is responsible to create an undo point in case of a modification.

Specified by:
openSortRecordsDialog in interface DesignerDataModel

openSubreportLinksDialog

public void openSubreportLinksDialog(java.lang.String reportName)
This method is called if the user wants to open the Subreport links dialog. The dialog is responsible to create an undo point in case of a modification.

Specified by:
openSubreportLinksDialog in interface DesignerDataModel
Parameters:
reportName - Name of the subreport or null if no subreport was selected

openSectionDialog

public void openSectionDialog(Section section)
This method is called if the user wants to open the Section dialog. The dialog is responsible to create an undo point in case of a modification.

Specified by:
openSectionDialog in interface DesignerDataModel
Parameters:
section - the selected section or null if no section was selected

openVisualDatabaseWizardDialog

public void openVisualDatabaseWizardDialog()
This method is called if the user wants to open the Visual Database Wizard dialog. The dialog is responsible to create an undo point in case of a modification. Note: It is not allowed to call the super method of this dialog, because it will not show the correct database configuration.

Specified by:
openVisualDatabaseWizardDialog in interface DesignerDataModel

openJavaBeanDialog

public void openJavaBeanDialog()
This method is called if the user wants to open the Java Bean dialog. The dialog is responsible to create an undo point in case of a modification.

Specified by:
openJavaBeanDialog in interface DesignerDataModel

openUserFormulaDialog

public FormulaField openUserFormulaDialog(FormulaField formulafield)
This method is called if the user wants to open the dialog for a user defined formula. The dialog is responsible to create an undo point in case of a modification. This function may be called only if an editor has been opened.

Specified by:
openUserFormulaDialog in interface DesignerDataModel
Parameters:
formulafield - The formula field if already existent, otherwise null
Returns:
The new formula field or null if no field was created

openPropertyFormulaDialog

public FormulaField openPropertyFormulaDialog(FormulaField formulafield,
                                              int valueType,
                                              Element element,
                                              java.lang.Object defaultValue)
This method is called if the user wants to open the dialog for a property formula. The dialog is responsible to create an undo point in case of a modification. This function may be called only if an editor has been opened.

Specified by:
openPropertyFormulaDialog in interface DesignerDataModel
Parameters:
formulafield - The formulafield if it already exists, otherwise null
valueType - The type of the formulas return value
element - The element thats formula this is
defaultValue - The default value for this formula
Returns:
The new formula field or null if no field was created

openRecordSelectionFormulaDialog

public FormulaField openRecordSelectionFormulaDialog(FormulaField formulafield)
This method is called if the user wants to open the dialog for a record selection formula. The dialog is responsible to create an undo point in case of a modification. This function may be called only if an editor has been opened.

Specified by:
openRecordSelectionFormulaDialog in interface DesignerDataModel
Parameters:
formulafield - The formulafield if it already exists, otherwise null
Returns:
The new formula field or null if no field was created

openGroupSelectionFormulaDialog

public FormulaField openGroupSelectionFormulaDialog(FormulaField formulafield)
This method is called if the user wants to open the dialog for a group selection formula. The dialog is responsible to create an undo point in case of a modification. This function may be called only if an editor has been opened.

Specified by:
openGroupSelectionFormulaDialog in interface DesignerDataModel
Parameters:
formulafield - The formulafield if already existent, otherwise null
Returns:
The new formula field or null if no field was created

closedReport

public void closedReport(Engine engine)
This method is called if a report was closed.

Specified by:
closedReport in interface DesignerDataModel
Parameters:
engine - the engine of the closed report.

addedSubreport

public void addedSubreport(Engine engine)
This method is called if a subreport was added to the current report.

Specified by:
addedSubreport in interface DesignerDataModel
Parameters:
engine - the engine of the added subreport.

removedSubreport

public void removedSubreport(Engine engine)
This method will be called if a subreport was removed from the current report.

Specified by:
removedSubreport in interface DesignerDataModel
Parameters:
engine - the engine of the removed subreport.

openedSubreport

public void openedSubreport(Engine engine)
This method is called if a subreport was opened by the user to edit it. The dialog is responsible to create an undo point in case of a modification.

Specified by:
openedSubreport in interface DesignerDataModel
Parameters:
engine - the engine of the opened subreport.

closedSubreport

public void closedSubreport(Engine engine)
This method is called if a subreport was closed by the user.

Specified by:
closedSubreport in interface DesignerDataModel
Parameters:
engine - the engine of the closed subreport.

addedGroup

public void addedGroup(Group group)
This method is called if a group was added to the report by the user.

Specified by:
addedGroup in interface DesignerDataModel
Parameters:
group - the added group.

removedGroup

public void removedGroup(Group group)
This method is called if a group was removed from the report by the user.

Specified by:
removedGroup in interface DesignerDataModel
Parameters:
group - the removed group.

addedElement

public void addedElement(Element element)
This method is called if the user has added an element to the report.

Specified by:
addedElement in interface DesignerDataModel
Parameters:
element - the added element.

removedElement

public void removedElement(Element element)
This method is called if the user has removed an element from the report.

Specified by:
removedElement in interface DesignerDataModel
Parameters:
element - the removed element.

reopenReport

public Engine reopenReport(java.io.File reportFile)
                    throws ReportException
Load a report. If the location was chosen from the list of last opened reports, it is the programmer's task to load the report and return the engine.

Specified by:
reopenReport in interface DesignerDataModel
Parameters:
reportFile - the file object which contains the path to the report.
Returns:
the engine of the loaded report
Throws:
ReportException - to indicate nothing was loaded as the result of a Report problem

openPageLayoutDialog

public void openPageLayoutDialog()
This method is called if the user wants to open the Page Layout dialog. The dialog is responsible to create an undo point in case of a modification.

Specified by:
openPageLayoutDialog in interface DesignerDataModel

isDataSourceManagerAllowed

public boolean isDataSourceManagerAllowed()
Returns whether the datasource manager dialog is accessible or not.

Specified by:
isDataSourceManagerAllowed in interface DesignerDataModel
Returns:
True if the datasource manager dialog can be used false otherwise.

setDataSourceManagerAllowed

public void setDataSourceManagerAllowed(boolean isAllowed)
Sets whether the datasource manager dialog shall be accessible or not.

Specified by:
setDataSourceManagerAllowed in interface DesignerDataModel
Parameters:
isAllowed - True if the datasource manager dialog should be accessible false otherwise.

openRepositoryConfigDialog

public void openRepositoryConfigDialog()
Opens a repository configuration dialog which enables the user to choose the repository URL he wants to employ when opening and saving reports on a repository.

Specified by:
openRepositoryConfigDialog in interface DesignerDataModel
See Also:
DesignerDataModel.saveOnRepository(), DesignerDataModel.openFromRepository()

loadReportsFrom

public Engine[] loadReportsFrom(java.awt.Component parent,
                                java.net.URL initialURL)
                         throws java.io.IOException,
                                ReportException
Loads one or more report. Choosing a location is the task of the programmer who may use any Swing component.

Specified by:
loadReportsFrom in interface DesignerDataModel
Parameters:
parent - the parent component which should be used in dialogs.
initialURL - the initial URL for the FileChooser. This could a a location file URL or a HTTP URL of a repository.
Returns:
null to indicate nothing was loaded (choice of the user) or an array of engines of the loaded report
Throws:
java.io.IOException - to indicate nothing was loaded as the result of an IO problem
ReportException - to indicate nothing was loaded as the result of a Report problem

saveOnRepository

public void saveOnRepository()
Opens up a save dialog which enables the user to save a report onto the repository configured for the designer.

Specified by:
saveOnRepository in interface DesignerDataModel
See Also:
DesignerDataModel.openRepositoryConfigDialog(), DesignerDataModel.openFromRepository()

openFromRepository

public void openFromRepository()
Opens a dialog enabling the user to choose a report file to open from the repository configured for the designer.

Specified by:
openFromRepository in interface DesignerDataModel
See Also:
DesignerDataModel.openRepositoryConfigDialog(), DesignerDataModel.saveOnRepository()

createViewer

public SwingReportViewer createViewer()
creates a new SwingReportViewer and initializes it with the necessary ViewerContext, as well as piping its log stream to the appropriate position (via SwingReportViewer.setLoggingStream(java.io.PrintStream). It is recommended to first call the default implementation in AbstractDesignerDataModel and then configure the created viewer to your liking if you are customizing this behavior.

Specified by:
createViewer in interface DesignerDataModel
Returns:
new SwingReportViewer instance, fully initialized

i-net Clear Reports

Copyright © 1999-2015 by i-net software GmbH