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


Java Text.setEditable方法代码示例

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


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

示例1: createAttributeText

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
private Text createAttributeText ( final String attribute )
{
    final Text t = new Text ( this, SWT.BORDER );
    final Fields field = Fields.byField ( attribute );
    if ( field == null )
    {
        t.setEditable ( true );
        t.setMessage ( Messages.custom_field );
    }
    else
    {
        t.setEditable ( false );
        t.setText ( field.getName () );
    }
    t.addKeyListener ( new KeyAdapter () {
        @Override
        public void keyReleased ( final KeyEvent e )
        {
            AssertionComposite.this.orCondition.updateFilter ();
        };
    } );
    final RowData rowData = new RowData ();
    rowData.width = 132;
    t.setLayoutData ( rowData );
    return t;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:27,代码来源:FilterAdvancedComposite.java

示例2: createContainerControls

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
@Override
protected void createContainerControls(Composite parent, int nColumns) {

	super.createContainerControls(parent, nColumns);
	Text text = (Text) parent.getChildren()[1];
	text.setEditable(false);
	IEditorInput editorInput = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
			.getActiveEditor().getEditorInput();
	if (editorInput instanceof IFileEditorInput) {
		IFileEditorInput fileEditorInput = (IFileEditorInput) editorInput;
		IProject project = fileEditorInput.getFile().getProject();
		if (project != null) {
			IFolder srcFolder = project.getFolder("src/main/java");
			if (srcFolder != null && srcFolder.exists()) {
				text.setText(project.getName() + "/" + srcFolder.getProjectRelativePath().toString());
			}
		}
		Button button = (Button) parent.getChildren()[2];
		button.setEnabled(false);
	}
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:22,代码来源:CustomizeNewClassWizardPage.java

示例3: createLanguageLayout

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
/***
 * Create the Field where user enters the language used to execute
 * 
 * @param parent container composite
 * @param font used font
 * @return the created composite containing the fields
 */
public Composite createLanguageLayout(Composite parent, Font font) {
	// Language
	createTextLabelLayout(parent, "Melange languages");
	_languageCombo = new Combo(parent, SWT.NONE);
	_languageCombo.setLayoutData(createStandardLayout());

	List<String> languagesNames = MelangeHelper.getAllLanguages();
	String[] empty = {};
	_languageCombo.setItems(languagesNames.toArray(empty));
	_languageCombo.addSelectionListener(new SelectionAdapter() {
		@Override
		public void widgetSelected(SelectionEvent e) {
			//String selection = _languageCombo.getText();
			//List<String> modelTypeNames = MelangeHelper.getModelTypes(selection);
			updateLaunchConfigurationDialog();
		}
	});
	createTextLabelLayout(parent, "");

	createTextLabelLayout(parent, "Melange resource adapter query");
	_melangeQueryText = new Text(parent, SWT.SINGLE | SWT.BORDER);
	_melangeQueryText.setLayoutData(createStandardLayout());
	_melangeQueryText.setFont(font);
	_melangeQueryText.setEditable(false);
	createTextLabelLayout(parent, "");
	
	return parent;
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:36,代码来源:LaunchConfigurationMainTab.java

示例4: createControl

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
public void createControl(Composite parent) {
	container = new Composite(parent, SWT.NONE);
	container.setLayout(new GridLayout(1, false));
	
	summaryText = new Text(container, SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);
	summaryText.setEditable(false);
	summaryText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));

	setControl(container);
	setPageComplete(false);
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:12,代码来源:SummaryPage.java

示例5: initialize

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
protected void initialize() {
	GridData gridData = new org.eclipse.swt.layout.GridData();
	gridData.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
	gridData.grabExcessHorizontalSpace = true;
	gridData.grabExcessVerticalSpace = true;
	gridData.verticalAlignment = org.eclipse.swt.layout.GridData.FILL;
	cicsData = new Text(this, SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
	cicsData.setEditable(false);
	cicsData.setBackground(new Color(null,253,253,244));
	cicsData.setFont(new Font(null,"Courier New",10,1));
	cicsData.setLayoutData(gridData);
	cicsData.setText("");
	this.setLayout(new GridLayout());
	setSize(new Point(300, 200));
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:16,代码来源:CicsConnectorComposite.java

示例6: createrequirementSection

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
/**
 * Create the Text that will hold the Requirement coming from the graphml file
 * @param panel
 * @param file
 */
protected void createrequirementSection(Composite panel, IFile file) {
	Label label = createLabel(panel, MessageUtil.getString("Requirements")); //$NON-NLS-1$
	Text t = new Text(panel, SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);
	t.setData(GW4E_FILE_REQUIREMENT_TEXT_ID,GW4E_FILE_REQUIREMENT_TEXT_ID );
	Set<String> requirements = null;
	String reqMessage = "";
	try {
		requirements = GraphWalkerFacade.getRequirement(file);
		String newline = System.getProperty("line.separator");
		if (requirements == null || requirements.size() == 0) {
			reqMessage = MessageUtil.getString("NoRequirements");
		} else {
			StringBuffer sb = new StringBuffer();

			for (String req : requirements) {
				sb.append(req).append(newline);
			}
			t.setText(sb.toString());
			reqMessage = requirements.size() + " " + MessageUtil.getString("requirementsfound");
		}
	} catch (Exception e) {
		ResourceManager.logException(e);
		t.setText(e.getMessage());
	}
	t.setEditable(false);
	GridDataFactory.fillDefaults().grab(true, true).hint(150, 150).applyTo(t);

	createLabel(panel, MessageUtil.getString("requirementMessage")); //$NON-NLS-1$
	label = createLabel(panel, reqMessage);
	fillExcessHorizontalSpace(label);
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:37,代码来源:GraphModelPropertyPage.java

示例7: createMethodSection

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
/**
 * Create the Text that will hold the Methods coming from the graphml file
 * 
 * @param panel
 * @param file
 */
protected void createMethodSection(Composite panel, IFile file) {
	Label label = createLabel(panel, MessageUtil.getString("Methods")); //$NON-NLS-1$
	Text t = new Text(panel, SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);
	t.setData(GraphModelPropertyPage.GW4E_FILE_METHODS_TEXT_ID, GW4E_FILE_METHODS_TEXT_ID);
	Set<String> methods = null;
	String reqMessage = "";
	try {
		methods = GraphWalkerFacade.getMethods(file);
		String newline = System.getProperty("line.separator");
		if (methods == null || methods.size() == 0) {
			reqMessage = MessageUtil.getString("NoMethods");
		} else {
			StringBuffer sb = new StringBuffer();

			for (String meth : methods) {
				sb.append(meth).append(newline);
			}
			t.setText(sb.toString());
			reqMessage = methods.size() + " " + MessageUtil.getString("methodsfound");
		}
	} catch (Exception e) {
		ResourceManager.logException(e);
		t.setText(e.getMessage());
	}
	t.setEditable(false);
	GridDataFactory.fillDefaults().grab(true, true).hint(150, 150).applyTo(t);

	createLabel(panel, MessageUtil.getString("methodMessage")); //$NON-NLS-1$
	label = createLabel(panel, reqMessage);
	fillExcessHorizontalSpace(label);
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:38,代码来源:GraphModelPropertyPage.java

示例8: addHeader

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
public Composite addHeader(){
	Composite composite = new Composite(container, SWT.NONE);
	GridLayout gl_composite = new GridLayout(textGridRow.getNumberOfColumn() + 1, false);
	gl_composite.horizontalSpacing = 7;
	gl_composite.marginWidth = 1;
	gl_composite.marginHeight = 0;
	gl_composite.verticalSpacing = 1;
	composite.setLayout(gl_composite);
		
	Button rowSelection = new Button(composite, SWT.CHECK);
	
	Map<Integer, TextGridColumnLayout> columns = textGridRow.getTextGridColumns();
	for(int columnNumber:columns.keySet()){
		Text text = new Text(composite, SWT.BORDER);
		if(!columns.get(columnNumber).grabHorizantalAccessSpace()){
			GridData gd_text = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
			gd_text.widthHint = columns.get(columnNumber).getColumnWidth();
			text.setLayoutData(gd_text);
			
			text.setEditable(false);
			text.setForeground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
			text.setBackground(SWTResourceManager.getColor(SWT.COLOR_LIST_SELECTION));
		}else{
			text.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
			text.setBounds(0, 0, 76, 21);
			text.setFocus();
			
			text.setEditable(false);
			text.setForeground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
			text.setBackground(SWTResourceManager.getColor(SWT.COLOR_LIST_SELECTION));				
		}
		

		if(rowData!=null)
			text.setText(rowData.get(columnNumber));
	}
	
	return composite;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:40,代码来源:TextGridRowBuilder.java

示例9: addRaw

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
public Composite addRaw(){
	Composite composite = new Composite(container, SWT.NONE);
	GridLayout gl_composite = new GridLayout(textGridRow.getNumberOfColumn() + 1, false);
	gl_composite.horizontalSpacing = 7;
	gl_composite.marginWidth = 1;
	gl_composite.marginHeight = 0;
	gl_composite.verticalSpacing = 1;
	composite.setLayout(gl_composite);
		
	Button rowSelection = new Button(composite, SWT.CHECK);
	rowSelection.setEnabled(enabled);
	
	Map<Integer, TextGridColumnLayout> columns = textGridRow.getTextGridColumns();
	for(int columnNumber:columns.keySet()){
		Text text = new Text(composite, SWT.BORDER);
		if(!columns.get(columnNumber).grabHorizantalAccessSpace()){
			GridData gd_text = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
			gd_text.widthHint = columns.get(columnNumber).getColumnWidth();
			text.setLayoutData(gd_text);
			
			text.setEditable(columns.get(columnNumber).isEditable());
			text.setEnabled(columns.get(columnNumber).isEnabled());
		}else{
			text.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
			text.setBounds(0, 0, 76, 21);
			text.setFocus();
			
			text.setEditable(columns.get(columnNumber).isEditable());
			text.setEnabled(columns.get(columnNumber).isEnabled());
		}
		
		if(rowData!=null)
			text.setText(rowData.get(columnNumber));
	}
	
	return composite;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:38,代码来源:TextGridRowBuilder.java

示例10: textBoxWidget

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
public Text textBoxWidget(Composite parent, int style, int[] bounds,
		String text, boolean value) {
	Text textWidget = new Text(parent, style);
	textWidget.setBounds(bounds[0], bounds[1], bounds[2], bounds[3]);
	textWidget.setText(text);
	textWidget.setEditable(value);

	return textWidget;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:10,代码来源:ELTSWTWidgets.java

示例11: textBoxWidget

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
public Text textBoxWidget(Composite parent, int[] bounds, String textValue, boolean value) {
	Text text = new Text(parent, SWT.BORDER | SWT.READ_ONLY | SWT.LEFT);
	text.setBounds(bounds[0], bounds[1], bounds[2], bounds[3]);
	text.setText(textValue);
	text.setEditable(value);

	return text;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:9,代码来源:ELTLookupConfigGrid.java

示例12: createExpressionEditingTextBox

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
private void createExpressionEditingTextBox(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);

	logicTextBox = new Text(composite, SWT.BORDER);
	logicTextBox.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
	logicTextBox.setEditable(false);
	logicTextBox.setText(operationDataStructure.getQualifiedOperationClassName());

	Button openEditorButton = new Button(composite, SWT.NONE);
	openEditorButton.setText("...");
	openEditorButton.addSelectionListener(new SelectionAdapter() {
		@Override
		public void widgetSelected(SelectionEvent e) {
			ELTOperationClassDialog eltOperationClassDialog = new ELTOperationClassDialog(
					Display.getCurrent().getActiveShell(), dialog.getPropertyDialogButtonBar(),
					createDSForClassWindow(), dialog.getWidgetConfig(), dialog.getComponent().getComponentName());
			eltOperationClassDialog.open();
			updateOperationDS(eltOperationClassDialog);
			if (eltOperationClassDialog.isYesPressed()) {
				dialog.pressOK();
			} else if (eltOperationClassDialog.isNoPressed()) {
				dialog.pressCancel();
			}
			dialog.refreshErrorLogs();
		}

	});

}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:34,代码来源:OperationComposite.java

示例13: createExpressionEditingTextBox

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
private void createExpressionEditingTextBox(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);

	logicTextBox = new Text(composite, SWT.BORDER);
	logicTextBox.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
	logicTextBox.setEditable(false);
	logicTextBox.setText(expressionDataStructure.getExpressionEditorData().getExpression());

	Button openEditorButton = new Button(composite, SWT.NONE);
	openEditorButton.setText("...");
	openEditorButton.addSelectionListener(new SelectionAdapter() {
		@Override
		public void widgetSelected(SelectionEvent e) {
			ExpressionEditorData expressionEditorData = expressionDataStructure.getExpressionEditorData();
			expressionEditorData.getSelectedInputFieldsForExpression().clear();
			expressionEditorData.getSelectedInputFieldsForExpression().putAll(FieldDataTypeMap.INSTANCE
					.createFieldDataTypeMap(expressionDataStructure.getInputFields(), dialog.getSchemaFields()));
			LaunchExpressionEditor launchExpressionEditor = new LaunchExpressionEditor();
			String oldExpression = expressionEditorData.getExpression();
			launchExpressionEditor.launchExpressionEditor(expressionEditorData, dialog.getSchemaFields(),
					dialog.getComponent().getComponentLabel().getLabelContents());
			if (!StringUtils.equals(expressionEditorData.getExpression(), oldExpression)) {
				dialog.getPropertyDialogButtonBar().enableApplyButton(true);
			}
			logicTextBox.setText(expressionEditorData.getExpression());
			dialog.refreshErrorLogs();
		}
	});

}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:35,代码来源:ExpressionComposite.java

示例14: createPageNumberDisplay

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
private void createPageNumberDisplay(Composite composite_3) {
	Text pageNumberDisplayTextBox = new Text(composite_3, SWT.BORDER | SWT.CENTER);
	pageNumberDisplayTextBox.setEnabled(false);
	pageNumberDisplayTextBox.setEditable(false);
	GridData gd_text = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);
	gd_text.widthHint = 178;
	pageNumberDisplayTextBox.setLayoutData(gd_text);

	windowControls.put(ControlConstants.PAGE_NUMBER_DISPLAY, pageNumberDisplayTextBox);
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:11,代码来源:DebugDataViewer.java

示例15: setLabelValue

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
/**
 * Set the values of the dataset information window for the respective  labels
 * @param composite_2
 */
public void setLabelValue(Composite composite_2, String value) {
	Text textValue= new Text(composite_2, SWT.NONE |SWT.READ_ONLY);
	textValue.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
	textValue.setEditable(false);
	textValue.setText(value);
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:11,代码来源:DatasetInformationDialog.java


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