當前位置: 首頁>>代碼示例>>Java>>正文


Java ModifyEvent類代碼示例

本文整理匯總了Java中org.eclipse.swt.events.ModifyEvent的典型用法代碼示例。如果您正苦於以下問題:Java ModifyEvent類的具體用法?Java ModifyEvent怎麽用?Java ModifyEvent使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ModifyEvent類屬於org.eclipse.swt.events包,在下文中一共展示了ModifyEvent類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createVersionArea

import org.eclipse.swt.events.ModifyEvent; //導入依賴的package包/類
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);
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:18,代碼來源:InstallNpmDependencyDialog.java

示例2: createNameArea

import org.eclipse.swt.events.ModifyEvent; //導入依賴的package包/類
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());
		}
	});
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:17,代碼來源:InstallNpmDependencyDialog.java

示例3: getFieldNameModifyListener

import org.eclipse.swt.events.ModifyEvent; //導入依賴的package包/類
/**
 * 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;
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:46,代碼來源:FilterHelper.java

示例4: createContent

import org.eclipse.swt.events.ModifyEvent; //導入依賴的package包/類
@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);
        }
    });

}
 
開發者ID:baloise,項目名稱:eZooKeeper,代碼行數:25,代碼來源:ZnodeModelTextDataEditor.java

示例5: createDebugJSonComponent

import org.eclipse.swt.events.ModifyEvent; //導入依賴的package包/類
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();
		}
	});

}
 
開發者ID:tracymiranda,項目名稱:dsp4e,代碼行數:21,代碼來源:DSPMainTab.java

示例6: createXPathEvaluator

import org.eclipse.swt.events.ModifyEvent; //導入依賴的package包/類
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
		}
	});
}
 
開發者ID:convertigo,項目名稱:convertigo-eclipse,代碼行數:23,代碼來源:SourcePickerHelper.java

示例7: createDialogArea

import org.eclipse.swt.events.ModifyEvent; //導入依賴的package包/類
@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;
}
 
開發者ID:convertigo,項目名稱:convertigo-eclipse,代碼行數:27,代碼來源:LimitCharsLogsPreferenceDialog.java

示例8: createControl

import org.eclipse.swt.events.ModifyEvent; //導入依賴的package包/類
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);
}
 
開發者ID:convertigo,項目名稱:convertigo-eclipse,代碼行數:22,代碼來源:UrlMappingWizardPage.java

示例9: createSimpleIdTextBox

import org.eclipse.swt.events.ModifyEvent; //導入依賴的package包/類
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();
		}
	});

}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:21,代碼來源:OperationComposite.java

示例10: createStartElementSection

import org.eclipse.swt.events.ModifyEvent; //導入依賴的package包/類
/**
 * 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);
}
 
開發者ID:gw4e,項目名稱:gw4e.project,代碼行數:26,代碼來源:GW4ELaunchConfigurationTab.java

示例11: createProjectSection

import org.eclipse.swt.events.ModifyEvent; //導入依賴的package包/類
/**
 * 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);

}
 
開發者ID:gw4e,項目名稱:gw4e.project,代碼行數:25,代碼來源:GW4ELaunchConfigurationTab.java

示例12: createControl

import org.eclipse.swt.events.ModifyEvent; //導入依賴的package包/類
/**
 * 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());
}
 
開發者ID:eclipse,項目名稱:gemoc-studio,代碼行數:29,代碼來源:StringOption.java

示例13: createSimpleIdTextBox

import org.eclipse.swt.events.ModifyEvent; //導入依賴的package包/類
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();
		}
	});

}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:21,代碼來源:ExpressionComposite.java

示例14: addListnersToSearchTextBox

import org.eclipse.swt.events.ModifyEvent; //導入依賴的package包/類
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());
			}
		}
			
		}
	});
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:23,代碼來源:AvailableFieldsComposite.java

示例15: addListnersToSearchTextBox

import org.eclipse.swt.events.ModifyEvent; //導入依賴的package包/類
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);
		}
	});
	
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:24,代碼來源:CategoriesUpperComposite.java


注:本文中的org.eclipse.swt.events.ModifyEvent類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。