当前位置: 首页>>代码示例>>Java>>正文


Java Text.addModifyListener方法代码示例

本文整理汇总了Java中org.eclipse.swt.widgets.Text.addModifyListener方法的典型用法代码示例。如果您正苦于以下问题:Java Text.addModifyListener方法的具体用法?Java Text.addModifyListener怎么用?Java Text.addModifyListener使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.swt.widgets.Text的用法示例。


在下文中一共展示了Text.addModifyListener方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createStartElementSection

import org.eclipse.swt.widgets.Text; //导入方法依赖的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

示例2: addModifyListenerToAccumulator

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
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();
		}
	});
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:17,代码来源:TransformDialog.java

示例3: createDebugJSonComponent

import org.eclipse.swt.widgets.Text; //导入方法依赖的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

示例4: initialize

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
/**
 * This method initializes this
 * 
 */
private void initialize() {
       GridData gridData2 = new org.eclipse.swt.layout.GridData();
       gridData2.horizontalSpan = 3;
       label1 = new Label(this, SWT.NONE);
       label1.setText("A connector establishes the connection between a data source and Convertigo.\nThe connector is used by Convertigo to collect the data that will be formatted as an XML document.\n\nYou will be able later on to add new connectors to your project.\n\nPlease choose a name for this connector.\n");
       label1.setLayoutData(gridData2);
       GridData gridData1 = new org.eclipse.swt.layout.GridData();
       gridData1.grabExcessHorizontalSpace = true;
       gridData1.verticalAlignment = org.eclipse.swt.layout.GridData.CENTER;
       gridData1.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
       GridData gridData = new org.eclipse.swt.layout.GridData();
       gridData.grabExcessHorizontalSpace = false;
       gridData.horizontalAlignment = org.eclipse.swt.layout.GridData.BEGINNING;
       gridData.verticalAlignment = org.eclipse.swt.layout.GridData.CENTER;
       gridData.grabExcessVerticalSpace = false;
       label = new Label(this, SWT.NONE);
       label.setText("Connector name");
       label.setLayoutData(gridData);
       connectorName = new Text(this, SWT.BORDER);
       connectorName.setLayoutData(gridData1);
       connectorName.addModifyListener(modifyListener);
       GridLayout gridLayout = new GridLayout();
       gridLayout.numColumns = 2;
       this.setLayout(gridLayout);
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:30,代码来源:NewProjectWizardComposite2.java

示例5: createPageControl

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
/**
 * 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;
}
 
开发者ID:OrienteerBAP,项目名称:orientdb-oda-birt,代码行数:32,代码来源:CustomDataSetWizardPage.java

示例6: attachModifyListenerToIdTextBox

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
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());
		}
	});
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:16,代码来源:TransformDialog.java

示例7: initIdTableEditor

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
private void initIdTableEditor(TableItem item) {

        Control oldEditor = _IdTableEditor.getEditor();
        if (oldEditor != null) {
            oldEditor.dispose();
        }

        if (item == null) {
            return;
        }

        Table table = getTable();

        Text newEditor = new Text(table, SWT.SINGLE);

        newEditor.setText(item.getText(TABLE_COLUMN_ID));
        newEditor.addModifyListener(new ModifyListener() {

            @Override
            public void modifyText(ModifyEvent e) {
                Text editor = (Text) _IdTableEditor.getEditor();
                _IdTableEditor.getItem().setText(TABLE_COLUMN_ID, editor.getText());

                fireOrchestrationChange();
            }
        });

        _IdTableEditor.setEditor(newEditor, item, TABLE_COLUMN_ID);
    }
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:30,代码来源:ZnodeAclComposite.java

示例8: addModifyListener

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
private void addModifyListener(Text text){
	text.addModifyListener(new ModifyListener() {
		@Override
		public void modifyText(ModifyEvent e) {
			Utils.INSTANCE.addMouseMoveListener(text, cursor);	
			
		}
	});
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:10,代码来源:OutputAdditionalParametersDialog.java

示例9: addModifyListenerToFileNameTextBox

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
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());
		}
	});
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:10,代码来源:FilterOperationClassUtility.java

示例10: createNameArea

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
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();
		}
	});	
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:15,代码来源:MavenTemplatePage.java

示例11: addModifyListener

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
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);	
			}
		});
	}
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:11,代码来源:FTPOperationConfigDialog.java

示例12: initialize

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
/**
 * This method initializes this
 * 
 */
private void initialize() {
       GridData gridData2 = new org.eclipse.swt.layout.GridData();
       gridData2.horizontalSpan = 2;
       label1 = new Label(this, SWT.NONE);
       label1.setText("The chosen project template includes a ''screen type'' connector. \n\nThis connector needs a destination address as an hostname (or IP adress) and optionally a port.\n ");
       label1.setLayoutData(gridData2);
       GridData gridData1 = new org.eclipse.swt.layout.GridData();
       gridData1.grabExcessHorizontalSpace = true;
       gridData1.verticalAlignment = org.eclipse.swt.layout.GridData.CENTER;
       gridData1.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
       GridData gridData = new org.eclipse.swt.layout.GridData();
       gridData.grabExcessHorizontalSpace = false;
       gridData.horizontalAlignment = org.eclipse.swt.layout.GridData.BEGINNING;
       gridData.verticalAlignment = org.eclipse.swt.layout.GridData.CENTER;
       gridData.grabExcessVerticalSpace = false;
       label = new Label(this, SWT.NONE);
       label.setText("Server address");
       label.setLayoutData(gridData);
       server = new Text(this, SWT.BORDER);
       server.setLayoutData(gridData1);
       label5 = new Label(this, SWT.NONE);
       label5.setText("Port");
       port = new Text(this, SWT.BORDER);
       server.addModifyListener(modifyListener);
       port.addModifyListener(modifyListener);
       GridLayout gridLayout = new GridLayout();
       gridLayout.numColumns = 2;
       this.setLayout(gridLayout);
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:34,代码来源:NewProjectWizardComposite3.java

示例13: createVersionIdArea

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
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");
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:16,代码来源:MavenTemplatePage.java

示例14: createNewFilePage

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
@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);
		}
	};
}
 
