|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jface.dialogs.DialogPage
org.eclipse.jface.wizard.WizardPage
pl.edu.agh.cast.data.ui.importer.wizard.ImportPage
public class ImportPage
First page of the template import wizard, which serves for selection of all basic information that are required by the import process, such as selection of data to import, as well as the import template to use.
Field Summary | |
---|---|
protected FileRawDataLogger |
importLogger
Observer which logs import events to file. |
protected ImportPageComposite |
importPageComposite
Main composite of the page. |
Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider |
---|
ERROR, INFORMATION, NONE, WARNING |
Constructor Summary | |
---|---|
ImportPage(String pageName)
The default constructor. |
Method Summary | |
---|---|
protected void |
addTemplate(Template template)
Adds a specified template to the list of templates being displayed on the import page. |
boolean |
canFlipToNextPage()
|
void |
createControl(org.eclipse.swt.widgets.Composite parent)
|
void |
dispose()
|
String |
getFilePath()
|
org.eclipse.jface.wizard.IWizardPage |
getNextPage()
|
org.eclipse.core.resources.IProject |
getProject()
|
String |
getProjectName()
|
Template |
getTemplate()
Retrieves the template, which had been selected in the template tree viewer on the import page. |
TemplateGroup[] |
getTemplateGroups(boolean reload)
Creates a default template group, sets it for all existing templates and returns the template group. |
boolean |
isComplete()
Indicates if the page is completed which means all the fields are filled in correctly. |
boolean |
isCurrentWizardPage()
Method is a delegate of a protected method WizardPage.isCurrentPage . |
TabularData |
loadPreview(String filePath,
Template template)
Loads a data preview by importing a given amount of rows ( PREVIEW_ROWS_LIMIT ) of a specified data
file, with use of a specified template. |
void |
notifyDataChanged()
Notifies when some data had changed and reacts accordingly to the current state of the import page. |
void |
setImportLogger(FileRawDataLogger logger)
|
void |
setImportPageComposite(ImportPageComposite importPageComposite)
|
void |
validateImporterType()
Validates importer type, sets appropriate wizard status |
boolean |
validateImportFile()
Validates import file, sets appropriate wizard status |
void |
validateImportPage()
Validates project name, file path and if template is selected. |
void |
validateProjectName()
Validates project name, sets appropriate wizard status |
void |
validateTemplate()
Validates templates, sets appropriate wizard status |
boolean |
validImportFile(String filePath)
Checks whether a specified import file is valid. |
boolean |
validProjectName(String projectName)
Checks the validity of the specified project name. |
Methods inherited from class org.eclipse.jface.wizard.WizardPage |
---|
getContainer, getDialogSettings, getImage, getName, getPreviousPage, getShell, getWizard, isCurrentPage, isPageComplete, setDescription, setErrorMessage, setImageDescriptor, setMessage, setPageComplete, setPreviousPage, setTitle, setWizard, toString |
Methods inherited from class org.eclipse.jface.dialogs.DialogPage |
---|
convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getMessage, getMessageType, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, performHelp, setButtonLayoutData, setControl, setMessage, setVisible |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.jface.dialogs.IDialogPage |
---|
getControl, getDescription, getErrorMessage, getMessage, getTitle, performHelp, setVisible |
Field Detail |
---|
protected ImportPageComposite importPageComposite
protected FileRawDataLogger importLogger
Constructor Detail |
---|
public ImportPage(String pageName)
pageName
- name of the import pageMethod Detail |
---|
public TemplateGroup[] getTemplateGroups(boolean reload)
reload
- the flag indicating if the templates should be reloaded
public void validateImportPage()
public void validateProjectName()
Note: This method does invoke setPageComplete
method and not change wizard state. To do this,
call validateImportPage
method
public boolean validateImportFile()
Note: This method does not invoke setPageComplete
method and not set error state. To do this,
call validateImportPage
method.
true
if the import file is valid; false
otherwisepublic void validateTemplate()
Note: This method does not invoke setPageComplete
method and not set error state. To do this,
call validateImportPage
method. It marks data changed, and import is required
public void validateImporterType()
Note: This method does invoke setPageComplete
method and not change wizard state. To do this,
call validateImportPage
method
public boolean validImportFile(String filePath)
filePath
- path to file that is to be validated.
true
is the specified file is valid; falce
otherwisepublic TabularData loadPreview(String filePath, Template template)
PREVIEW_ROWS_LIMIT
) of a specified data
file, with use of a specified template.
filePath
- the path to data filetemplate
- the template
public void notifyDataChanged()
public boolean isComplete()
true
if all fields are correct, false
otherwise.public String getProjectName()
public String getFilePath()
public Template getTemplate()
public org.eclipse.core.resources.IProject getProject()
public void createControl(org.eclipse.swt.widgets.Composite parent)
IDialogPage.createControl(org.eclipse.swt.widgets.Composite)
public org.eclipse.jface.wizard.IWizardPage getNextPage()
getNextPage
in interface org.eclipse.jface.wizard.IWizardPage
getNextPage
in class org.eclipse.jface.wizard.WizardPage
WizardPage.getNextPage()
public boolean canFlipToNextPage()
canFlipToNextPage
in interface org.eclipse.jface.wizard.IWizardPage
canFlipToNextPage
in class org.eclipse.jface.wizard.WizardPage
WizardPage.canFlipToNextPage()
public void dispose()
dispose
in interface org.eclipse.jface.dialogs.IDialogPage
dispose
in class org.eclipse.jface.dialogs.DialogPage
DialogPage.dispose()
public boolean isCurrentWizardPage()
WizardPage.isCurrentPage
. Returns whether this page is
the current one in the wizard's container.
true
if the page is active, and false
otherwisepublic boolean validProjectName(String projectName)
projectName
- the name of the project
true
if valid; false
otherwiseprotected void addTemplate(Template template)
template
- the template to addpublic void setImportPageComposite(ImportPageComposite importPageComposite)
public void setImportLogger(FileRawDataLogger logger)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |