org.eclipse.papyrus.emf.facet.efacet.sdk.ui.internal.query
Class SelectQueryTypeWidget

java.lang.Object
  extended by AbstractWidget
      extended by org.eclipse.papyrus.emf.facet.efacet.sdk.ui.internal.query.SelectQueryTypeWidget

public class SelectQueryTypeWidget
extends AbstractWidget

Provide the composite for the query type selection.

Label : [ combobox ] [ TextField ] When the user select a AbstractQueryDialogFactory, the associated dialog GetQueryDialog is created (with the method #createQueryWidgetDialog(AbstractQueryDialogFactory) using the attributes of the query type) and displayed.

See Also:
Query, AbstractQueryDialogFactory, GetQueryDialog

Constructor Summary
SelectQueryTypeWidget(Composite parent, PropertyElement queryProperty, boolean comboboxEnabled, IQueryContext queryContext)
          Constructor.
SelectQueryTypeWidget(Composite parent, PropertyElement propertyElement, IQueryContext queryContext)
          Constructor.
 
Method Summary
 java.lang.String getError()
           
 java.lang.String getText()
           
 boolean isSelectionEnabled()
           
 void notifyChanged()
           
  selectQueryType(java.lang.String selection)
          Select the item in the combobox with the name in parameter.
 void setAlertMessage(java.lang.String alertMessage)
          Set the alert message that will be displayed if the checkbox is not checked.
 void setSelectionEnabled(boolean enabled)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectQueryTypeWidget

public SelectQueryTypeWidget(Composite parent,
                             PropertyElement propertyElement,
                             IQueryContext queryContext)
Constructor.

Parameters:
parent - the parent of the composite.
properties - the WidgetProperties of the parent.
queryProp - the property element that this composite will edit.

SelectQueryTypeWidget

public SelectQueryTypeWidget(Composite parent,
                             PropertyElement queryProperty,
                             boolean comboboxEnabled,
                             IQueryContext queryContext)
Constructor.

Parameters:
parent - the parent of the composite.
properties - the WidgetProperties of the parent.
queryProp - the property element that this composite will edit.
Method Detail

selectQueryType

public  selectQueryType(java.lang.String selection)
Select the item in the combobox with the name in parameter.

Parameters:
selection - the name of the selection.

getError

public java.lang.String getError()

setSelectionEnabled

public void setSelectionEnabled(boolean enabled)
Parameters:
enabled - set if the selection combobox is enabled or not.

isSelectionEnabled

public boolean isSelectionEnabled()
Returns:
if the combobox is enabled or not.

setAlertMessage

public void setAlertMessage(java.lang.String alertMessage)
Set the alert message that will be displayed if the checkbox is not checked.

Parameters:
alertMessage - the alertMessage to set

notifyChanged

public void notifyChanged()

getText

public java.lang.String getText()
Returns:
the text of the text associated with the query.