开发者ID:occiware,项目名称:OCCI-Studio,代码行数:31,代码来源:NewConfigurationWizard.java

示例15: createNewMode

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
private void createNewMode() {
	btnCreateNewRadioButton = new Button(this, SWT.RADIO);
	btnCreateNewRadioButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 12, 1));
	btnCreateNewRadioButton.setText(MessageUtil.getString("standalone_mode"));
	btnCreateNewRadioButton.setSelection(false);
	btnCreateNewRadioButton.addListener(SWT.Selection, new Listener() {
		public void handleEvent(Event e) {
			switch (e.type) {
			case SWT.Selection:
				updateUI();
				break;
			}
		}
	});
	btnCreateNewRadioButton.setData(GW4E_CONVERSION_WIDGET_ID, GW4E_NEWCLASS_CHECKBOX);

	Composite composite = new Composite(this, SWT.NONE);
	composite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 12, 1));
	composite.setLayout(new GridLayout(12, false));

	lblNewClassnameLabel = new Label(composite, SWT.NONE);
	lblNewClassnameLabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 4, 1));
	lblNewClassnameLabel.setText("Class name");
	lblNewClassnameLabel.setEnabled(false);

	newClassnameText = new Text(composite, SWT.BORDER);
	newClassnameText.setEnabled(false);
	newClassnameText.addModifyListener(new ModifyListener() {
		public void modifyText(ModifyEvent event) {
			listener.handleEvent(null);
		}
	});
	newClassnameText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 8, 1));
	newClassnameText.setEnabled(false);
	newClassnameText.setData(GW4E_CONVERSION_WIDGET_ID, GW4E_NEWCLASS_TEXT);
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:37,代码来源:GeneratorChoiceComposite.java


注:本文中的org.eclipse.swt.widgets.Text.addModifyListener方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。