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

The following are top voted examples for showing how to use org.eclipse.swt.events.ModifyEvent. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: n4js   File: InstallNpmDependencyDialog.java   Source Code and License 6 votes vote down vote up
private void createVersionArea(final Group parent, String versionLabel, Consumer<String> textHandler,
		Consumer<Boolean> flagHandler) {
	final Composite area = createVersionArea(parent, versionLabel);
	final Composite textArea = createVersionInputArea(area);

	final Text txtUpperVersion = getSimpleTextArea(textArea);
	txtUpperVersion.addModifyListener(new ModifyListener() {

		@Override
		public void modifyText(ModifyEvent e) {
			Text textWidget = (Text) e.getSource();
			textHandler.accept(textWidget.getText());
		}
	});

	createVersionInclsivnessArea(area, flagHandler);
}
 
Example 2
Project: n4js   File: InstallNpmDependencyDialog.java   Source Code and License 6 votes vote down vote up
private void createNameArea(Composite parent, String areaName, Consumer<String> textHandler) {
	final Group area = new Group(parent, SHADOW_ETCHED_IN);
	area.setLayout(GridLayoutFactory.fillDefaults().numColumns(1).create());
	area.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create());
	area.setText(areaName);

	final Text txtPackageName = getSimpleTextArea(area);
	txtPackageName.addModifyListener(new ModifyListener() {

		@Override
		public void modifyText(ModifyEvent e) {
			Text textWidget = (Text) e.getSource();
			textHandler.accept(textWidget.getText());
		}
	});
}
 
Example 3
Project: Hydrograph   File: FilterHelper.java   Source Code and License 6 votes vote down vote up
/**
 * Gets the field name modify listener.
 * 
 * @param tableViewer
 *            the table viewer
 * @param conditionsList
 *            the conditions list
 * @param fieldsAndTypes
 *            the fields and types
 * @param fieldNames
 *            the field names
 * @param saveButton
 *            the save button
 * @param displayButton
 *            the display button
 * @return the field name modify listener
 */
public ModifyListener getFieldNameModifyListener(final TableViewer tableViewer, final List<Condition> conditionsList,
		final Map<String, String> fieldsAndTypes, final String[] fieldNames, final Button saveButton, final Button displayButton) {
	ModifyListener listener = new ModifyListener() {
		
		@Override
		public void modifyText(ModifyEvent e) {
			CCombo source = (CCombo) e.getSource();
			int index = (int) source.getData(FilterConstants.ROW_INDEX);
			Condition filterConditions = conditionsList.get(index);
			String fieldName = source.getText();
			filterConditions.setFieldName(fieldName);
			
			if(StringUtils.isNotBlank(fieldName)){
				String fieldType = fieldsAndTypes.get(fieldName);
				TableItem item = tableViewer.getTable().getItem(index);
				CCombo conditionalCombo = (CCombo) item.getData(FilterConditionsDialog.CONDITIONAL_OPERATORS);
				if(conditionalCombo != null && StringUtils.isNotBlank(fieldType)){
					conditionalCombo.setText(filterConditions.getConditionalOperator());
					conditionalCombo.setItems(FilterHelper.INSTANCE.getTypeBasedOperatorMap().get(fieldType));
					new AutoCompleteField(conditionalCombo, new CComboContentAdapter(), conditionalCombo.getItems());
				}
			}
			validateCombo(source);
			toggleSaveDisplayButton(conditionsList, fieldsAndTypes, fieldNames, saveButton, displayButton);
		}
	};
	return listener;
}
 
Example 4
Project: eZooKeeper   File: ZnodeModelTextDataEditor.java   Source Code and License 6 votes vote down vote up
@Override
protected void createContent() {

    FormToolkit toolkit = getToolkit();

    _Text = toolkit.createText(this, "", SWT.BORDER | SWT.SINGLE);
    _Text.setFont(JFaceResources.getTextFont());

    FormData formData = new FormData();
    formData.top = new FormAttachment(0, 0);
    formData.left = new FormAttachment(0, 0);
    formData.right = new FormAttachment(100, 0);

    _Text.setLayoutData(formData);

    _Text.addModifyListener(new ModifyListener() {

        @Override
        public void modifyText(ModifyEvent e) {
            setDirtyInternal(true);
        }
    });

}
 
Example 5
Project: dsp4e   File: DSPMainTab.java   Source Code and License 6 votes vote down vote up
private void createDebugJSonComponent(Composite parent) {
	Composite comp = new Group(parent, SWT.NONE);
	comp.setLayout(new GridLayout());
	comp.setLayoutData(new GridData(GridData.FILL_BOTH));

	Label jsonLabel = new Label(comp, SWT.NONE);
	jsonLabel.setText("&Launch Parameters (Json):");
	jsonLabel.setLayoutData(new GridData(GridData.BEGINNING));

	jsonText = new Text(comp, SWT.MULTI | SWT.WRAP | SWT.BORDER | SWT.V_SCROLL);
	jsonText.setLayoutData(new GridData(GridData.FILL_BOTH));
	jsonText.addModifyListener(new ModifyListener() {

		@Override
		public void modifyText(ModifyEvent e) {
			updateLaunchConfigurationDialog();
		}
	});

}
 
Example 6
Project: convertigo-eclipse   File: SourcePickerHelper.java   Source Code and License 6 votes vote down vote up
public void createXPathEvaluator(StepXpathEvaluatorComposite xpathEvaluatorComposite) {
	xpathEvaluator = xpathEvaluatorComposite;
	GridData gd = new GridData();
	gd.horizontalAlignment = GridData.FILL;
	gd.verticalAlignment = GridData.FILL;
	gd.grabExcessVerticalSpace = true;
	gd.grabExcessHorizontalSpace = true;
	xpathEvaluator.setLayoutData(gd);
	
	xpathEvaluator.getXpath().addModifyListener(new ModifyListener() {
		public void modifyText(ModifyEvent e) {
			String anchor = xpathEvaluator.getAnchor();
			StringEx sx = new StringEx(xpathEvaluator.getXpath().getText());
			sx.replace(anchor, ".");
			String text = sx.toString();
			if (!text.equals("")) {
				setSourceXPath(text);
			}
			//TODO: disable/enable OK button
		}
	});
}
 
