pl.edu.agh.cast.data.ui.template
Class MappingWizardPage

java.lang.Object
  extended by org.eclipse.jface.dialogs.DialogPage
      extended by org.eclipse.jface.wizard.WizardPage
          extended by pl.edu.agh.cast.data.ui.template.MappingWizardPage
All Implemented Interfaces:
org.eclipse.jface.dialogs.IDialogPage, org.eclipse.jface.dialogs.IMessageProvider, org.eclipse.jface.wizard.IWizardPage

public class MappingWizardPage
extends org.eclipse.jface.wizard.WizardPage

New template wizard: page for preview and mapping data to domain model.

Author:
AGH CAST Team

Field Summary
 
Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider
ERROR, INFORMATION, NONE, WARNING
 
Constructor Summary
MappingWizardPage(String pageName, String pageDescription)
          Creates new mapping page basing on columns names and tabular data.
 
Method Summary
 void createControl(org.eclipse.swt.widgets.Composite parent)
          
 void createTable(ModelColumn[] cols, TabularData data)
          Creates a table with specified column names and indication whether they are required or not, and calls the table creator to fill the table with the specified data.
 Map<Integer,Integer> getMappings()
          Returns the mapping between columns mapped by user and input column indices.
 org.eclipse.jface.wizard.IWizardPage getNextPage()
          
 boolean isPageComplete()
          
 void setSelected(int dataColumnIndex, int selectedModelColumn)
          Selects event for prepared combobox.
 
Methods inherited from class org.eclipse.jface.wizard.WizardPage
canFlipToNextPage, getContainer, getDialogSettings, getImage, getName, getPreviousPage, getShell, getWizard, isCurrentPage, setDescription, setErrorMessage, setImageDescriptor, setMessage, setPageComplete, setPreviousPage, setTitle, setWizard, toString
 
Methods inherited from class org.eclipse.jface.dialogs.DialogPage
convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, dispose, 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
dispose, getControl, getDescription, getErrorMessage, getMessage, getTitle, performHelp, setVisible
 

Constructor Detail

MappingWizardPage

public MappingWizardPage(String pageName,
                         String pageDescription)
Creates new mapping page basing on columns names and tabular data.

Parameters:
pageName - name of mapping page
pageDescription - description of mapping page
Method Detail

createControl

public void createControl(org.eclipse.swt.widgets.Composite parent)

See Also:
IDialogPage.createControl(org.eclipse.swt.widgets.Composite)

createTable

public void createTable(ModelColumn[] cols,
                        TabularData data)
Creates a table with specified column names and indication whether they are required or not, and calls the table creator to fill the table with the specified data.

Parameters:
cols - the model columns
data - the data to be inserted into the table

setSelected

public void setSelected(int dataColumnIndex,
                        int selectedModelColumn)
Selects event for prepared combobox.

Parameters:
dataColumnIndex - the index of the data column
selectedModelColumn - the selected model column

getMappings

public Map<Integer,Integer> getMappings()
Returns the mapping between columns mapped by user and input column indices. Column indices are numbered from 0.

Returns:
the mapping

isPageComplete

public boolean isPageComplete()

Specified by:
isPageComplete in interface org.eclipse.jface.wizard.IWizardPage
Overrides:
isPageComplete in class org.eclipse.jface.wizard.WizardPage
See Also:
WizardPage.isPageComplete()

getNextPage

public org.eclipse.jface.wizard.IWizardPage getNextPage()

Specified by:
getNextPage in interface org.eclipse.jface.wizard.IWizardPage
Overrides:
getNextPage in class org.eclipse.jface.wizard.WizardPage
See Also:
WizardPage.getNextPage()


Copyright © 2007-2009 IISG AGH-UST Krakow, Poland. All Rights Reserved.