org.infai.emo.matcher.editor.wizard.impl
Class ComparatorPage

java.lang.Object
  extended by org.infai.emo.matcher.editor.wizard.WizardPage
      extended by org.infai.emo.matcher.editor.wizard.impl.ComparatorPage

public class ComparatorPage
extends WizardPage

This page contains the settings for the comparison of both models.
It is plugged into the wizard as a wizard-page.

Version:
1.0.0
Author:
Stanley Hillner

Field Summary
private  java.util.Hashtable<java.lang.Integer,java.lang.String> MMFeatureNames
          This Hash contains the names for the features with which the generic-feature-comparators have to be initialized.
private  java.util.Hashtable<java.lang.Integer,org.eclipse.swt.widgets.Text> MMFeatures
          This Hash contains the text-fields for the generic-feature-comparators in which the user can enter the names of the features he wishes to compare additionally.
private  java.util.Hashtable<java.lang.Integer,org.eclipse.swt.widgets.Spinner> MMSpinners
          This Hash contains the Spinners for the meta-model-specific generic-comparators which the user has selected.
private  java.util.Hashtable<java.lang.Integer,java.lang.Integer> MMSpinnerValues
          This Hash contains the weightings for the generic-feature-comparators which the user has selected.
private  org.eclipse.swt.widgets.Spinner spinnerAC
          The Spinner which serves as a selector for the weighting of the AttributeComparator.
private  org.eclipse.swt.widgets.Spinner spinnerContainerC
          The Spinner which serves as a selector for the weighting of the ContainerComparator.
private  org.eclipse.swt.widgets.Spinner spinnerContentsC
          The Spinner which serves as a selector for the weighting of the ContentsComparator.
private  org.eclipse.swt.widgets.Spinner spinnerMCC
          The Spinner which serves as a selector for the weighting of the MetaClassComparator.
private  org.eclipse.swt.widgets.Spinner spinnerRC
          The Spinner which serves as a selector for the weighting of the ReferenceComparator.
private  int valueAC
          The weighting for the AttributeComparator.
private  int valueContainerC
          The weighting for the ContainerComparator.
private  int valueContentsC
          The weighting for the ContentsComparator.
private  int valueMCC
          The weighting for the MetaClassComparator.
private  int valueRC
          The weighting for the ReferenceComparator.
 
Constructor Summary
ComparatorPage()
          Creates a new ComparatorPage but does not initialize the UI.
 
Method Summary
private  void addButton(org.eclipse.swt.widgets.Composite container)
          Adds the "Add-feature" button to the feature-group.
private  void addExistingFeatures(org.eclipse.swt.widgets.Composite container)
          Adds the existing features from MMFeatures which the user selected before switching to another page.
private  void addListeners()
          Adds the Listeners to the Spinners and the Text-fields.
private  void addMMListeners()
          Method adds the Listeners to the Spinners for the generic-comparators.
private  void createFeatures(org.eclipse.swt.widgets.Composite container)
          Creates a first empty spinner and text-field for the generic-comparators.
 void createPage(org.eclipse.swt.widgets.Composite parent)
          Creates the UI for the page.
 double getAttributeComparatorWeight()
           
 double getContainerComparatorWeight()
           
 double getContentsComparatorWeight()
           
 java.util.Hashtable<java.lang.String,java.lang.Double> getFeatureWeightings()
           
 double getMetaClassComparatorWeight()
           
 java.lang.String getPageDescription()
          
 java.lang.String getPageTitle()
          
 double getReferenceComparatorWeight()
           
 
Methods inherited from class org.infai.emo.matcher.editor.wizard.WizardPage
getImage, getPage, getWizard, setImage, setPage, setWizard
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

spinnerMCC

private org.eclipse.swt.widgets.Spinner spinnerMCC
The Spinner which serves as a selector for the weighting of the MetaClassComparator.

See Also:
Spinner

valueMCC

private int valueMCC
The weighting for the MetaClassComparator.


spinnerAC

private org.eclipse.swt.widgets.Spinner spinnerAC
The Spinner which serves as a selector for the weighting of the AttributeComparator.

See Also:
Spinner

valueAC

private int valueAC
The weighting for the AttributeComparator.


spinnerRC

private org.eclipse.swt.widgets.Spinner spinnerRC
The Spinner which serves as a selector for the weighting of the ReferenceComparator.

See Also:
Spinner

valueRC

private int valueRC
The weighting for the ReferenceComparator.


spinnerContainerC