Example 7
Project: convertigo-eclipse   File: LimitCharsLogsPreferenceDialog.java   Source Code and License 6 votes vote down vote up
@Override
protected Control createDialogArea(Composite parent) {		
	
	Composite composite = new Composite(parent, SWT.NONE);
	
	Label labelDescription = new Label(composite, SWT.WRAP);
	labelDescription.setText("Limit chars logs");
	
	final Spinner spinnerBox = new Spinner(composite, SWT.WRAP);
	spinnerBox.setMaximum(MAX_LOG_CHARS);
	spinnerBox.setMinimum(MIN_LOG_CHARS);
	spinnerBox.setSelection(limitLogsChars);
	spinnerBox.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
	
	
	spinnerBox.addModifyListener(new ModifyListener() {
		public void modifyText(ModifyEvent event) {
			limitLogsChars = Integer.parseInt(spinnerBox.getText());
		}
	});
	
	composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
	composite.setLayout(new GridLayout(2, false));
	
	return composite;
}
 
Example 8
Project: convertigo-eclipse   File: UrlMappingWizardPage.java   Source Code and License 6 votes vote down vote up
public void createControl(Composite parent) {
	container = new Composite(parent, SWT.NULL);
	GridLayout gridLayout = new GridLayout();
	gridLayout.verticalSpacing = 10;
	container.setLayout(gridLayout);
	
	Label label = new Label(container, SWT.NONE);
	label.setText("Please enter the Convertigo api path of the mapping\n");
	
	mappingPath = new Text(container, SWT.BORDER | SWT.SINGLE);
	mappingPath.setFont(new Font(container.getDisplay(), "Tahoma", 10, 0));
	mappingPath.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
	mappingPath.setText("/");
	mappingPath.addModifyListener(new ModifyListener() {
		public void modifyText(ModifyEvent e) {
			dialogChanged();
		}
	});
	
	setControl(container);
}
 
Example 9
Project: Hydrograph   File: OperationComposite.java   Source Code and License 6 votes vote down vote up
private void createSimpleIdTextBox(Composite composite_1) {
	Composite composite = new Composite(composite_1, SWT.NONE);
	composite.setLayout(new GridLayout(2, false));
	GridData gd_composite = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);
	gd_composite.heightHint = 29;
	composite.setLayoutData(gd_composite);

	idTextBox = new Text(composite, SWT.BORDER);
	idTextBox.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
	idTextBox.setText(operationDataStructure.getId());
	idTextBox.addModifyListener(new ModifyListener() {

		@Override
		public void modifyText(ModifyEvent e) {
			operationDataStructure.setId(idTextBox.getText());
			dialog.refreshErrorLogs();
		}
	});

}
 
Example 10
Project: gw4e.project   File: GW4ELaunchConfigurationTab.java   Source Code and License 6 votes vote down vote up
/**
 * Create the element that allow to select a start element See the
 * GraphWalker offline command for more information
 */
private void createStartElementSection(Composite parent) {

	Label fGeneratorLabel = new Label(parent, SWT.NONE);
	fGeneratorLabel.setText("Start Element");
	gd = new GridData();
	gd.horizontalSpan = 1;
	gd.horizontalIndent = 25;
	fGeneratorLabel.setLayoutData(gd);

	fStartNodeText = new Text(parent, SWT.SINGLE | SWT.BORDER);
	fStartNodeText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
	fStartNodeText.addModifyListener(new ModifyListener() {
		@Override
		public void modifyText(ModifyEvent evt) {
			validatePage();
			updateConfigState();
			fStartNodeText.setFocus();
		}
	});
	fStartNodeText.setData(GW4E_LAUNCH_CONFIGURATION_CONTROL_ID, GW4E_LAUNCH_CONFIGURATION_TEXT_ID_START_ELEMENT);
}
 
Example 11
Project: gw4e.project   File: GW4ELaunchConfigurationTab.java   Source Code and License 6 votes vote down vote up
/**
 * Create the element that allow to select a project See the GraphWalker
 * offline command for more information
 */
private void createProjectSection(Composite parent) {
	fProjLabel = new Label(parent, SWT.NONE);
	fProjLabel.setText(MessageUtil.getString("label_project"));
	GridData gd = new GridData();
	gd.horizontalIndent = 25;
	fProjLabel.setLayoutData(gd);

	fProjText = new Text(parent, SWT.SINGLE | SWT.BORDER);
	fProjText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
	fProjText.addModifyListener(new ModifyListener() {
		@Override
		public void modifyText(ModifyEvent evt) {
			validatePage();
			updateConfigState();

		}
	});
	fProjText.setData(GW4E_LAUNCH_CONFIGURATION_CONTROL_ID, GW4E_LAUNCH_CONFIGURATION_TEXT_ID_PROJECT);

}
 
Example 12
Project: gw4e.project   File: GW4ELaunchConfigurationTab.java   Source Code and License 6 votes vote down vote up
/**
 * Create the element that allow to select a start element See the
 * GraphWalker offline command for more information
 */
private void createStartElementSection(Composite parent) {

	Label fGeneratorLabel = new Label(parent, SWT.NONE);
	fGeneratorLabel.setText("Start Element");
	gd = new GridData();
	gd.horizontalSpan = 1;
	gd.horizontalIndent = 25;
	fGeneratorLabel.setLayoutData(gd);

	fStartNodeText = new Text(parent, SWT.SINGLE | SWT.BORDER);
	fStartNodeText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
	fStartNodeText.addModifyListener(new ModifyListener() {
		@Override
		public void modifyText(ModifyEvent evt) {
			validatePage();
			updateConfigState();
			fStartNodeText.setFocus();
		}
	});
	fStartNodeText.setData(GW4E_LAUNCH_CONFIGURATION_CONTROL_ID, GW4E_LAUNCH_CONFIGURATION_TEXT_ID_START_ELEMENT);
}
 
Example 13
Project: gemoc-studio   File: StringOption.java   Source Code and License 6 votes vote down vote up
/**
 * Creates the string option control.
 * 
 * @param parent
 *            parent composite of the string option widget
 * @param span
 *            the number of columns that the widget should span
 */
