Java Code Examples for org.eclipse.swt.events.ModifyEvent

The following code examples are extracted from open source projects. You can click to vote up the examples that are useful to you.

Example 1

From project mylyn.docs, under directory /org.eclipse.mylyn.htmltext.ui/src/org/eclipse/mylyn/htmltext/.

Source file: HtmlComposer.java

  21 
vote

@Override public Object function(Object[] arguments){
  if (arguments.length > 0) {
    String identifier=(String)arguments[0];
    Event event=new Event();
    event.widget=getBrowser();
    event.data=this;
    ModifyEvent modifyEvent=new ModifyEvent(event);
    if (pendingListenerCallBackMap.get(identifier) != null) {
      List<ModifyListener> list=pendingListenerCallBackMap.get(identifier);
      for (      ModifyListener modifyListener : list) {
        modifyListener.modifyText(modifyEvent);
      }
    }
 else {
      if (modifyListenerList.size() > 0) {
        for (        ModifyListener listener : modifyListenerList) {
          listener.modifyText(modifyEvent);
        }
      }
    }
    pendingListenerCallBackMap.remove(identifier);
  }
  return null;
}
 

Example 2

From project Archimedes, under directory /br.org.archimedes.core/src/br/org/archimedes/gui/swt/layers/.

Source file: LayerForm.java

  19 
vote

/** 
 * @param parent The composite parent that contains this form.
 */
public LayerForm(final Shell parent,final LayerEditor editor){
  this.parent=parent;
  this.editor=editor;
  this.modifyListener=new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      String name=nameText.getText();
      Display display=LayerForm.this.parent.getDisplay();
      boolean valid=isValid(name);
      LayerForm.this.editor.setClosable(valid);
      if (!valid) {
        org.eclipse.swt.graphics.Color swtRed=Constant.RED.toSWTColor(display);
        nameText.setBackground(swtRed);
        LayerForm.this.editor.setWarning(LayerEditor.ERROR_ICON,Messages.LayerEditor_DuplicateName);
      }
 else {
        org.eclipse.swt.graphics.Color swtWhite=Constant.WHITE.toSWTColor(display);
        nameText.setBackground(swtWhite);
        currentLayer.setName(name);
        LayerForm.this.editor.setWarning(null,"");
        LayerForm.this.setChanged();
      }
      notifyObservers(currentLayer);
    }
  }
;
  createForm(parent);
}
 

Example 3

From project aws-toolkit-for-eclipse, under directory /com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/core/ui/preferences/.

Source file: AwsAccountPreferencePage.java

  19 
vote

protected void setUpFieldEditor(String currentAccount,String preferenceKey,Composite parent,StringFieldEditor fieldEditor){
  fieldEditor.setPage(this);
  fieldEditor.setPreferenceStore(this.getPreferenceStore());
  fieldEditor.load();
  if (accountNamesByIdentifier.get(currentAccount) != null && accountNamesByIdentifier.get(currentAccount).equals(PreferenceConstants.DEFAULT_ACCOUNT_NAME) && (fieldEditor.getStringValue() == null || fieldEditor.getStringValue().length() == 0)) {
    String currentPrefValue=getPreferenceStore().getString(preferenceKey);
    if (ObfuscatingStringFieldEditor.isBase64(currentPrefValue)) {
      currentPrefValue=ObfuscatingStringFieldEditor.decodeString(currentPrefValue);
    }
    fieldEditor.setStringValue(currentPrefValue);
  }
  fieldEditor.fillIntoGrid(parent,LAYOUT_COLUMN_WIDTH);
  fieldEditor.getTextControl(parent).addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      updatePageValidation();
    }
  }
);
}
 

Example 4

From project bel-editor, under directory /org.openbel.editor.ui/src/org/openbel/editor/ui/launch/.

Source file: MainTab.java

  19 
vote

/** 
 * {@inheritDoc}
 */
@Override public void modifyText(ModifyEvent ev){
  Object src=ev.getSource();
  if (src == txtName) {
    updateLaunchConfigurationDialog();
  }
 else   if (src == txtDescription) {
    updateLaunchConfigurationDialog();
  }
}
 

Example 5

From project bndtools, under directory /bndtools.core/src/bndtools/editor/contents/.

Source file: DescriptionDeveloperPart.java

  19 
vote

public DescriptionDeveloperPart(Composite parent,FormToolkit toolkit,int style){
  super(parent,toolkit,style);
  Section section=getSection();
  section.setText("Developer Information");
  Composite composite=toolkit.createComposite(section);
  section.setClient(composite);
  toolkit.createLabel(composite,"Documentation URL:");
  bundleDocUrl=toolkit.createText(composite,"",SWT.BORDER);
  ToolTips.setupMessageAndToolTipFromSyntax(bundleDocUrl,Constants.BUNDLE_DOCURL);
  bundleDocUrl.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      lock.ifNotModifying(new Runnable(){
        public void run(){
          addDirtyProperty(Constants.BUNDLE_DOCURL);
        }
      }
);
    }
  }
);
  GridLayout layout=new GridLayout(2,false);
  layout.horizontalSpacing=10;
  composite.setLayout(layout);
  GridData gd;
  gd=new GridData(SWT.FILL,SWT.TOP,true,false);
  gd.horizontalIndent=5;
  bundleDocUrl.setLayoutData(gd);
  editablePropertySet=new HashSet<String>();
  for (  String prop : EDITABLE_PROPERTIES) {
    editablePropertySet.add(prop);
  }
}
 

Example 6

From project bpelunit, under directory /tycho/net.bpelunit.framework.client.eclipse/src/net/bpelunit/framework/client/eclipse/dialog/field/.

Source file: ComboField.java

  19 
vote

@Override protected void createControl(Composite parent){
  Label label=new Label(parent,SWT.NONE);
  label.setText(getLabelText());
  label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
  fCombo=new Combo(parent,SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
  fCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  fCombo.setItems(fOptions);
  label.setSize(label.getSize().x,fCombo.getSize().y);
  if (getInitialValue() != null) {
    fCombo.setText(getInitialValue());
  }
 else   if (fOptions.length > 0)   fCombo.setText(fOptions[0]);
 else   fCombo.setText("");
  fCurrentSelection=fCombo.getText();
  fCombo.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      fCurrentSelection=fCombo.getText();
      getDialog().validateFields();
    }
  }
);
}
 

Example 7

From project BPMN2-Editor-for-Eclipse, under directory /org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/.

Source file: BPMN2DiagramWizardPage.java

  19 
vote

/** 
 * @see IDialogPage#createControl(Composite)
 */
@Override public void createControl(Composite parent){
  Composite container=new Composite(parent,SWT.NULL);
  GridLayout layout=new GridLayout();
  container.setLayout(layout);
  layout.numColumns=3;
  layout.verticalSpacing=9;
  Label label=new Label(container,SWT.NULL);
  label.setText("&Location:");
  containerText=new Text(container,SWT.BORDER | SWT.SINGLE);
  GridData gd=new GridData(GridData.FILL_HORIZONTAL);
  containerText.setLayoutData(gd);
  containerText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    ModifyEvent e){
      dialogChanged();
    }
  }
);
  Button button=new Button(container,SWT.PUSH);
  button.setText("Browse...");
  button.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      handleBrowse();
    }
  }
);
  label=new Label(container,SWT.NULL);
  label.setText("&File name:");
  fileText=new Text(container,SWT.BORDER | SWT.SINGLE);
  gd=new GridData(GridData.FILL_HORIZONTAL);
  fileText.setLayoutData(gd);
  fileText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    ModifyEvent e){
      dialogChanged();
    }
  }
);
  initialize();
  dialogChanged();
  setControl(container);
}
 

Example 8

From project bundlemaker, under directory /main/org.bundlemaker.core.ui.projecteditor/src/org/bundlemaker/core/ui/projecteditor/filebased/edit/.

Source file: EditProjectPathDialog.java

  19 
vote

@Override protected Control createButtonBar(Composite parent){
  Control c=super.createButtonBar(parent);
  final Button okButton=getButton(IDialogConstants.OK_ID);
  _entryText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    ModifyEvent e){
      okButton.setEnabled(_entryText.getText().trim().isEmpty() == false);
    }
  }
);
  return c;
}
 

Example 9

From project ceylon-ide-eclipse, under directory /plugins/com.redhat.ceylon.eclipse.ui/src/com/redhat/ceylon/eclipse/code/outline/.

Source file: TreeViewPopup.java

  19 
vote

private void installFilter(){
  fFilterText.setText("");
  fFilterText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      String text=((Text)e.widget).getText();
      setMatcherString(text,true);
    }
  }
);
}
 

Example 10

From project cilia-workbench, under directory /cilia-workbench-common/src/fr/liglab/adele/cilia/workbench/common/ui/dialog/.

Source file: NewNameNamespaceDialog.java

  19 
vote

@Override public void modifyText(ModifyEvent e){
  value=new NameNamespaceID(nameText.getText(),namespaceText.getText());
  String msg=checkValidValue(value);
  if (msg == null && !emptyNamespaceAllowed && Strings.isNullOrEmpty(value.getNamespace()))   msg=namespaceLabelText + " is empty";
  getButton(IDialogConstants.OK_ID).setEnabled(msg == null);
  if (msg == null && Strings.isNullOrEmpty(value.getNamespace()))   msg="WARNING : " + namespaceLabelText + " is empty";
  messageArea.setText(Strings.nullToEmpty(msg));
}
 

Example 11

From project CIShell, under directory /templates/org.cishell.templates.wizards/src/org/cishell/templates/staticexecutable/optiontypes/.

Source file: CustomStringOption.java

  19 
vote

public void createControl(Composite parent,int span){
  int textWidgetHorizontalSpan;
  if (span >= 0) {
    this.labelWidget=createLabel(parent,1);
    this.labelWidget.setEnabled(isEnabled());
    textWidgetHorizontalSpan=span - 1;
  }
 else {
    textWidgetHorizontalSpan=-span;
  }
  this.textWidget=new Text(parent,style);
  if (getValue() != null) {
    this.textWidget.setText(getValue().toString());
  }
  GridData gridData=new GridData(GridData.FILL_HORIZONTAL);
  gridData.horizontalSpan=textWidgetHorizontalSpan;
  this.textWidget.setLayoutData(gridData);
  this.textWidget.setEnabled(isEnabled());
  this.textWidget.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent modifyEvent){
      if (CustomStringOption.this.shouldIgnoreListener) {
        return;
      }
      CustomStringOption.super.setValue(CustomStringOption.this.textWidget.getText());
      getSection().validateOptions(CustomStringOption.this);
    }
  }
);
}
 

Example 12

From project dawn-common, under directory /org.dawb.common.ui/src/org/dawb/common/ui/project/.

Source file: DawbResourcePage.java

  19 
vote

private void createNameChoiceGroup(Composite containerGroup){
  Label resourcesLabel=new Label(containerGroup,SWT.NONE);
  resourcesLabel.setText("Sequence Name ");
  this.sequenceNameField=new Text(containerGroup,SWT.SINGLE | SWT.BORDER);
  sequenceNameField.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,false));
  sequenceNameField.setText(defaultName);
  sequenceNameField.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    ModifyEvent e){
      dialogChanged();
    }
  }
);
}
 

Example 13

From project dawn-isenciaui, under directory /com.isencia.passerelle.workbench.model.editor.ui/src/main/java/com/isencia/passerelle/workbench/model/editor/ui/palette/.

Source file: PasserelleEntryPage.java

  19 
vote

protected Combo createGroupText(Composite panel,PaletteEntry entry) throws Exception {
  PaletteContainer container=entry.getParent();
  Combo group=new Combo(panel,SWT.SINGLE);
  String[] favoriteGroupNames=PaletteItemFactory.getInstance().getFavoriteGroupNames();
  group.setItems(favoriteGroupNames);
  String label=getEntry().getParent().getLabel();
  List groups=Arrays.asList(favoriteGroupNames);
  String current=entry.getParent().getLabel();
  if (groups.contains(current)) {
    group.select(groups.indexOf(label));
  }
  group.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      handleGroupChanged(((Combo)e.getSource()).getText());
    }
  }
);
  return group;
}
 

Example 14

From project dawn-ui, under directory /org.dawb.workbench.ui/src/org/dawb/workbench/ui/project/.

Source file: DataNewProjectWizardPage.java

  19 
vote

/** 
 * @see IDialogPage#createControl(Composite)
 */
public void createControl(Composite parent){
  Composite container=new Composite(parent,SWT.NULL);
  GridLayout layout=new GridLayout();
  container.setLayout(layout);
  layout.numColumns=2;
  layout.verticalSpacing=9;
  Label lblprojectName=new Label(container,SWT.NULL);
  lblprojectName.setText("&Project name:");
  projectName=new Text(container,SWT.BORDER | SWT.SINGLE);
  projectName.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,false,false,1,1));
  projectName.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  projectName.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      dialogChanged();
    }
  }
);
  Label lblExamples=new Label(container,SWT.NULL);
  lblExamples.setText("&Create example data");
  examples=new Button(container,SWT.CHECK);
  examples.setSelection(false);
  dialogChanged();
  setControl(container);
}
 

Example 15

From project dawn-workflow, under directory /org.dawb.passerelle.common/src/org/dawb/passerelle/common/project/.

Source file: PasserelleNewProjectWizardPage.java

  19 
vote

/** 
 * @see IDialogPage#createControl(Composite)
 */
public void createControl(Composite parent){
  Composite container=new Composite(parent,SWT.NULL);
  GridLayout layout=new GridLayout();
  container.setLayout(layout);
  layout.numColumns=2;
  layout.verticalSpacing=9;
  Label lblprojectName=new Label(container,SWT.NULL);
  lblprojectName.setText("&Project name:");
  projectName=new Text(container,SWT.BORDER | SWT.SINGLE);
  projectName.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,false,false,1,1));
  projectName.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  projectName.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      dialogChanged();
    }
  }
);
  initialize();
  Label lblExamples=new Label(container,SWT.NULL);
  lblExamples.setText("&Create example data");
  examples=new Button(container,SWT.CHECK);
  examples.setSelection(true);
  dialogChanged();
  setControl(container);
}
 

Example 16

From project Diver, under directory /ca.uvic.chisel.javasketch/src/ca/uvic/chisel/javasketch/persistence/ui/internal/.

Source file: FiltersComposite.java

  19 
vote

@Override public void modifyText(ModifyEvent e){
  Text text=(Text)e.widget;
  String s=text.getText();
  int problem=FilterSettings.isValidFilterString(s);
  if (decoration != null) {
    String decorationImage=null;
    String decorationText=null;
    if (javaContext != null) {
      decorationImage=FieldDecorationRegistry.DEC_CONTENT_PROPOSAL;
      decorationText="Content assist available";
    }
    if (problem >= 0) {
      decorationImage=FieldDecorationRegistry.DEC_ERROR;
      decorationText="Error: unexpected character '" + s.charAt(problem) + "'";
      if (addButton != null) {
        addButton.setEnabled(false);
      }
    }
 else {
      if (addButton != null) {
        addButton.setEnabled(true);
      }
    }
    if (decorationImage != null) {
      FieldDecoration dec=FieldDecorationRegistry.getDefault().getFieldDecoration(decorationImage);
      decoration.setImage(dec.getImage());
      decoration.setDescriptionText(decorationText);
      decoration.show();
    }
 else {
      decoration.hide();
    }
  }
}
 

Example 17

From project droolsjbpm-tools, under directory /drools-eclipse/org.drools.eclipse/src/main/java/org/drools/eclipse/dsl/editor/.

Source file: DSLEditor.java

  19 
vote

private void createDescriptionField(Composite parent){
  Label descLbl=new Label(parent,SWT.NONE);
  descLbl.setText("Description:");
  GridData gridData=new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
  gridData.widthHint=80;
  descLbl.setLayoutData(gridData);
  descriptionText=new Text(parent,SWT.BORDER);
  descriptionText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  descriptionText.setText(model.getDescription() == null ? "" : model.getDescription());
  descriptionText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      String text=descriptionText.getText();
      if (!text.equals(model.getDescription())) {
        model.setDescription(text);
        makeDirty();
      }
    }
  }
);
}
 

Example 18

From project e4-rendering, under directory /com.toedter.e4.demo.contacts.swt/src/com/toedter/e4/demo/contacts/swt/views/.

Source file: DetailComposite.java

  19 
vote

private Text createText(final Composite parent,final String labelText,final String property){
  final Label label=new Label(parent,SWT.NONE);
  label.setText(labelText + "   ");
  GridData gridData=new GridData(GridData.HORIZONTAL_ALIGN_FILL);
  gridData.horizontalIndent=20;
  label.setLayoutData(gridData);
  final Text text=new Text(parent,SWT.NONE);
  GridData gridData2=new GridData(GridData.FILL_HORIZONTAL);
  gridData2.horizontalIndent=0;
  if (!generalGroup) {
    gridData2.horizontalSpan=2;
  }
 else {
    gridData2.horizontalSpan=1;
    if (labelText.equals("Title:")) {
      imageLabel=new Label(parent,SWT.NONE);
      GridData gridData3=new GridData();
      gridData3.verticalSpan=5;
      imageLabel.setLayoutData(gridData3);
    }
  }
  text.setLayoutData(gridData2);
  if (property != null) {
    if (property.equals("name")) {
      dbc.bindValue(SWTObservables.observeText(text,SWT.Modify),new AggregateNameObservableValue(contactValue));
    }
 else {
      dbc.bindValue(SWTObservables.observeText(text,SWT.Modify),PojoObservables.observeDetailValue(contactValue,property,String.class));
    }
  }
  text.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    ModifyEvent e){
      if (commitChanges) {
        setDirty(true);
      }
    }
  }
);
  return text;
}
 

Example 19

From project Eclipse, under directory /com.mobilesorcery.sdk.deployment/src/com/mobilesorcery/sdk/deployment/internal/ui/ftp/.

Source file: AddToDeployFilePage.java

  19 
vote

public void createControl(Composite parent){
  Composite main=new Composite(parent,SWT.NONE);
  main.setLayout(new GridLayout(2,false));
  Label deployFileLabel=new Label(main,SWT.NONE);
  deployFileLabel.setText("&File:");
  deployFileText=new Text(main,SWT.BORDER | SWT.SINGLE);
  deployFileText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  if (initialDeployFile != null) {
    deployFileText.setText(initialDeployFile.getFullPath().toString());
  }
  deployFileText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent event){
      validate();
    }
  }
);
  setControl(main);
  validate();
}
 

Example 20

From project eclipse-instasearch, under directory /instasearch/src/it/unibz/instasearch/ui/.

Source file: InstaSearchView.java

  19 
vote

public void modifyText(ModifyEvent e){
  searchJob.cancel();
  StyleRange[] styleRanges=createStyledSearchString(searchText.getText());
  searchText.setStyleRanges(styleRanges);
  if (searchViewControl.isShowingSearchTip())   return;
  searchJob.schedule(getSearchQuery(),false,typingSearchDelay);
  if (incrementalSearchEnabled)   doIncrementalSearch();
}
 

Example 21

From project eclipse-integration-cloudfoundry, under directory /org.cloudfoundry.ide.eclipse.server.ui/src/org/cloudfoundry/ide/eclipse/internal/server/ui/standalone/.

Source file: JavaStartCommandPart.java

  19 
vote

protected Composite createComposite(){
  Composite javaStartArea=new Composite(parent,SWT.NONE);
  GridLayoutFactory.fillDefaults().numColumns(1).spacing(0,0).applyTo(javaStartArea);
  GridDataFactory.fillDefaults().grab(true,false).applyTo(javaStartArea);
  Composite mainTypeArea=startCommandPartFactory.create2ColumnComposite(javaStartArea);
  startCommandPartFactory.createdLabel(mainTypeArea,"Main Type:");
  Composite typeArea=startCommandPartFactory.create2ColumnComposite(mainTypeArea);
  mainTypeText=startCommandPartFactory.createdEditableText(typeArea);
  mainTypeText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      updateStartCommand();
    }
  }
);
  browseButton=new Button(typeArea,SWT.PUSH);
  browseButton.setText("Browse...");
  GridDataFactory.fillDefaults().grab(false,false).align(SWT.BEGINNING,SWT.CENTER).applyTo(browseButton);
  if (javaProject != null) {
    typeAdapter=new JavaTypeUIAdapter(this,javaProject,listener);
    typeAdapter.apply();
  }
  startCommandPartFactory.createdLabel(mainTypeArea,"Options:");
  javaOptions=startCommandPartFactory.createdEditableText(mainTypeArea);
  String defaultArgs=startCommand.getArgs();
  if (defaultArgs != null) {
    javaOptions.setText(defaultArgs);
  }
  javaOptions.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      updateStartCommand();
    }
  }
);
  return javaStartArea;
}
 

Example 22

From project eclipse-integration-commons, under directory /org.springsource.ide.eclipse.commons.frameworks.ui/src/org/springsource/ide/eclipse/commons/frameworks/ui/internal/contentassist/.

Source file: JavaContentAssistUIAdapter.java

  19 
vote

/** 
 * Typically this method is not invoked by the subclass definition. It is is normally invoked by UI components that wish their UI controls adapted to the content assist and java type search mechanisms defined in this adapter.
 * @param handler
 */
public void adapt(IJavaContentAssistHandler handler){
  this.javaContentAssistHandler=handler;
  Assert.isLegal(isNotifierValid(handler));
  Button browse=handler.getBrowseButtonControl();
  final Text text=handler.getJavaTextControl();
  applyContentAssist(text);
  text.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      notifyTextSet(text.getText());
    }
  }
);
  if (browse != null) {
    browse.addSelectionListener(new SelectionAdapter(){
      public void widgetSelected(      SelectionEvent e){
        browseButtonPressed();
      }
      public void widgetDefaultSelected(      SelectionEvent e){
        browseButtonPressed();
      }
    }
);
  }
}
 

Example 23

From project eclipse-integration-gradle, under directory /org.springsource.ide.eclipse.gradle.ui/src/org/springsource/ide/eclipse/gradle/ui/.

Source file: ArgumentsSection.java

  19 
vote

public void createContents(Composite page){
  GridDataFactory grabBoth=GridDataFactory.fillDefaults().grab(true,true);
  Label label=new Label(page,SWT.NONE);
  label.setText(getLabelText());
  label.setToolTipText(getLabelTooltipText());
  Composite composite=new Composite(page,SWT.NONE);
  GridLayout layout=new GridLayout(3,false);
  composite.setLayout(layout);
  grabBoth.applyTo(composite);
  defaultButton=new Button(composite,SWT.RADIO);
  defaultButton.setText("Use Gradle wrapper's default");
  GridDataFactory gdf=GridDataFactory.fillDefaults().span(3,1);
  gdf.applyTo(defaultButton);
  customArgsButton=new Button(composite,SWT.RADIO);
  customArgsButton.setText("Use: ");
  gdf=GridDataFactory.fillDefaults().align(SWT.BEGINNING,SWT.BEGINNING);
  gdf.applyTo(customArgsButton);
  customArgsText=new Text(composite,SWT.BORDER | SWT.MULTI | SWT.H_SCROLL| SWT.V_SCROLL);
  gdf=GridDataFactory.fillDefaults().span(2,1).grab(true,true);
  gdf.applyTo(customArgsText);
  customArgsText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      validator.refresh();
    }
  }
);
  customArgsButton.addSelectionListener(new SelectionListener(){
    public void widgetSelected(    SelectionEvent e){
      enableDisableWidgets();
      validator.refresh();
    }
    public void widgetDefaultSelected(    SelectionEvent e){
    }
  }
);
  setCustomArgumentsInPage(getCustomArguments());
  enableDisableWidgets();
}
 

Example 24

From project eclipse-task-editor, under directory /plugins/de.sebastianbenz.task.ui/src/de/sebastianbenz/task/ui/views/.

Source file: QueryBasedFilter.java

  19 
vote

public void modifyText(ModifyEvent e){
  if (e.getSource() instanceof Text) {
    String newText=((Text)e.getSource()).getText();
    if (!newText.trim().equals(text)) {
      text=newText;
      updateQuery();
      refreshJob.cancel();
      refreshJob.schedule(100);
    }
  }
}
 

Example 25

From project eclipsefp, under directory /net.sf.eclipsefp.haskell.ghccompiler/src/net/sf/eclipsefp/haskell/ghccompiler/ui/preferences/.

Source file: GeneralTab.java

  19 
vote

private void createExtraOptionsField(final Composite parent){
  Composite wrapper=new Composite(parent,SWT.NONE);
  wrapper.setLayout(new GridLayout(1,false));
  Group group=new Group(wrapper,SWT.NONE);
  group.setLayout(new GridLayout());
  group.setText(UITexts.generalTab_extra);
  group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  final Button cbActive=new Button(group,SWT.CHECK);
  cbActive.setText(UITexts.generalTab_extraMsg);
  boolean selected=getPreferenceStore().getBoolean(USE_EXTRA_OPTIONS);
  cbActive.setSelection(selected);
  final Text text=new Text(group,SWT.BORDER);
  text.setText(getPreferenceStore().getString(EXTRA_OPTIONS));
  text.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  text.addModifyListener(new ModifyListener(){
    public void modifyText(    final ModifyEvent event){
      getPreferenceStore().setValue(EXTRA_OPTIONS,text.getText());
    }
  }
);
  text.setEnabled(selected);
  cbActive.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent e){
      boolean selected=cbActive.getSelection();
      text.setEnabled(selected);
      getPreferenceStore().setValue(USE_EXTRA_OPTIONS,selected);
    }
  }
);
}
 

Example 26

From project edna-rcp, under directory /org.edna.plugingenerator/src/org/edna/plugingenerator/wizards/.

Source file: NewEDNAPluginWizard.java

  19 
vote

@Override public void modifyText(ModifyEvent event){
  if (event.widget == selectDataModelPage.xsDataInput) {
    model.setXsDataInput(selectDataModelPage.xsDataInput.getText());
  }
  if (event.widget == selectDataModelPage.xsDataResult) {
    model.setXsDataResult(selectDataModelPage.xsDataResult.getText());
  }
  if (event.widget == selectDataModelPage.xsDataResult) {
    model.setXsDataResult(selectDataModelPage.xsDataResult.getText());
  }
  if (event.widget == selectPluginTypePage.templateFile) {
    model.setTemplateFileName(model.getTemplateDirectory().getFile(selectPluginTypePage.templateFile.getText()));
    checkPluginName();
  }
  if (event.widget == pluginBrandingPage.pluginName) {
    checkPluginName();
  }
  if (event.widget == pluginBrandingPage.pluginAuthor) {
    model.setAuthor(pluginBrandingPage.pluginAuthor.getText());
  }
  if (event.widget == pluginBrandingPage.pluginConfiguration) {
    model.setConfiguration(pluginBrandingPage.pluginConfiguration.getText());
  }
  if (event.widget == pluginBrandingPage.pluginCopyright) {
    model.setCopyright(pluginBrandingPage.pluginCopyright.getText());
  }
  if (event.widget == pluginBrandingPage.pluginVersion) {
    model.setVersion(pluginBrandingPage.pluginVersion.getText());
  }
  getContainer().updateButtons();
}
 

Example 27

From project egit-github, under directory /org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/.

Source file: CredentialsWizardPage.java

  19 
vote

/** 
 * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
 */
public void createControl(Composite parent){
  Composite displayArea=new Composite(parent,SWT.NONE);
  GridLayoutFactory.swtDefaults().numColumns(2).equalWidth(false).applyTo(displayArea);
  new Label(displayArea,SWT.NONE).setText(Messages.CredentialsWizardPage_LabelUser);
  userText=new Text(displayArea,SWT.BORDER | SWT.SINGLE);
  userText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      validatePage();
    }
  }
);
  GridDataFactory.fillDefaults().grab(true,false).applyTo(userText);
  new Label(displayArea,SWT.NONE).setText(Messages.CredentialsWizardPage_LabelPassword);
  passwordText=new Text(displayArea,SWT.BORDER | SWT.SINGLE | SWT.PASSWORD);
  passwordText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      validatePage();
    }
  }
);
  GridDataFactory.fillDefaults().grab(true,false).applyTo(passwordText);
  setControl(displayArea);
  setPageComplete(false);
}
 

Example 28

From project eik, under directory /plugins/info.evanchik.eclipse.karaf.workbench/src/main/java/info/evanchik/eclipse/karaf/workbench/ui/views/.

Source file: FilteredViewPart.java

  19 
vote

/** 
 * Implements  {@link ViewPart#createPartControl(Composite)}
 */
@Override public final void createPartControl(Composite parent){
  stackPanel=new Composite(parent,SWT.NONE);
  stack=new StackLayout();
  stackPanel.setLayout(stack);
  topPanel=new Composite(stackPanel,SWT.NONE);
  Composite filterPanel=new Composite(topPanel,SWT.NONE);
  new Label(filterPanel,SWT.NONE).setText("Filter:");
  txtFilter=new Text(filterPanel,SWT.SEARCH);
  mainPanel=new Composite(stackPanel,SWT.NONE);
  createMainControl(mainPanel);
  txtFilter.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      updatedFilter(txtFilter.getText());
    }
  }
);
  stack.topControl=mainPanel;
  GridLayout layout=new GridLayout(1,false);
  layout.horizontalSpacing=0;
  layout.verticalSpacing=0;
  layout.marginHeight=0;
  layout.marginWidth=0;
  topPanel.setLayout(layout);
  filterPanel.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,false));
  filterPanel.setLayout(new GridLayout(2,false));
  txtFilter.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,false));
  mainPanel.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,2,1));
  createActions();
  fillToolBar(getViewSite().getActionBars().getToolBarManager());
}
 

Example 29

From project EMF-IncQuery, under directory /plugins/org.eclipse.viatra2.emf.incquery.tooling.gui/src/org/eclipse/viatra2/emf/incquery/gui/wizards/.