private org.eclipse.swt.widgets.Spinner spinnerContainerC
The Spinner which serves as a selector for the weighting of the ContainerComparator.

See Also:
Spinner

valueContainerC

private int valueContainerC
The weighting for the ContainerComparator.


spinnerContentsC

private org.eclipse.swt.widgets.Spinner spinnerContentsC
The Spinner which serves as a selector for the weighting of the ContentsComparator.

See Also:
Spinner

valueContentsC

private int valueContentsC
The weighting for the ContentsComparator.


MMSpinners

private java.util.Hashtable<java.lang.Integer,org.eclipse.swt.widgets.Spinner> MMSpinners
This Hash contains the Spinners for the meta-model-specific generic-comparators which the user has selected.
The keys for the Spinners are Integer-values like an enumeration.

See Also:
Hashtable, Spinner

MMSpinnerValues

private java.util.Hashtable<java.lang.Integer,java.lang.Integer> MMSpinnerValues
This Hash contains the weightings for the generic-feature-comparators which the user has selected.
The keys for the weightings are the same Integer-values like in MMSpinners, MMFeatures and MMFeatureNames.

See Also:
Hashtable

MMFeatures

private java.util.Hashtable<java.lang.Integer,org.eclipse.swt.widgets.Text> MMFeatures
This Hash contains the text-fields for the generic-feature-comparators in which the user can enter the names of the features he wishes to compare additionally.
The keys for the weightings are the same Integer-values like in MMSpinners, MMSpinnerValues and MMFeatureNames.

See Also:
Hashtable, Text

MMFeatureNames

private java.util.Hashtable<java.lang.Integer,java.lang.String> MMFeatureNames
This Hash contains the names for the features with which the generic-feature-comparators have to be initialized.
The keys for the weightings are the same Integer-values like in MMSpinners, MMSpinnerValues and MMFeatures.

See Also:
Hashtable
Constructor Detail

ComparatorPage

public ComparatorPage()
Creates a new ComparatorPage but does not initialize the UI.

Method Detail

createPage

public void createPage(org.eclipse.swt.widgets.Composite parent)
Creates the UI for the page.
This method must create the GUI for this page.

Specified by:
createPage in class WizardPage
Parameters:
parent - the Composite on which the page can be created.
See Also:
Composite

addExistingFeatures

private void addExistingFeatures(org.eclipse.swt.widgets.Composite container)
Adds the existing features from MMFeatures which the user selected before switching to another page.
This method is called every time when this page is called.

Parameters:
container - the composite which shall contain the spinners, text-fields, ... for the features.
See Also:
Composite

addMMListeners

private void addMMListeners()
Method adds the Listeners to the Spinners for the generic-comparators.


createFeatures

private void createFeatures(org.eclipse.swt.widgets.Composite container)
Creates a first empty spinner and text-field for the generic-comparators.

Parameters:
container - the composite on which the spinner shall be placed.
See Also:
Composite

addButton

private void addButton(org.eclipse.swt.widgets.Composite container)
Adds the "Add-feature" button to the feature-group.
By clicking onto the button another feature can be added for the comparison.

Parameters:
container - the composite the button and the features shall be placed on.
See Also:
Composite

addListeners

private void addListeners()
Adds the Listeners to the Spinners and the Text-fields.


getPageTitle

public java.lang.String getPageTitle()

Specified by:
getPageTitle in class WizardPage
Returns:
the title of this page.

getPageDescription

public java.lang.String getPageDescription()

Specified by:
getPageDescription in class WizardPage
Returns:
the description for this page.

getMetaClassComparatorWeight

public double getMetaClassComparatorWeight()
Returns:
the weighting for the MetaClassComparator.

getAttributeComparatorWeight

public double getAttributeComparatorWeight()
Returns:
the weighting for the AttributeComparator.

getReferenceComparatorWeight

public double getReferenceComparatorWeight()
Returns:
the weighting for the ReferenceComparator.

getContainerComparatorWeight

public double getContainerComparatorWeight()
Returns:
the weighting for the ContainerComparator.

getContentsComparatorWeight

public double getContentsComparatorWeight()
Returns:
the weighting for the ContentsComparator.

getFeatureWeightings

public java.util.Hashtable<java.lang.String,java.lang.Double> getFeatureWeightings()
Returns:
a Hashtable that contains the weightings for the generic comparators.
Therefore the names of the features serve as the keys.
See Also:
Hashtable, GenericFeatureComparator