public void createControl(Composite parent, int span) {
	labelControl = createLabel(parent, 1);
	labelControl.setEnabled(isEnabled());
	text = new Text(parent, fStyle);
	if (getValue() != null)
		text.setText(getValue().toString());
	GridData gd = new GridData(GridData.FILL_HORIZONTAL);
	gd.horizontalSpan = span - 1;
	text.setLayoutData(gd);
	text.setEnabled(isEnabled());
	text.addModifyListener(new ModifyListener() {
		public void modifyText(ModifyEvent e) {
			if (ignoreListener)
				return;
			StringOption.super.setValue(text.getText());
			getSection().validateOptions(StringOption.this);
		}
	});
	text.setToolTipText(this.getToolTipText());
}
 
Example 14
Project: Hydrograph   File: ExpressionComposite.java   Source Code and License 6 votes vote down vote up
private void createSimpleIdTextBox(Composite composite_1) {
	Composite composite = new Composite(composite_1, SWT.NONE);
	composite.setLayout(new GridLayout(2, false));
	GridData gd_composite = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);
	gd_composite.heightHint = 29;
	composite.setLayoutData(gd_composite);

	idTextBox = new Text(composite, SWT.BORDER);
	idTextBox.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
	idTextBox.setText(expressionDataStructure.getId());
	idTextBox.addModifyListener(new ModifyListener() {

		@Override
		public void modifyText(ModifyEvent e) {
			expressionDataStructure.setId(idTextBox.getText());
			dialog.refreshErrorLogs();
		}
	});

}
 
Example 15
Project: Hydrograph   File: AvailableFieldsComposite.java   Source Code and License 6 votes vote down vote up
private void addListnersToSearchTextBox() {
	searchTextBox.addModifyListener(new ModifyListener() {
		@Override
		public void modifyText(ModifyEvent e) {
			if(!StringUtils.equals(Constants.DEFAULT_SEARCH_TEXT, searchTextBox.getText())){
			table.removeAll();
			for(String field:inputFields){
				if(StringUtils.containsIgnoreCase(field,searchTextBox.getText())){
					TableItem tableItem = new TableItem(table, SWT.NONE);
					tableItem.setText(0,field);
					tableItem.setText(1, fieldMap.get(field).getSimpleName());
				}
			}
			
			if(table.getItemCount()==0 && StringUtils.isNotBlank(searchTextBox.getText())){
				new TableItem(table, SWT.NONE).setText(Messages.CANNOT_SEARCH_INPUT_STRING+searchTextBox.getText());
			}
		}
			
		}
	});
}
 
Example 16
Project: Hydrograph   File: CategoriesUpperComposite.java   Source Code and License 6 votes vote down vote up
private void addListnersToSearchTextBox() {
	searchTextBox.addModifyListener(new ModifyListener() {
		
		@Override
		public void modifyText(ModifyEvent e) {
			if(!StringUtils.equals(Constants.DEFAULT_SEARCH_TEXT, searchTextBox.getText())){
			classNameList.removeAll();
			for(ClassDetails classDetails:ClassRepo.INSTANCE.getClassList()){
					if(StringUtils.containsIgnoreCase(classDetails.getcName(),searchTextBox.getText())){
						classNameList.add(classDetails.getDisplayName());
						classNameList.setData(String.valueOf(classNameList.getItemCount() - 1), classDetails);
					}
				}
			if(classNameList.getItemCount()==0 && StringUtils.isNotBlank(searchTextBox.getText())){
				classNameList.add(Messages.CANNOT_SEARCH_INPUT_STRING+searchTextBox.getText());
			}
			categoriesComposite.clearDescriptionAndMethodList();
			}
			functionSearchTextBox.setEnabled(false);
		}
	});
	
}
 
Example 17
Project: Hydrograph   File: UpdateByKeysWidget.java   Source Code and License 6 votes vote down vote up
@Override
public void attachToPropertySubGroup(AbstractELTContainerWidget subGroup) {
	
	logger.debug("Starting {} button creation");
	ELTDefaultSubgroupComposite selectUpdateKeysComposite = new ELTDefaultSubgroupComposite(subGroup.getContainerControl());
	selectUpdateKeysComposite.createContainerWidget();
	
	ELTDefaultLable defaultLable1 = new ELTDefaultLable(Messages.LABEL_UPDATE_BY_KEYS);
	selectUpdateKeysComposite.attachWidget(defaultLable1);
	setPropertyHelpWidget((Control) defaultLable1.getSWTWidgetControl());
	
	ELTDefaultTextBox defaultUpdateByKeysTextBox = new ELTDefaultTextBox();
	selectUpdateKeysComposite.attachWidget(defaultUpdateByKeysTextBox);
	 updateByKeysTextBox=(Text)defaultUpdateByKeysTextBox.getSWTWidgetControl();
	 updateByKeysTextBox.setEnabled(false);
	setPropertyHelpWidget((Control) defaultUpdateByKeysTextBox.getSWTWidgetControl());
	
	ELTDefaultButton eltDefaultButton = new ELTDefaultButton(Messages.LABEL_SELECT_KEYS);
	selectUpdateKeysComposite.attachWidget(eltDefaultButton);
	selectKeysButton=(Button)eltDefaultButton.getSWTWidgetControl();
	
	updateByKeysTextBoxDecorator = WidgetUtility.addDecorator(updateByKeysTextBox, Messages.bind(Messages.EMPTY_FIELD, "JDBC Driver \n Class"));
	updateByKeysTextBoxDecorator.setMarginWidth(3);

	if(StringUtils.isNotEmpty(propertyValue)){
		updateByKeysTextBox.setText(propertyValue);
		updateByKeysTextBoxDecorator.hide();
	}
	
	attachButtonListner(selectKeysButton);
	
	
	updateByKeysTextBox.addModifyListener(new ModifyListener() {
		
		@Override
		public void modifyText(ModifyEvent event) {
			Text textBox=(Text)event.widget;
			if(StringUtils.isBlank(textBox.getText())){
				updateByKeysTextBoxDecorator.show();
			}else{
				updateByKeysTextBoxDecorator.hide();
			}
		}
	});
	
}
 
Example 18
Project: Hydrograph   File: TransformDialog.java   Source Code and License 6 votes vote down vote up
private void addModifyListenerToComboDataTypes(Combo combo,final AbstractExpressionComposite expressionComposite,MappingSheetRow mappingSheetRow) {
	combo.addModifyListener(new ModifyListener(){
		@Override
		public void modifyText(ModifyEvent e) {
			Combo accumulatorDataType =(Combo)e.widget;
			mappingSheetRow.setComboDataType( accumulatorDataType.getText());
			boolean isValidValue = validate(expressionComposite.getTextAccumulator().getText(),accumulatorDataType.getText());
			if(!isValidValue){
				expressionComposite.getTextAccumulator().setBackground(CustomColorRegistry.INSTANCE.getColorFromRegistry( 255,255,000));
			}else{
				expressionComposite.getTextAccumulator().setBackground(CustomColorRegistry.INSTANCE.getColorFromRegistry( 255,255,255));
			}
			showHideValidationMessage();
		}
	});
}
 
Example 19
Project: Hydrograph   File: TransformDialog.java   Source Code and License 6 votes vote down vote up
private void addModifyListenerToAccumulator(Text text,final AbstractExpressionComposite expressionComposite,MappingSheetRow mappingSheetRow) {
	text.addModifyListener(new ModifyListener() {
		@Override
		public void modifyText(ModifyEvent e) {
			Text accumulatorTextBox=(Text)e.widget;
			mappingSheetRow.setAccumulator(accumulatorTextBox.getText());
			boolean isValidValue = validate(accumulatorTextBox.getText(),expressionComposite.getComboDataTypes().getText());
			if(!isValidValue && (!expressionComposite.getIsParamAccumulator().getSelection()||StringUtils.isBlank(accumulatorTextBox.getText()))){
				expressionComposite.getTextAccumulator().setBackground(CustomColorRegistry.INSTANCE.getColorFromRegistry( 255,255,000));
			}else{
				expressionComposite.getTextAccumulator().setBackground(CustomColorRegistry.INSTANCE.getColorFromRegistry( 255,255,255));
			}
			showHideValidationMessage();
		}
	});
}
 
Example 20
Project: Hydrograph   File: TextBoxWithLabelWidget.java   Source Code and License 6 votes vote down vote up
@Override
public void addModifyListener(final Property property,  final ArrayList<AbstractWidget> widgetList) {
	widgets=widgetList;
	textBox.addModifyListener(new ModifyListener() {
		
		@Override
		public void modifyText(ModifyEvent e) {
			 
			 Utils.INSTANCE.addMouseMoveListener(textBox, cursor);
			 showHideErrorSymbol(widgetList);
		}
	});
	if(Messages.LOOP_XPATH_QUERY.equals(textBoxConfig.getName())){
		addFocusListenerToTextBox();
	}
	
}
 
Example 21
Project: orientdb-oda-birt   File: CustomDataSetWizardPage.java   Source Code and License 5 votes vote down vote up
/**
 * Creates custom control for user-defined query text.
 */
private Control createPageControl( Composite parent )
{
    Composite composite = new Composite( parent, SWT.NONE );
    composite.setLayout( new GridLayout( 1, false ) );
    GridData gridData = new GridData( GridData.HORIZONTAL_ALIGN_FILL
            | GridData.VERTICAL_ALIGN_FILL );

    composite.setLayoutData( gridData );

    Label fieldLabel = new Label( composite, SWT.NONE );
    fieldLabel.setText( "&Query Text:" );
    
    m_queryTextField = new Text( composite, SWT.BORDER
            | SWT.V_SCROLL | SWT.H_SCROLL );
    GridData data = new GridData( GridData.FILL_HORIZONTAL );
    data.heightHint = 100;
    m_queryTextField.setLayoutData( data );
    m_queryTextField.addModifyListener( new ModifyListener( ) 
    {
        public void modifyText( ModifyEvent e )
        {
            validateData();
        }
    } );
   
    setPageComplete( false );
    return composite;
}
 
Example 22
Project: gemoc-studio-modeldebugging   File: NewViewPointProjectPage.java   Source Code and License 5 votes vote down vote up
@Override
public void createControl(Composite parent) {
	final Composite composite = new Composite(parent, SWT.NONE);
	GridLayout layout = new GridLayout();
	layout.numColumns = 1;
	composite.setLayout(layout);

	final ModifyListener listener = new ModifyListener() {

		@Override
		public void modifyText(ModifyEvent e) {
			setPageComplete(isSet(diagramNameText)
					&& isSet(projectNameText) && isSet(viewpointNameText)
					&& isSet(viewpointSpecificationModelText));
		}

		private boolean isSet(Text text) {
			return text != null && !"".equals(text.getText());
		}

	};
	projectNameText = createProjectNameComposite(composite, listener);
	viewpointSpecificationModelText = createViewpointSpecificationModelNameComposite(
			composite, listener);
	viewpointNameText = createViewpointNameComposite(composite, listener);
	diagramNameText = createDiagramNameComposite(composite, listener);

	setControl(composite);
	setPageComplete(true);
}
 
Example 23
Project: neoscada   File: DateTimeDialog.java   Source Code and License 5 votes vote down vote up
@Override
protected Control createDialogArea ( final Composite parent )
{
    getShell ().setText ( "Time and date" );

    final Composite base = (Composite)super.createDialogArea ( parent );

    final Composite wrapper = new Composite ( base, SWT.NONE );
    wrapper.setLayout ( new GridLayout ( 2, false ) );
    wrapper.setLayoutData ( new GridData ( GridData.FILL_BOTH ) );

    final Label label = new Label ( wrapper, SWT.NONE );
    label.setText ( "Input:" );

    this.input = new Text ( wrapper, SWT.BORDER );

    this.input.addModifyListener ( new ModifyListener () {

        @Override
        public void modifyText ( final ModifyEvent e )
        {
            update ();
        }
    } );
    this.input.setLayoutData ( new GridData ( SWT.FILL, SWT.CENTER, true, false ) );

    this.resultControl = new Label ( wrapper, SWT.NONE );
    this.resultControl.setLayoutData ( new GridData ( SWT.FILL, SWT.CENTER, true, false, 2, 1 ) );

    if ( this.time != null )
    {
        this.input.setText ( String.format ( "%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS.%1$tL", this.time ) );
    }

    return base;
}
 
Example 24
Project: Hydrograph   File: JobRunPreferenceComposite.java   Source Code and License 5 votes vote down vote up
private void attachConsoleBufferValidator() {
	textWidget.addModifyListener(new ModifyListener() {
		
		@Override
		public void modifyText(ModifyEvent e) {
			
			String text = textWidget.getText();
			setPreferanceError(null);
			if(StringUtils.isBlank(text)){
				setPreferanceError(Messages.PREFERANCE_ERROR_EMPTY_CONSOLE_BUFFER_FIELD);
				return;
			}
			
			if(!isValidNumber(text)){
				setPreferanceError(Messages.PREFERANCE_ERROR_INVALID_CONSOLE_BUFFER_INPUT);
				return;
			}
			
			int value=Integer.parseInt(text);
			if(!isValidConsoleBufferSize(value)){
				setPreferanceError(Messages.PREFERANCE_ERROR_INVALID_CONSOLE_BUFFER_INPUT);
				return;
			}else{
				setPreferanceError(null);
			}
		}
	});
}
 
Example 25
Project: convertigo-eclipse   File: LearnScreenClassWizardPage2.java   Source Code and License 5 votes vote down vote up
/**
 * @see IDialogPage#createControl(Composite)
 */
public void createControl(Composite parent) {
	Composite container = new LearnScreenClassWizardComposite2(parent, SWT.NULL,
				new ModifyListener() {
					public void modifyText(ModifyEvent e) {
						dialogChanged();
					}
				}
				, newScreenClassName);
	initialize();
	setControl(container);
	dialogChanged();
}
 
Example 26
Project: OCCI-Studio   File: NewConfigurationWizard.java   Source Code and License 5 votes vote down vote up
@Override
protected WizardNewFileCreationPage createNewFilePage() {
	return new NewFilePage(getSelection(), fileExt) {
		@Override
		public void createControl(Composite parent) {
			super.createControl(parent);
			Composite area = (Composite) getControl();
			Composite container = new Composite(area, SWT.NONE);
			container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
			GridLayout layout = new GridLayout(2, false);
			container.setLayout(layout);
			Label lbtOcciServerUrl = new Label(container, SWT.NONE);
			lbtOcciServerUrl.setText(Messages.NewConfigurationWizard_OcciServerUrl);
			final Text txtOcciServerUrl = new Text(container, SWT.BORDER);
			txtOcciServerUrl.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
			txtOcciServerUrl.addModifyListener(new ModifyListener() {
				public void modifyText(ModifyEvent e) {
					occiServerUrl = txtOcciServerUrl.getText();
					setPageComplete(validatePage());
				}
			});
		}

		@Override
		protected boolean validatePage() {
			// TODO add error messages
			return super.validatePage() && !Strings.isNullOrEmpty(occiServerUrl);
		}
	};
}
 
Example 27
Project: convertigo-eclipse   File: ImportWizardPage1.java   Source Code and License 5 votes vote down vote up
/**
 * @see IDialogPage#createControl(Composite)
 */
public void createControl(Composite parent) {
	Composite container = new NewProjectWizardComposite1(parent, SWT.NULL, new ModifyListener() {
		public void modifyText(ModifyEvent e) {
			dialogChanged();
		}
	});
	initialize();
	setControl(container);
	dialogChanged();
}
 
Example 28
Project: convertigo-eclipse   File: NewProjectWizardPage5.java   Source Code and License 5 votes vote down vote up
/**
 * @see IDialogPage#createControl(Composite)
 */
public void createControl(Composite parent) {
	Composite container = new NewProjectWizardComposite5(parent, SWT.NULL,
			new ModifyListener() {
				public void modifyText(ModifyEvent e) {
					dialogChanged();
				}
			}, (NewProjectWizard) this.getWizard());
	initialize();
	setControl(container);
	dialogChanged();
}
 
Example 29
Project: convertigo-eclipse   File: ConfigureSAPConnectorPage.java   Source Code and License 5 votes vote down vote up
/**
 * @see IDialogPage#createControl(Composite)
 */
public void createControl(Composite parent) {
	Composite container = new ConfigureSAPConnectorComposite(parent, SWT.NULL,
			new ModifyListener() {
				public void modifyText(ModifyEvent e) {
					dialogChanged();
				}
			});
	initialize();
	setControl(container);
	dialogChanged();
}
 
Example 30
Project: convertigo-eclipse   File: NewProjectWizardPage2.java   Source Code and License 5 votes vote down vote up
/**
 * @see IDialogPage#createControl(Composite)
 */
public void createControl(Composite parent) {
	Composite container = new NewProjectWizardComposite2(parent, SWT.NULL,
			new ModifyListener() {
				public void modifyText(ModifyEvent e) {
					dialogChanged();
				}
			}, (NewProjectWizard) this.getWizard());
	initialize();
	setControl(container);
	dialogChanged();
}
 
Example 31
Project: convertigo-eclipse   File: NewProjectWizardPage3.java   Source Code and License 5 votes vote down vote up
/**
 * @see IDialogPage#createControl(Composite)
 */
public void createControl(Composite parent) {
	Composite container = new NewProjectWizardComposite3(parent, SWT.NULL,
			new ModifyListener() {
				public void modifyText(ModifyEvent e) {
					dialogChanged();
				}
			}, (NewProjectWizard) this.getWizard());
	initialize();
	setControl(container);
	dialogChanged();
}
 
Example 32
Project: convertigo-eclipse   File: NewProjectWizardComposite2.java   Source Code and License 5 votes vote down vote up
public NewProjectWizardComposite2(Composite parent, int style, ModifyListener ml, NewProjectWizard wizard) {
	super(parent, style);
	modifyListener = ml;
	wz = wizard;
	initialize();
	((NewProjectWizardComposite1) wz.page1.getControl()).getProjectName().addModifyListener(new ModifyListener() {
		public void modifyText(ModifyEvent e) {
			connectorName.setText(wz.page1.getProjectName() + "Connector");
		}
	});
}
 
Example 33
Project: convertigo-eclipse   File: NewProjectWizardPage1.java   Source Code and License 5 votes vote down vote up
/**
 * @see IDialogPage#createControl(Composite)
 */
public void createControl(Composite parent) {
	Composite container = new NewProjectWizardComposite1(parent, SWT.NULL, new ModifyListener() {
		public void modifyText(ModifyEvent e) {
			dialogChanged();
		}
	});
	initialize();
	setControl(container);
	dialogChanged();
}
 
Example 34
Project: Hydrograph   File: ELTFilePathWidget.java   Source Code and License 5 votes vote down vote up
@Override
public void addModifyListener(final Property property, final ArrayList<AbstractWidget> widgetList) {
	textBox.addModifyListener(new ModifyListener() {
		@Override
		public void modifyText(ModifyEvent e) {
			Utils.INSTANCE.addMouseMoveListener(textBox, cursor);
			showHideErrorSymbol(widgetList);
		}
	});
}
 
Example 35
Project: codelens-eclipse   File: CodeLensDemo.java   Source Code and License 5 votes vote down vote up
public static void main(String[] args) throws Exception {
	// create the widget's shell
	Shell shell = new Shell();
	shell.setLayout(new FillLayout());
	shell.setSize(500, 500);
	Display display = shell.getDisplay();

	Composite parent = new Composite(shell, SWT.NONE);
	parent.setLayout(new GridLayout(2, false));

	ITextViewer textViewer = new TextViewer(parent, SWT.V_SCROLL | SWT.BORDER);
	String delim = textViewer.getTextWidget().getLineDelimiter();
	textViewer.setDocument(new Document(delim + " class A" + delim + "new A" + delim + "new A" + delim + "class B"
			+ delim + "new B" + delim + "interface I" + delim + "class C implements I"));
	StyledText styledText = textViewer.getTextWidget();
	styledText.setLayoutData(new GridData(GridData.FILL_BOTH));

	CodeLensProviderRegistry registry = CodeLensProviderRegistry.getInstance();
	registry.register(CONTENT_TYPE_ID, new ClassReferencesCodeLensProvider());
	registry.register(CONTENT_TYPE_ID, new ClassImplementationsCodeLensProvider());

	CodeLensStrategy codelens = new CodeLensStrategy(new DefaultCodeLensContext(textViewer), false);
	codelens.addTarget(CONTENT_TYPE_ID).reconcile(null);

	styledText.addModifyListener(new ModifyListener() {

		@Override
		public void modifyText(ModifyEvent event) {
			codelens.reconcile(null);
		}
	});

	shell.open();
	while (!shell.isDisposed())
		if (!display.readAndDispatch())
			display.sleep();
}
 
Example 36
Project: gw4e.project   File: MavenTemplatePage.java   Source Code and License 5 votes vote down vote up
private void createGroupIdArea (Composite composite) {
	Label lblNewLabel = new Label(composite, SWT.NONE);
	lblNewLabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 4, 1));
	lblNewLabel.setText(MessageUtil.getString("mvn_group_id"));
	textGrpID = new Text(composite, SWT.BORDER);
	textGrpID.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 8, 1));
	textGrpID.addModifyListener(new ModifyListener() {
		@Override
		public void modifyText(ModifyEvent evt) {
			MavenTemplatePage.this.setGroupId(textGrpID.getText());
			validatePage();
		}
	});
	textGrpID.setText("com.company");
}
 
Example 37
Project: gw4e.project   File: MavenTemplatePage.java   Source Code and License 5 votes vote down vote up
private void createVersionIdArea (Composite composite) {
	Label lblNewLabel = new Label(composite, SWT.NONE);
	lblNewLabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 4, 1));
	lblNewLabel.setText(MessageUtil.getString("mvn_version_id"));
	textVersionID = new Text(composite, SWT.BORDER);
	textVersionID.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 8, 1));
	textVersionID.addModifyListener(new ModifyListener() {
		@Override
		public void modifyText(ModifyEvent evt) {
			MavenTemplatePage.this.setVersion(textVersionID.getText());
			validatePage();
		}
	});		
	textVersionID.setText("1.0-SNAPSHOT");
}
 
Example 38
Project: gw4e.project   File: MavenTemplatePage.java   Source Code and License 5 votes vote down vote up
private void createArtifactIdArea (Composite composite) {
	Label lblNewLabel = new Label(composite, SWT.NONE);
	lblNewLabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 4, 1));
	lblNewLabel.setText(MessageUtil.getString("mvn_artifact_id"));
	textArtifactID = new Text(composite, SWT.BORDER);
	textArtifactID.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 8, 1));
	textArtifactID.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 8, 1));
	textArtifactID.addModifyListener(new ModifyListener() {
		@Override
		public void modifyText(ModifyEvent evt) {
			MavenTemplatePage.this.setArtifactId(textArtifactID.getText());
			validatePage();
		}
	});	
}
 
Example 39
Project: gw4e.project   File: MavenTemplatePage.java   Source Code and License 5 votes vote down vote up
private void createNameArea (Composite composite) {
	Label lblNewLabel = new Label(composite, SWT.NONE);
	lblNewLabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 4, 1));
	lblNewLabel.setText(MessageUtil.getString("mvn_name"));
	textName = new Text(composite, SWT.BORDER);
	textName.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 8, 1));
	textName.addModifyListener(new ModifyListener() {
		@Override
		public void modifyText(ModifyEvent evt) {
			MavenTemplatePage.this.setName(textName.getText());
			validatePage();
		}
	});	
}
 
Example 40
Project: pgcodekeeper   File: MockDataPage.java   Source Code and License 5 votes vote down vote up
@Override
public void modifyText(ModifyEvent e) {
    IStructuredSelection sel = (IStructuredSelection) viewer.getSelection();
    if (!sel.isEmpty()) {
        PgData<?> c = (PgData<?>) sel.getFirstElement();
        try {
            String text = ((Text) e.widget).getText();
            setter.accept(c, text);
            setErrorMessage(null);
        } catch (Exception ex) {
            setErrorMessage(Messages.MockDataPage_invalid_value + ex.getLocalizedMessage());
        }
    }
}
 
Example 41
Project: pgcodekeeper   File: ManualDepciesGroup.java   Source Code and License 5 votes vote down vote up
@Override
public void modifyText(ModifyEvent e) {
    Entry<PgStatement, PgStatement> selection = getSelectionDepcy();
    btnAdd.setEnabled(
            selection.getKey() != null
            && selection.getValue() != null
            && !selection.getKey().compare(selection.getValue())
            && !depcies.contains(selection));
}
 
Example 42
Project: pgcodekeeper   File: ProjectProperties.java   Source Code and License 5 votes vote down vote up
@Override
protected Control createContents(Composite parent) {
    Composite panel = new Composite(parent, SWT.NONE);
    GridLayout layout = new GridLayout(2, false);
    layout.marginHeight = 0;
    layout.marginWidth = 0;
    panel.setLayout(layout);

    btnForceUnixNewlines = new Button(panel, SWT.CHECK);
    btnForceUnixNewlines.setText(Messages.ProjectProperties_force_unix_newlines);
    btnForceUnixNewlines.setLayoutData(new GridData(SWT.DEFAULT, SWT.DEFAULT, false, false, 2, 1));
    btnForceUnixNewlines.setSelection(prefs.getBoolean(PROJ_PREF.FORCE_UNIX_NEWLINES, true));

    Label label = new Label(panel, SWT.NONE);
    label.setText(Messages.projectProperties_timezone_for_all_db_connections);

    cmbTimezone = new Combo(panel, SWT.BORDER | SWT.DROP_DOWN);
    cmbTimezone.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    cmbTimezone.setItems(UIConsts.TIME_ZONES.toArray(new String[UIConsts.TIME_ZONES.size()]));
    String tz = prefs.get(PROJ_PREF.TIMEZONE, ApgdiffConsts.UTC);
    cmbTimezone.setText(tz);
    cmbTimezone.addModifyListener(new ModifyListener() {

        @Override
        public void modifyText(ModifyEvent e) {
            checkSwitchWarnLbl();
        }
    });

    lblWarn = new CLabel(panel, SWT.NONE);
    lblWarn.setImage(Activator.getEclipseImage(ISharedImages.IMG_OBJS_WARN_TSK));
    lblWarn.setText(Messages.ProjectProperties_change_projprefs_warn);
    GridData gd = new GridData(SWT.FILL, SWT.DEFAULT, false, false, 2, 1);
    gd.exclude = true;
    lblWarn.setLayoutData(gd);
    lblWarn.setVisible(false);

    return panel;
}
 
Example 43
Project: SWET   File: TableEditorEx.java   Source Code and License 5 votes vote down vote up
@Override
public void modifyText(ModifyEvent event) {
	CCombo combo = (CCombo) event.widget;
	int column = (int) combo.getData("column");
	String oldValue = ((TableItem) combo.getData("item")).getText(column);
	String newValue = combo.getText();
	logger.info(String.format("Updating %s = %s", oldValue, newValue));
	if (selectorFromSWD.containsValue(newValue)) {
		((TableItem) combo.getData("item")).setText(column, newValue);
	}
}
 
Example 44
Project: Hydrograph   File: WorksheetWidget.java   Source Code and License 5 votes vote down vote up
@Override
public void addModifyListener(Property property, ArrayList<AbstractWidget> widgetList) {
	this.widgetList = widgetList;
	textBox.addModifyListener(new ModifyListener() {
		@Override
		public void modifyText(ModifyEvent e) {
			if (StringUtils.isNotBlank(textBox.getText())) {
				isFieldCheckBox.setEnabled(true);
				 showHideErrorSymbol(widgetList);
			}
			Utils.INSTANCE.addMouseMoveListener(textBox, cursor);
			propDialogButtonBar.enableApplyButton(true);
		}
	});
}
 
Example 45
Project: Hydrograph   File: MultiParameterFileDialog.java   Source Code and License 5 votes vote down vote up
private void createSearchBox(Composite composite_5) {
	Composite composite_6 = new Composite(composite_5, SWT.NONE);
	composite_6.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false,
			1, 1));
	composite_6.setLayout(new GridLayout(2, false));

	Label lblSearch = new Label(composite_6, SWT.NONE);
	lblSearch.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false,
			false, 1, 1));
	lblSearch.setText("Search");

	final Text text_1 = new Text(composite_6, SWT.BORDER);
	text_1.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
	text_1.addModifyListener(new ModifyListener() {

		@Override
		public void modifyText(ModifyEvent e) {
			if (text_1.getText().isEmpty()) {
				populateParameterSearchBox();
			} else {
				searchParameter(text_1.getText().toLowerCase());
			}

			parameterSearchTableViewer.refresh();
		}
	});
}
 
Example 46
Project: Hydrograph   File: EvaluateDialog.java   Source Code and License 5 votes vote down vote up
private void createSearchTextBox(Composite fieldTableComposite) {
	searchTextBox = new Text(fieldTableComposite, SWT.BORDER);
	searchTextBox.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
	searchTextBox.setForeground(CustomColorRegistry.INSTANCE.getColorFromRegistry( 128,128,128));
	searchTextBox.setText(Constants.DEFAULT_SEARCH_TEXT);
	ExpressionEditorUtil.INSTANCE.addFocusListenerToSearchTextBox(searchTextBox);
	searchTextBox.addModifyListener(new ModifyListener() {
		
		@Override
		public void modifyText(ModifyEvent e) {
			evalDialogFieldTable.getTableViewer().resetFilters();
			if(!StringUtils.equals(Constants.DEFAULT_SEARCH_TEXT, searchTextBox.getText())){
				ViewerFilter filter=new ViewerFilter() {
					@Override
					public boolean select(Viewer viewer, Object parentElement, Object element) {
						if(element!=null && element instanceof FieldNameAndValue){
							FieldNameAndValue fieldNameAndValue=(FieldNameAndValue) element;
							if(StringUtils.containsIgnoreCase(fieldNameAndValue.getFieldName(),searchTextBox.getText()) ){
								return true;
							}
						}
						return false;
					}
				};
				ViewerFilter[] filters={filter};
				evalDialogFieldTable.getTableViewer().setFilters(filters);
			}
		}
	});
}
 
Example 47
Project: Hydrograph   File: FTPProtocolWidget.java   Source Code and License 5 votes vote down vote up
private ModifyListener attachTextModifyListner(final ArrayList<AbstractWidget> widgetList) {
	return new ModifyListener() {
		@Override
		public void modifyText(ModifyEvent event) {
			Utils.INSTANCE.addMouseMoveListener(hostText, cursor);
			Utils.INSTANCE.addMouseMoveListener(portText, cursor);
			showHideErrorSymbol(widgetList);
		}
	};
}
 
Example 48
Project: Hydrograph   File: FTPAuthenticEditorDialog.java   Source Code and License 5 votes vote down vote up
private void addModifyListener(Text text){
	if(text != null && !text.isDisposed()){
		text.addModifyListener(new ModifyListener() {
			@Override
			public void modifyText(ModifyEvent e) {
				Utils.INSTANCE.addMouseMoveListener(text, cursor);	
			}
		});
	}
}
 
Example 49
Project: Hydrograph   File: FTPOperationConfigDialog.java   Source Code and License 5 votes vote down vote up
private void addModifyListener(Text text){
	if(text != null && !text.isDisposed()){
		text.addModifyListener(new ModifyListener() {
			@Override
			public void modifyText(ModifyEvent e) {
				Utils.INSTANCE.addMouseMoveListener(text, cursor);	
			}
		});
	}
}
 
Example 50
Project: Hydrograph   File: RunComponentWidget.java   Source Code and License 5 votes vote down vote up
@Override
public void attachToPropertySubGroup(AbstractELTContainerWidget container) {
	ELTDefaultSubgroupComposite defaultSubgroupComposite = new ELTDefaultSubgroupComposite(
			container.getContainerControl());
	defaultSubgroupComposite.createContainerWidget();
	
	AbstractELTWidget eltDefaultLable = new ELTDefaultLable(Messages.EXECUTION_COMMAND);
	defaultSubgroupComposite.attachWidget(eltDefaultLable);

	styledText=new StyledText(defaultSubgroupComposite.getContainerControl(), SWT.MULTI | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
	GridData gridData=new GridData(SWT.FILL, SWT.FILL, true, true);
	gridData.heightHint=80;
	styledText.setLayoutData(gridData);
	
	txtDecorator = WidgetUtility.addDecorator(styledText, Messages.bind(Messages.EMPTY_FIELD, Messages.EXECUTION_COMMAND));
	
	ListenerHelper helper = new ListenerHelper();
	helper.put(HelperType.CONTROL_DECORATION, txtDecorator);
	
	populateWidget();
	
	styledText.addModifyListener(new ModifyListener() {
		@Override
		public void modifyText(ModifyEvent e) {
			if(StringUtils.isNotBlank(styledText.getText())){
				txtDecorator.hide();
			}else{
				txtDecorator.show();
			}
			showHideErrorSymbol(widgets);
			propertyDialogButtonBar.enableApplyButton(true);
		}
	});
}
 
Example 51
Project: Hydrograph   File: FilterOperationClassUtility.java   Source Code and License 5 votes vote down vote up
private void addModifyListenerToFileNameTextBox(Text fileName) {
	fileName.addModifyListener(new ModifyListener() {
		@Override
		public void modifyText(ModifyEvent e) {
			Text classNameTextBox=(Text)e.widget;
			openBtn.setEnabled(StringUtils.isNotBlank(classNameTextBox.getText())&&!btnCheckButton.getSelection());
		}
	});
}
 
Example 52
Project: Hydrograph   File: OutputAdditionalParametersDialog.java   Source Code and License 5 votes vote down vote up
private void addModifyListener(Text text){
	text.addModifyListener(new ModifyListener() {
		@Override
		public void modifyText(ModifyEvent e) {
			Utils.INSTANCE.addMouseMoveListener(text, cursor);	
			
		}
	});
}
 
Example 53
Project: Hydrograph   File: InputAdditionalParametersDialog.java   Source Code and License 5 votes vote down vote up
private void addModifyListener(Text text){
	text.addModifyListener(new ModifyListener() {
		@Override
		public void modifyText(ModifyEvent e) {
			Utils.INSTANCE.addMouseMoveListener(text, cursor);	
		}
	});
}
 
Example 54
Project: Hydrograph   File: ModifyListenerForDBComp.java   Source Code and License 5 votes vote down vote up
@Override
public void modifyText(ModifyEvent event) {
	if(event.getSource() == lowerBoundText){
		validate(lowerBoundText, upperBoundText, 
				lowerBoundTextDecorator, upperBoundTextDecorator, lowerBoundText.getText(), upperBoundText.getText());
	}else{
		validate(upperBoundText, lowerBoundText, 
				upperBoundTextDecorator, lowerBoundTextDecorator, lowerBoundText.getText(), upperBoundText.getText());
	}
}
 
Example 55
Project: Hydrograph   File: OutputRecordCountWidget.java   Source Code and License 5 votes vote down vote up
private void addModifyListenerToRecordCountTextBox() 
{
	outputRecordCoundText.addModifyListener(new ModifyListener() {
		
		@Override
		public void modifyText(ModifyEvent e) {
		 Text textBox=(Text)e.widget;
		 transformMapping.getExpressionEditorData().setExpression(textBox.getText());
           propertyDialogButtonBar.enableApplyButton(true);				
		}
	});
	
}
 
Example 56
Project: Hydrograph   File: JDBCDriverClassWidget.java   Source Code and License 5 votes vote down vote up
@Override
public void addModifyListener(Property property,final ArrayList<AbstractWidget> widgetList) {
       jdbcDriverClassTextBox.addModifyListener(new ModifyListener() {
			
			@Override
			public void modifyText(ModifyEvent e) {
			 Utils.INSTANCE.addMouseMoveListener(jdbcDriverClassTextBox, cursor);
			 showHideErrorSymbol(widgetList);
			}
		});
}
 
Example 57
Project: Hydrograph   File: TransformDialog.java   Source Code and License 5 votes vote down vote up
private void attachModifyListenerToIdTextBox(
		final MappingSheetRow mappingSheetRow,Text operationIDTextBox) {
	operationIDTextBox.addModifyListener(new ModifyListener() {

		@Override
		public void modifyText(ModifyEvent e) {
			Text textBox = (Text) e.widget;

			ExpandItem expandItem = (ExpandItem) textBox.getData();

			expandItem.setText(textBox.getText());
			mappingSheetRow.setOperationID(textBox.getText());
		}
	});
}
 
Example 58
Project: Hydrograph   File: ExpresssionOperationImportExportComposite.java   Source Code and License 5 votes vote down vote up
private void addModifyListnerToExternalPathTextBox(ExternalWidgetData externalWidgetData) {
	txtExternalPath.addModifyListener(new ModifyListener() {
		
		@Override
		public void modifyText(ModifyEvent e) {
			onPathModify(externalWidgetData);
		}
	});
}
 
Example 59
Project: Hydrograph   File: ELTBrowseWorkspaceWidget.java   Source Code and License 5 votes vote down vote up
@Override
public void addModifyListener(final Property property, final ArrayList<AbstractWidget> widgetList) {
	subJobPath.addModifyListener(new ModifyListener() {
		@Override
		public void modifyText(ModifyEvent e) {
			showHideErrorSymbol(widgetList);
		}
	});
}
 
Example 60
Project: smarthome-cep-demonstrator   File: SmarthomeModelWizard.java   Source Code and License 4 votes vote down vote up
public void modifyText(ModifyEvent e) {
	setPageComplete(validatePage());
}