Class ModelCombobox

  • All Implemented Interfaces:
    java.util.EventListener, org.eclipse.swt.events.SelectionListener, org.eclipse.swt.internal.SWTEventListener

    public class ModelCombobox
    extends java.lang.Object
    implements org.eclipse.swt.events.SelectionListener
    Combobox for selecting the model to use.
    Author:
    pastusch Code chunks taken from CopyCombobox (by El-Sharkawy)
    • Constructor Detail

      • ModelCombobox

        public ModelCombobox​(org.eclipse.swt.widgets.Composite parent,
                             ProductLineProject plp,
                             AbstractEASyEditorPage parentPage)
        Constructor.
        Parameters:
        parent - The parent composite to hold this combobox.
        plp - The project (and its models) this combobox represents.
        parentPage - The parent page which will react on changes of this Combobox.
    • Method Detail

      • refresh

        public void refresh()
        Refreshes the list of all available models shown in the Combo Menu. Also refreshes the HashMap.
      • getSelected

        public ModelInfo<Project> getSelected()
        Returns the selected model version.
        Returns:
        The currently selected version (as String)
      • widgetSelected

        public void widgetSelected​(org.eclipse.swt.events.SelectionEvent evt)
        Specified by:
        widgetSelected in interface org.eclipse.swt.events.SelectionListener
      • widgetDefaultSelected

        public void widgetDefaultSelected​(org.eclipse.swt.events.SelectionEvent evt)
        Specified by:
        widgetDefaultSelected in interface org.eclipse.swt.events.SelectionListener