public class BasicDesignerDataModel extends AbstractDesignerDataModel
getOpenFileChooser()
and getSaveFileChooser(File)
allows you to change the file chooser
used to restrict the accessible files.Modifier and Type | Field and Description |
---|---|
static javax.swing.JFileChooser |
FILE_CHOOSER
This variable is used to assure the same filechooser is used again.
|
TYPE_COMMAND, TYPE_CONNECTION, TYPE_SPROC, TYPE_SPROC_WITH_PARAM, TYPE_SYSTEM_TABLE, TYPE_TABLE, TYPE_VIEW, TYPE_VIEW_WITH_PARAM
Modifier and Type | Method and Description |
---|---|
static DesignerDataModel |
create()
Create a new BasicDesignerDataModel.
|
Engine |
createNewReport(java.awt.Component parent)
Create a new report.
|
Engine |
createNewReportWithWizard(java.awt.Component parent)
Opens the report wizard to create a new report and returns the created
Engine object.
|
javax.swing.JFileChooser |
getOpenFileChooser()
Returns a file chooser which will be used when a report template should
be opened.
|
javax.swing.JFileChooser |
getSaveFileChooser(java.io.File file)
Returns a file chooser which will be used when a report template should be
saved.
|
boolean |
isReportWizardEnabled()
Returns true if a new report shall be created using the ReportWizard.
|
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.
|
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.
|
addedElement, addedGroup, addedSubreport, closedReport, closedSubreport, createViewer, getApplicationDirectory, getAvailableFonts, getAvailableFontsFromRepository, isAddElementAllowed, isAddGroupAllowed, isAddSectionAllowed, isCloseAllowed, isDataSourceManagerAllowed, isDatabaseChangeAllowed, isDatabaseObjectVisible, isDesignNeedsConnection, isInetTemplatesEnabled, isInvalidSPSelectable, isOpenAllowed, isPreviewTabVisible, isRemoveElementAllowed, isRemoveGroupAllowed, isRemoveSectionAllowed, isReopenAllowed, isSaveAllowed, isSaveAsAllowed, isTablesChangeAllowed, openFacturMappingDialog, openFromRepository, openGroupDialog, openGroupSelectionFormulaDialog, openJavaBeanDialog, openPageLayoutDialog, openParameterDialog, openRecordSelectionFormulaDialog, openRepositoryConfigDialog, openSQLDialog, openSectionDialog, openSortRecordsDialog, openSubreportLinksDialog, openSumDialog, openSummaryInfoDialog, openUserFormulaDialog, openVisualDatabaseWizardDialog, openedSubreport, removedElement, removedGroup, removedSubreport, reopenReport, saveOnRepository, setAddElementAllowed, setAddGroupAllowed, setAddSectionAllowed, setCloseAllowed, setDataSourceManagerAllowed, setDatabaseChangeAllowed, setDesignNeedsConnection, setIsInvalidSPSelectable, setOpenAllowed, setPreviewTabVisible, setRemoveElementAllowed, setRemoveGroupAllowed, setRemoveSectionAllowed, setReopenAllowed, setSaveAllowed, setSaveAsAllowed, setTablesChangeAllowed
openPropertyFormulaDialog
public static javax.swing.JFileChooser FILE_CHOOSER
getOpenFileChooser()
or getSaveFileChooser(File)
.public boolean isReportWizardEnabled()
isReportWizardEnabled
in interface DesignerDataModel
isReportWizardEnabled
in class AbstractDesignerDataModel
public Engine createNewReportWithWizard(java.awt.Component parent) throws ReportException
parent
- A parental Component to be used in conjunction with a Dialog.ReportException
- Creation of a new report failed.public Engine createNewReport(java.awt.Component parent) throws ReportException
isReportWizardEnabled()
returns false. Otherwise
createNewReportWithWizard(Component)
will be called to create
a new report.parent
- A parent window to use for your own dialog.null
to indicate nothing was created or the engine of the new reportReportException
- to indicate nothing was created as the result of a Report problempublic 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 problemDesignerDataModel.loadReport(Component)
public Engine 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 problemDesignerDataModel.loadReportFrom(Component, File)
public boolean 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 problemDesignerDataModel.saveReport(Component, Engine, boolean)
public javax.swing.JFileChooser getOpenFileChooser()
public javax.swing.JFileChooser getSaveFileChooser(java.io.File file)
file
- The default file which should be used for saving.public Engine[] loadReportsFrom(java.awt.Component parent, java.net.URL initialURL) throws java.io.IOException, ReportException
loadReportsFrom
in interface DesignerDataModel
loadReportsFrom
in class AbstractDesignerDataModel
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 problemDesignerDataModel.loadReportsFrom(Component, URL)
public static DesignerDataModel create()
Copyright © 1999-2020 by i-net software GmbH