Source file: NewEiqFileWizardContainerConfigurationPage.java

  19 
vote

@Override public void createControl(Composite parent){
  initializeDialogUnits(parent);
  Composite composite=new Composite(parent,SWT.NONE);
  composite.setFont(parent.getFont());
  int nColumns=4;
  GridLayout layout=new GridLayout();
  layout.numColumns=nColumns;
  composite.setLayout(layout);
  createContainerControls(composite,nColumns);
  createPackageControls(composite,nColumns);
  Label label=new Label(composite,SWT.NULL);
  label.setText("&File name:");
  fileText=new Text(composite,SWT.BORDER | SWT.SINGLE);
  fileText.setText(defaultEiqFileName);
  GridData gd_1=new GridData(GridData.FILL_HORIZONTAL);
  gd_1.horizontalSpan=3;
  fileText.setLayoutData(gd_1);
  fileText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      validatePage();
    }
  }
);
  setControl(composite);
  validatePage();
}
 

Example 30

From project Foglyn, under directory /com.foglyn.ui/src/com/foglyn/ui/.

Source file: AbstractEditorWithHint.java

  19 
vote

void installListeners(final Text text){
  text.addFocusListener(new FocusAdapter(){
    @Override public void focusGained(    FocusEvent e){
      text.getDisplay().timerExec(FOCUS_HINT_DELAY,enableHintRunnable);
    }
    @Override public void focusLost(    FocusEvent e){
      text.getDisplay().timerExec(-1,enableHintRunnable);
      hideDecorationHint();
    }
  }
);
  text.addKeyListener(new KeyAdapter(){
    @Override public void keyPressed(    KeyEvent e){
      if (e.character > 0) {
        hideDecorationHint();
      }
    }
    @Override public void keyReleased(    KeyEvent e){
      if (e.character == SWT.ESC) {
        text.getDisplay().timerExec(-1,enableHintRunnable);
      }
 else {
        text.getDisplay().timerExec(TYPING_HINT_DELAY,enableHintRunnable);
      }
    }
  }
);
  text.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      processCurrentValue();
    }
  }
);
}
 

Example 31

From project gda-common-rcp, under directory /uk.ac.gda.common.rcp/src/uk/ac/gda/richbeans/components/scalebox/.

Source file: DemandBox.java

  19 
vote

@Override protected void createModifyListener(final StyledText text){
  this.modifyListener=new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      textUpdate();
    }
  }
;
  text.addModifyListener(modifyListener);
}
 

Example 32

From project gmc, under directory /src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/dialogs/.

Source file: ChangePasswordDialog.java

  19 
vote

/** 
 */
private void createListeners(){
  ModifyListener listener=new ModifyListener(){
    @Override public void modifyText(    ModifyEvent e){
      updateButtonStatus();
    }
  }
;
  oldPassword.addModifyListener(listener);
  newPassword.addModifyListener(listener);
  confirmPassword.addModifyListener(listener);
}
 

Example 33

From project grails-ide, under directory /org.grails.ide.eclipse.refactoring/src/org/grails/ide/eclipse/refactoring/rename/ui/.

Source file: GrailsTypeRenameWizard.java

  19 
vote

private void createNewNameInput(Composite _parent){
  Composite parent=new Composite(_parent,SWT.NONE);
  GridLayout layout=new GridLayout(2,false);
  parent.setLayout(layout);
  GRAB_HOR.applyTo(parent);
  Label label=new Label(parent,SWT.NONE);
  label.setText("New name:");
  newNameInput=new Text(parent,SWT.SINGLE | SWT.LEFT | SWT.BORDER);
  GRAB_HOR.applyTo(newNameInput);
  newNameInput.setText(getRefactoring().getNewName());
  newNameInput.setSelection(0,newNameInput.getText().length());
  newNameInput.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      setNewName(newNameInput.getText());
    }
  }
);
}
 

Example 34

From project hackergarten-moreunit, under directory /org.moreunit.core/src/org/moreunit/core/preferences/.

Source file: GenericConfigurationPage.java

  19 
vote

private void addValidationOnModification(Text field){
  field.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent event){
      validate();
    }
  }
);
}
 

Example 35

From project iee, under directory /org.eclipse.iee.editor.wizard/src/org/eclipse/iee/editor/wizard/wizards/.

Source file: GeneralIEEWizardPage.java

  19 
vote

/** 
 * @see IDialogPage#createControl(Composite)
 */
public void createControl(Composite parent){
  Composite container=new Composite(parent,SWT.NULL);
  GridLayout layout=new GridLayout();
  container.setLayout(layout);
  layout.numColumns=3;
  layout.verticalSpacing=9;
  Label label=new Label(container,SWT.NULL);
  label.setText("&Container:");
  containerText=new Text(container,SWT.BORDER | SWT.SINGLE);
  GridData gd=new GridData(GridData.FILL_HORIZONTAL);
  containerText.setLayoutData(gd);
  containerText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      dialogChanged();
    }
  }
);
  Button button=new Button(container,SWT.PUSH);
  button.setText("Browse...");
  button.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      handleBrowse();
    }
  }
);
  label=new Label(container,SWT.NULL);
  label.setText("&File name:");
  fileText=new Text(container,SWT.BORDER | SWT.SINGLE);
  gd=new GridData(GridData.FILL_HORIZONTAL);
  fileText.setLayoutData(gd);
  fileText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      dialogChanged();
    }
  }
);
  initialize();
  dialogChanged();
  setControl(container);
}
 

Example 36

From project interactive-self-assessment, under directory /editbox/src/pm/eclipse/editbox/impl/.

Source file: BoxDecoratorImpl.java

  19 
vote

public void modifyText(ModifyEvent e){
  if (boxes == null) {
    buildBoxes();
    updateCaret();
    drawBackgroundBoxes();
  }
}
 

Example 37

From project JGit, under directory /org.spearce.egit.ui/src/org/spearce/egit/ui/internal/clone/.

Source file: CloneDestinationPage.java

  19 
vote

private void createConfigGroup(final Composite parent){
  final Group g=createGroup(parent,UIText.CloneDestinationPage_groupConfiguration);
  newLabel(g,UIText.CloneDestinationPage_promptRemoteName + ":");
  remoteText=new Text(g,SWT.BORDER);
  remoteText.setText("origin");
  remoteText.setLayoutData(createFieldGridData());
  remoteText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      checkPage();
    }
  }
);
}
 

Example 38

From project libra, under directory /plugins/org.eclipse.libra.framework.equinox.ui/src/org/eclipse/libra/framework/equinox/ui/internal/.

Source file: JavaProfileEditorSection.java

  19 
vote

/** 
 * Creates the SWT controls for this workbench part.
 * @param parent the parent control
 */
public void createSection(Composite parent){
  super.createSection(parent);
  FormToolkit toolkit=getFormToolkit(parent.getDisplay());
  section=toolkit.createSection(parent,ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED | ExpandableComposite.TITLE_BAR| Section.DESCRIPTION| ExpandableComposite.FOCUS_TITLE);
  section.setText(Messages.javaProfileSection);
  section.setDescription(Messages.javaProfileSectionDescription);
  section.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL));
  Composite composite=toolkit.createComposite(section);
  GridLayout layout=new GridLayout();
  layout.numColumns=3;
  layout.marginHeight=5;
  layout.marginWidth=10;
  layout.verticalSpacing=5;
  layout.horizontalSpacing=15;
  composite.setLayout(layout);
  composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL));
  IWorkbenchHelpSystem whs=PlatformUI.getWorkbench().getHelpSystem();
  whs.setHelp(composite,ContextIds.FRAMEWORK_INSTANCE_EDITOR);
  whs.setHelp(section,ContextIds.FRAMEWORK_INSTANCE_EDITOR);
  toolkit.paintBordersFor(composite);
  section.setClient(composite);
  Label label=createLabel(toolkit,composite,Messages.javaProfileSection);
  GridData data=new GridData(SWT.BEGINNING,SWT.CENTER,false,false);
  label.setLayoutData(data);
  String[] envList=IOSGIExecutionEnvironment.getExecutionEnvironmentIds();
  javaProfileCombo=SWTFactory.createCombo(composite,SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY,1,envList);
  javaProfileCombo.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      frameworkInstance.setJavaProfile(javaProfileCombo.getText());
    }
  }
);
  initialize();
}
 

Example 39

From project logsaw-app, under directory /net.sf.logsaw.dialect.log4j.ui/src/net/sf/logsaw/dialect/log4j/ui/pattern/.

Source file: Log4JPatternLayoutWizardPage.java

  19 
vote

@Override public void createControl(Composite parent){
  Composite root=new Composite(parent,SWT.NONE);
  GridLayout layout=new GridLayout(2,false);
  layout.horizontalSpacing=10;
  layout.marginRight=10;
  root.setLayout(layout);
  Label label=new Label(root,SWT.NONE);
  label.setText(Messages.Log4JPatternLayoutWizardPage_label_pattern);
  patternText=new Text(root,SWT.BORDER);
  patternText.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,false));
  patternText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    ModifyEvent e){
      validateInput();
    }
  }
);
  patternDecoration=UIUtils.createErrorDecorator(patternText,"");
  try {
    Set<String> patterns=Log4JDialectUIPlugin.getDefault().loadKnownPatterns();
    if (!patterns.isEmpty()) {
      UIUtils.createContentProposalDecorator(patternText,Messages.Log4JPatternLayoutWizardPage_dec_contentAssistAvailable);
      KeyStroke keyStroke=KeyStroke.getInstance("Ctrl+Space");
      ContentProposalAdapter adapter=new ContentProposalAdapter(patternText,new TextContentAdapter(),new SimpleContentProposalProvider(patterns.toArray(new String[patterns.size()])),keyStroke,null);
      adapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
    }
  }
 catch (  Exception e) {
    UIPlugin.logAndShowError(new CoreException(new Status(IStatus.ERROR,UIPlugin.PLUGIN_ID,e.getLocalizedMessage(),e)),false);
  }
  setControl(root);
}
 

Example 40

From project m2eclipse-webby, under directory /org.sonatype.m2e.webby/src/org/sonatype/m2e/webby/internal/launch/ui/.

Source file: WebbyTab.java

  19 
vote

private void createApplicationEditor(Composite parent){
  Font font=parent.getFont();
  Group group=new Group(parent,SWT.NONE);
  group.setText("Web Application");
  group.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,false));
  group.setLayout(new GridLayout(3,false));
  group.setFont(font);
  new Label(group,SWT.LEFT).setText("Project:");
  projectName=new Text(group,SWT.SINGLE | SWT.BORDER);
  projectName.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      updateLaunchConfigurationDialog();
    }
  }
);
  projectName.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,false));
  projectName.setFont(font);
  projectNameBrowse=createPushButton(group,LauncherMessages.AbstractJavaMainTab_1,null);
  projectNameBrowse.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      IJavaProject project=chooseJavaProject();
      if (project != null) {
        projectName.setText(project.getElementName());
      }
    }
  }
);
  new Label(group,SWT.LEFT).setText("Context:");
  contextName=new Text(group,SWT.SINGLE | SWT.BORDER);
  contextName.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      updateLaunchConfigurationDialog();
    }
  }
);
  contextName.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,false));
  contextName.setFont(font);
  return;
}
 

Example 41

From project mylyn.context, under directory /org.eclipse.mylyn.context.ui/src/org/eclipse/mylyn/internal/context/ui/views/.

Source file: QuickContextPopupDialog.java

  19 
vote

private void createUIListenersFilterText(){
  fFilterText.addKeyListener(new KeyListener(){
    public void keyPressed(    KeyEvent e){
      if (e.keyCode == 0x0D) {
        gotoSelectedElement();
      }
 else       if (e.keyCode == SWT.ARROW_DOWN) {
        commonViewer.getTree().setFocus();
      }
 else       if (e.keyCode == SWT.ARROW_UP) {
        commonViewer.getTree().setFocus();
      }
 else       if (e.character == 0x1B) {
        dispose();
      }
    }
    public void keyReleased(    KeyEvent e){
    }
  }
);
  fFilterText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      String text=((Text)e.widget).getText();
      int length=text.length();
      if (length > 0) {
        if (text.charAt(length - 1) != '*') {
          text=text + '*';
        }
        if (text.charAt(0) != '*') {
          text='*' + text;
        }
      }
      setMatcherString(text,true);
    }
  }
);
}
 

