public interface DesignerDataModel
AbstractDesignerDataModel
or
BasicDesignerDataModel
.Modifier and Type | Field and Description |
---|---|
static int |
TYPE_COMMAND
Shows the database object type is: Command
|
static int |
TYPE_CONNECTION
Shows the database object type is: Connection
|
static int |
TYPE_SPROC
Shows the database object type is: Stored procedure
|
static int |
TYPE_SPROC_WITH_PARAM
Shows the database object type is: Stored procedure with parameters
|
static int |
TYPE_SYSTEM_TABLE
Shows the database object type is: System Table
|
static int |
TYPE_TABLE
Shows the database object type is: Table
|
static int |
TYPE_VIEW
Shows the database object type is: View
|
static int |
TYPE_VIEW_WITH_PARAM
Shows the database object type is: View with parameters
|
Modifier and Type | Method and Description |
---|---|
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.
|
Engine |
createNewReport(java.awt.Component parent)
Creates a new report and returns its Engine if the creation was successful or null if it was not successful.
|
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<com.inet.font.FontFamily> |
getAvailableFonts()
Returns a list of all available fonts for the designer.
|
java.util.List<com.inet.font.FontFamily> |
getAvailableFontsFromRepository()
fetches a list of fonts available on the repository configured for the designer
|
boolean |
isAddElementAllowed(int elementType)
Check if it is allowed to add a element with the given type to the report.
|
boolean |
isAddGroupAllowed()
Checks if groups may be added to the Report.
|
boolean |
isAddSectionAllowed()
Check if adding sections to the report is allowed.
|
boolean |
isCloseAllowed()
Checks if reports may be closed.
|
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()
Returns whether the design of reports needs a connection.
|
boolean |
isInetTemplatesEnabled()
Returns true if the templates supplied through i-net will be enabled or not.
|
boolean |
isInvalidSPSelectable()
Returns whether stored procedures marked as invalid should be selectable
in the visual database wizard or not.
|
boolean |
isOpenAllowed()
Checks if it is allowed to open reports.
|
boolean |
isPreviewTabVisible()
Checks if the preview tab should be visible or not.
|
boolean |
isRemoveElementAllowed(int elementType)
Check if it is allowed to remove a element with the given type from the report.
|
boolean |
isRemoveGroupAllowed()
Checks if groups may be removed.
|
boolean |
isRemoveSectionAllowed()
Checks if removing sections from the report is allowed.
|
boolean |
isReopenAllowed()
Checks if it is allowed to use the reopen menu.
|
boolean |
isReportWizardEnabled()
Returns true if a new report shall be created using the ReportWizard.
|
boolean |
isSaveAllowed()
Checks if it is allowed to save reports.
|
boolean |
isSaveAsAllowed()
Checks if is allowed to save reports with a new name.
|
boolean |
isTablesChangeAllowed()
Checks if tables may be added or removed and if the links may be changed.
|
Engine |
loadReport(java.awt.Component parent)
Load a report.
|
Engine |
loadReportFrom(java.awt.Component parent,
java.io.File dir)
Load a report.
|
Engine[] |
loadReportsFrom(java.awt.Component parent,
java.net.URL initialURL)
Loads one or more report.
|
void |
openFacturMappingDialog(java.lang.String searchterm)
This method is called if the user wants to open the Fractur mapping dialog.
|
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,
ReportComponent element,
java.lang.Object defaultValue,
java.lang.String propertyName,
boolean isTristate)
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 name)
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.
|
boolean |
saveReport(java.awt.Component parent,
Engine e,
boolean saveAs)
Save a report
Choosing a location is the task of the programmer who may use any Swing
component.
|
void |
setAddElementAllowed(boolean isAddElementAllowed,
int elementType)
Set if it is allowed to add a element with the given type to the report.
|
void |
setAddGroupAllowed(boolean isAddGroupAllowed)
Sets if add groups is allowed.
|
void |
setAddSectionAllowed(boolean isAddSectionAllowed)
Sets if it is allowed to add sections to the report.
|
void |
setCloseAllowed(boolean isCloseAllowed)
Sets if is allowed to close reports.
|
void |
setDataSourceManagerAllowed(boolean isAllowed)
Sets whether the datasource manager dialog shall be accessible or not.
|
void |
setDatabaseChangeAllowed(boolean databaseChangeAllowed)
Sets whether changes to the connection are allowed.
|
void |
setDesignNeedsConnection(boolean designWithoutConnection)
Sets whether the design of reports needs a connection.
|
void |
setOpenAllowed(boolean openAllowed)
Sets whether 'open' is allowed.
|
void |
setPreviewTabVisible(boolean previewTabVisible)
Sets whether the preview tab should be visible or not.
|
void |
setRemoveElementAllowed(boolean isRemoveElementAllowed,
int elementType)
Set if it is allowed to remove a element with the given type from the report.
|
void |
setRemoveGroupAllowed(boolean isRemoveGroupAllowed)
Sets if remove groups is allowed.
|
void |
setRemoveSectionAllowed(boolean isRemoveSectionAllowed)
Sets if it is allowed to remove sections from the report.
|
void |
setReopenAllowed(boolean isReopenAllowed)
Sets if it is allowed to reopen a report.
|
void |
setSaveAllowed(boolean saveAllowed)
Sets whether 'save' is allowed.
|
void |
setSaveAsAllowed(boolean saveAsAllowed)
Sets whether 'save as' is allowed.
|
void |
setTablesChangeAllowed(boolean tablesChangeAllowed)
Sets whether tables may be changed.
|
static final int TYPE_TABLE
static final int TYPE_SYSTEM_TABLE
static final int TYPE_VIEW
static final int TYPE_VIEW_WITH_PARAM
static final int TYPE_SPROC
static final int TYPE_SPROC_WITH_PARAM
static final int TYPE_CONNECTION
static final int TYPE_COMMAND
Engine createNewReport(java.awt.Component parent) throws java.io.IOException, ReportException
parent
- A parent window to use for your own dialog.null
to indicate nothing was created or the engine of the new reportjava.io.IOException
- to indicate nothing was created as the result of an IO problemReportException
- to indicate nothing was created as the result of a Report problemjava.io.File getApplicationDirectory()
java.util.ArrayList<com.inet.font.FontFamily> getAvailableFonts()
boolean isReportWizardEnabled()
boolean isInetTemplatesEnabled()
boolean isDatabaseChangeAllowed()
boolean isDatabaseObjectVisible(int databaseObjectType, java.lang.String databaseObjectName)
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)True
if this database object should be visible in
the database browser otherwise false
.boolean isOpenAllowed()
boolean isPreviewTabVisible()
true
if the preview tab should be visible otherwise false
boolean isSaveAllowed()
boolean isSaveAsAllowed()
boolean isTablesChangeAllowed()
boolean isAddGroupAllowed()
void setAddGroupAllowed(boolean isAddGroupAllowed)
isAddGroupAllowed
- true
to allow, false
to denyboolean isCloseAllowed()
void setCloseAllowed(boolean isCloseAllowed)
isCloseAllowed
- true
to allow, false
to denyboolean isRemoveGroupAllowed()
void setRemoveGroupAllowed(boolean isRemoveGroupAllowed)
isRemoveGroupAllowed
- true
to allow, false
to denyboolean isReopenAllowed()
void setReopenAllowed(boolean isReopenAllowed)
isReopenAllowed
- true
to allow, false
to denyvoid setAddElementAllowed(boolean isAddElementAllowed, int elementType)
isAddElementAllowed
- true
to allow, false
to denyelementType
- type of the element you want to allow or denyElement.BOX
,
Element.LINE
,
Element.TEXT
,
Element.CHART
,
Element.CROSSTAB
,
Element.JAVABEAN
,
Element.PICTURE
,
Element.SUBREPORT
boolean isAddElementAllowed(int elementType)
elementType
- type of the element you want to allow or denyElement.BOX
,
Element.LINE
,
Element.TEXT
,
Element.CHART
,
Element.CROSSTAB
,
Element.JAVABEAN
,
Element.PICTURE
,
Element.SUBREPORT
void setRemoveElementAllowed(boolean isRemoveElementAllowed, int elementType)
isRemoveElementAllowed
- true
to allow, false
to denyelementType
- type of the element you want to allow or denyElement.BOX
,
Element.LINE
,
Element.TEXT
,
Element.CHART
,
Element.CROSSTAB
,
Element.JAVABEAN
,
Element.PICTURE
,
Element.SUBREPORT
boolean isRemoveElementAllowed(int elementType)
elementType
- type of the element you want to allow or denyElement.BOX
,
Element.LINE
,
Element.TEXT
,
Element.CHART
,
Element.CROSSTAB
,
Element.JAVABEAN
,
Element.PICTURE
,
Element.SUBREPORT
boolean isAddSectionAllowed()
void setAddSectionAllowed(boolean isAddSectionAllowed)
isAddSectionAllowed
- true
to allow, false
to denyvoid setRemoveSectionAllowed(boolean isRemoveSectionAllowed)
isRemoveSectionAllowed
- true
to allow, false
to denyboolean isRemoveSectionAllowed()
Engine loadReport(java.awt.Component parent) throws java.io.IOException, ReportException
parent
- the parent component which should be used in dialogs.null
to indicate nothing was loaded (choice of the
user) or the engine of the loaded reportjava.io.IOException
- to indicate nothing was loaded as the result of an IO problemReportException
- to indicate nothing was loaded as the result of a Report problemEngine loadReportFrom(java.awt.Component parent, java.io.File dir) throws java.io.IOException, ReportException
parent
- the parent component which should be used in dialogs.dir
- the Directory for the FileChooser.null
to indicate nothing was loaded (choice of the
user) or the engine of the loaded reportjava.io.IOException
- to indicate nothing was loaded as the result of an IO problemReportException
- to indicate nothing was loaded as the result of a Report problemEngine reopenReport(java.io.File reportFile) throws ReportException
reportFile
- the file object which contains the path to the report.ReportException
- to indicate nothing was loaded as the result of a Report problemboolean saveReport(java.awt.Component parent, Engine e, boolean saveAs) throws java.io.IOException, ReportException
parent
- the parent component which should be used in dialogs.e
- the engine which should be savedsaveAs
- if true
the user wants to choose a new name for
the report, otherwise the old name should be used (if
possible)true
to indicate the report was successfully
saved.java.io.IOException
- to indicate nothing was saved as the result of an IO problemReportException
- to indicate nothing was saved as the result of a Report problemvoid setDatabaseChangeAllowed(boolean databaseChangeAllowed)
databaseChangeAllowed
- true
to allow, false
to denyvoid setOpenAllowed(boolean openAllowed)
openAllowed
- true
to allow, false
to denyvoid setPreviewTabVisible(boolean previewTabVisible)
previewTabVisible
- true
to allow, false
to denyvoid setSaveAllowed(boolean saveAllowed)
saveAllowed
- true
to allow, false
to denyvoid setSaveAsAllowed(boolean saveAsAllowed)
saveAsAllowed
- true
to allow, false
to denyvoid setTablesChangeAllowed(boolean tablesChangeAllowed)
tablesChangeAllowed
- true
to allow, false
to denyboolean isDesignNeedsConnection()
true
or an empty picture if false
is returned)false
if no connection should be necessary for design
or true
if connection is neededvoid setDesignNeedsConnection(boolean designWithoutConnection)
true
or an empty picture if false
is returned)designWithoutConnection
- false
if no connection should be necessary for design
or true
if connection is neededboolean isInvalidSPSelectable()
FormulaField openUserFormulaDialog(FormulaField formulafield)
formulafield
- The formula field if already existent, otherwise nullFormulaField openPropertyFormulaDialog(FormulaField formulafield, int valueType, ReportComponent element, java.lang.Object defaultValue, java.lang.String propertyName, boolean isTristate)
formulafield
- The formulafield if it already exists, otherwise nullvalueType
- The type of the formulas return valueelement
- The element thats formula this isdefaultValue
- The default value for this formulapropertyName
- The name of the property for which a formula is being created. Must not be null
.isTristate
- whether the returned property formula is set to more than one Element. When in doubt, set to false
FormulaField openRecordSelectionFormulaDialog(FormulaField formulafield)
formulafield
- The formulafield if it already exists, otherwise nullFormulaField openGroupSelectionFormulaDialog(FormulaField formulafield)
formulafield
- The formulafield if already existent, otherwise nullvoid openParameterDialog(PromptField parameterField)
parameterField
- The parameter field if already existent, otherwise null
Note: Since version 7.0 this method does not return the modified
field anymore.SQLField openSQLDialog(SQLField SQLfield)
SQLfield
- The SQL field if already existent, otherwise nullvoid openSumDialog(SummaryField sumfield)
sumfield
- The parameter field if already existent, otherwise nullvoid openGroupDialog(Group group)
group
- The group if already existent, otherwise nullvoid openSummaryInfoDialog()
void openSortRecordsDialog()
void openSubreportLinksDialog(java.lang.String name)
name
- Name of the subreport or null if no subreport was selectedvoid openSectionDialog(Section section)
section
- the selected section or null if no section was selectedvoid openVisualDatabaseWizardDialog()
void openJavaBeanDialog()
void openPageLayoutDialog()
void openFacturMappingDialog(java.lang.String searchterm)
searchterm
- the term to search in the factur mapping dialog, can be nullvoid closedReport(Engine engine)
engine
- the engine of the closed report.void addedSubreport(Engine engine)
engine
- the engine of the added subreport.void removedSubreport(Engine engine)
engine
- the engine of the removed subreport.void openedSubreport(Engine engine)
engine
- the engine of the opened subreport.void closedSubreport(Engine engine)
engine
- the engine of the closed subreport.void addedGroup(Group group)
group
- the added group.void removedGroup(Group group)
group
- the removed group.void addedElement(Element element)
element
- the added element.void removedElement(Element element)
element
- the removed element.boolean isDataSourceManagerAllowed()
void setDataSourceManagerAllowed(boolean isAllowed)
isAllowed
- True if the datasource manager dialog should be
accessible false otherwise.void openRepositoryConfigDialog()
saveOnRepository()
,
openFromRepository()
void saveOnRepository()
openRepositoryConfigDialog()
,
openFromRepository()
void openFromRepository()
openRepositoryConfigDialog()
,
saveOnRepository()
java.util.List<com.inet.font.FontFamily> getAvailableFontsFromRepository()
SwingReportViewer createViewer()
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.Engine[] loadReportsFrom(java.awt.Component parent, java.net.URL initialURL) throws java.io.IOException, ReportException
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.null
to indicate nothing was loaded (choice of the
user) or an array of engines of the loaded reportjava.io.IOException
- to indicate nothing was loaded as the result of an IO problemReportException
- to indicate nothing was loaded as the result of a Report problemCopyright © 1999-2020 by i-net software GmbH