Example 42

From project mylyn.incubator, under directory /org.eclipse.mylyn.examples.monitor.study/src/org/eclipse/mylyn/examples/monitor/study/.

Source file: SubmitFeedbackPage.java

  19 
vote

/** 
 * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
 */
public void createControl(Composite parent){
  Composite container=new Composite(parent,SWT.NULL);
  GridLayout layout=new GridLayout();
  container.setLayout(layout);
  layout.numColumns=1;
  Composite container2=null;
  if (uploadWizard == null) {
    container2=new Composite(container,SWT.NULL);
    layout=new GridLayout(2,false);
    container2.setLayout(layout);
    container2=addSubmissionStyleControls(container2);
  }
 else {
    container2=new Composite(container,SWT.NULL);
    layout=new GridLayout(2,true);
    container2.setLayout(layout);
  }
  Label label=new Label(container2,SWT.NONE);
  label.setText("Feedback:                                                            ");
  GridData gd=new GridData(GridData.GRAB_HORIZONTAL | GridData.FILL_BOTH);
  gd.horizontalSpan=2;
  label.setLayoutData(gd);
  feedback=new Text(container2,SWT.BORDER | SWT.V_SCROLL | SWT.WRAP);
  gd=new GridData(GridData.GRAB_HORIZONTAL | GridData.FILL_BOTH | GridData.HORIZONTAL_ALIGN_FILL);
  gd.horizontalSpan=2;
  gd.verticalSpan=40;
  feedback.setLayoutData(gd);
  feedback.setEditable(true);
  feedback.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      feed=feedback.getText();
      SubmitFeedbackPage.this.setPageComplete(SubmitFeedbackPage.this.isPageComplete());
    }
  }
);
  setControl(container);
}
 

Example 43

From project netifera, under directory /platform/com.netifera.platform.ui/com.netifera.platform.ui.application/src/com/netifera/platform/ui/application/workspaces/.

Source file: WorkspaceNamePage.java

  19 
vote

private Text createWorkspaceName(Composite container){
  createLabel(container,"Workspace Name:");
  final Text t=createText(container,16);
  t.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      if (t.getText().length() > 0) {
        setPageComplete(true);
      }
 else {
        setPageComplete(false);
      }
    }
  }
);
  return t;
}
 

Example 44

From project Newsreader, under directory /bundles/org.eclipse.ecf.salvo.ui/src/org/eclipse/ecf/salvo/ui/internal/wizards/.

Source file: NewNewsServerWizardPageEditor.java

  19 
vote

public void modifyText(ModifyEvent e){
  page.setErrorMessage(null);
  page.setServerValidated(false);
  if (page.getAddress().trim().length() == 0) {
    page.setErrorMessage("Invalid address.");
    return;
  }
  try {
    page.getPort();
  }
 catch (  Exception e2) {
    page.setErrorMessage("Invalid port. Try 119.");
    return;
  }
  if (page.getUser().trim().length() == 0) {
    page.setErrorMessage("Invalid user");
    return;
  }
  if (page.getEmail().trim().length() == 0) {
    page.setErrorMessage("Invalid email address");
    return;
  }
  if (page.isLogonRequired()) {
    if (page.getLogin().trim().length() == 0) {
      page.setErrorMessage("Invalid login");
      return;
    }
    if (page.getPass().trim().length() == 0) {
      page.setErrorMessage("Invalid password");
      return;
    }
  }
}
 

Example 45

From project org.openscada.aurora, under directory /org.openscada.pde.maven.target/src/com/inavare/maven/platform/.

Source file: WizardPageExtension.java

  19 
vote

public void createControl(final Composite parent){
  Composite client=new Composite(parent,SWT.NONE);
  client.setLayout(new GridLayout(3,false));
  Label label=new Label(client,SWT.NONE);
  label.setText("Maven Repository Path");
  label.setLayoutData(new GridData(SWT.BEGINNING,SWT.CENTER,false,false));
  this.directoryText=new Text(client,SWT.BORDER);
  this.directoryText.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,false));
  this.directoryText.addModifyListener(new ModifyListener(){
    public void modifyText(    final ModifyEvent e){
      update();
    }
  }
);
  this.directoryText.setText(getInitialPath());
  Button button=new Button(client,SWT.PUSH);
  button.setLayoutData(new GridData(SWT.BEGINNING,SWT.CENTER,false,false));
  button.setText("Browse...");
  button.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent e){
      WizardPageExtension.this.handleBrowse();
    }
  }
);
  setControl(client);
  update();
}
 

Example 46

From project org.openscada.orilla, under directory /org.openscada.ae.ui.testing/src/org/openscada/ae/ui/testing/wizard/.

Source file: QueryStringWizardPage.java

  19 
vote

public void createControl(final Composite parent){
  final Composite group=new Composite(parent,SWT.NONE);
  group.setLayout(new GridLayout(2,false));
  Label label;
  label=new Label(group,SWT.NONE);
  label.setText("Filter Type:");
  label.setLayoutData(new GridData(SWT.BEGINNING,SWT.CENTER,false,false));
  this.filterTypeEntry=new Text(group,SWT.SINGLE | SWT.BORDER);
  this.filterTypeEntry.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,false));
  this.filterTypeEntry.setText("ldap");
  this.filterTypeEntry.addModifyListener(new ModifyListener(){
    public void modifyText(    final ModifyEvent e){
      update();
    }
  }
);
  label=new Label(group,SWT.NONE);
  label.setText("Filter String:");
  label.setLayoutData(new GridData(SWT.BEGINNING,SWT.CENTER,false,false));
  this.filterEntry=new Text(group,SWT.MULTI | SWT.BORDER);
  this.filterEntry.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
  this.filterEntry.addModifyListener(new ModifyListener(){
    public void modifyText(    final ModifyEvent e){
      update();
    }
  }
);
  setControl(group);
  update();
}