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


Java SWT.READ_ONLY属性代码示例

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


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

示例1: createApplicationFilterView

private void createApplicationFilterView(GridData comboLayoutData, GridData textLayoutData) {
    Label label = new Label(group, SWT.NONE);
    label.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
    label.setText(resourceBundle.getString("application"));

    applicationFilterCombo = new Combo(group, SWT.DROP_DOWN | SWT.READ_ONLY);
    applicationFilterCombo.setLayoutData(comboLayoutData);
    fillCombo(applicationFilterCombo, FilterValueType.STRING);
    applicationFilterCombo.select(0);
    applicationFilterCombo.addModifyListener(e -> {
        FilterCondition condition = FilterCondition.getFilterConditionFromConditionText(applicationFilterCombo.getText());
        listeners.forEach(listener -> listener.processesFiltersViewApplicationFilterConditionChanged(this, condition));
    });

    applicationFilterText = new Text(group, SWT.NONE);
    applicationFilterText.setLayoutData(textLayoutData);
    applicationFilterText.addModifyListener(e -> {
        String text = applicationFilterText.getText();
        final String result = text.isEmpty() ? null : text;
        listeners.forEach(listener -> listener.processesFiltersViewApplicationFilterValueChanged(this, result));
    });
}
 
开发者ID:technology16,项目名称:pgsqlblocks,代码行数:22,代码来源:DBProcessesFiltersView.java

示例2: attachWidget

@Override
public void attachWidget(Composite container) {
	defaultELTcom = new Combo(container, SWT.READ_ONLY);
	defaultELTcom.setItems(defaultTextMessage);
	// defaultELTcom.setItems(new String[] {"True","false"});
	// defaultELTcom.setItem(0, "");
	GridData gd_defaultELTTextBox = new GridData(SWT.FILL, SWT.FILL, false,
			false, 1, 1);
	
	if (OSValidator.isMac()) {
		gd_defaultELTTextBox.horizontalIndent=-1;
		gd_defaultELTTextBox.widthHint = textboxWidth+50;
	}
	else{
		gd_defaultELTTextBox.horizontalIndent=1;
		gd_defaultELTTextBox.widthHint = textboxWidth;
	}
		
	defaultELTcom.setLayoutData(gd_defaultELTTextBox);

	widget = defaultELTcom;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:22,代码来源:ELTDefaultCombo.java

示例3: createDialogArea

@Override
protected Control createDialogArea(Composite parent) {
    Composite comp = (Composite) super.createDialogArea(parent);
    Text filed = new Text(comp, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL
            | SWT.READ_ONLY | SWT.MULTI);
    filed.setText(text);
    filed.setBackground(getShell().getDisplay().getSystemColor(
            SWT.COLOR_LIST_BACKGROUND));
    filed.setFont(JFaceResources.getTextFont());
    PixelConverter pc = new PixelConverter(filed);
    GridData gd = new GridData(GridData.FILL_BOTH);
    gd.widthHint = pc.convertWidthInCharsToPixels(80);
    gd.heightHint = pc.convertHeightInCharsToPixels(30);
    filed.setLayoutData(gd);
    return comp;
}
 
开发者ID:pgcodekeeper,项目名称:pgcodekeeper,代码行数:16,代码来源:SQLEditor.java

示例4: createControl

protected Control createControl() {
  m_Combo = new CCombo(m_Table, SWT.READ_ONLY);
  m_Combo.setBackground(Display.getCurrent().getSystemColor(
      SWT.COLOR_LIST_BACKGROUND));
  if (m_Items != null)
    m_Combo.setItems(m_Items);
  m_Combo.addKeyListener(new KeyAdapter() {
    public void keyPressed(KeyEvent e) {
      try {
        onKeyPressed(e);
      } catch (Exception ex) {
      }
    }
  });
  /*
   * m_Combo.addTraverseListener(new TraverseListener() { public void
   * keyTraversed(TraverseEvent arg0) { onTraverse(arg0); } });
   */
  return m_Combo;
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:20,代码来源:KTableCellEditorCombo.java

示例5: addVersionSection

private void addVersionSection(Composite parent) {
	Composite composite = createDefaultComposite(parent);

	// Label for owner field
	Label ownerLabel = new Label(composite, SWT.NONE);
	ownerLabel.setText(LEGACY_VERSION_TITLE);

	// Owner text field
	legacyVersionCombo = new Combo(composite, SWT.DROP_DOWN | SWT.READ_ONLY);
	GridData gd = new GridData();
	gd.widthHint = convertWidthInCharsToPixels(COMBO_FIELD_WIDTH);
	legacyVersionCombo.setLayoutData(gd);

	// Populate owner text field
	LegacyVersion legacyVersion = LegacyManager.getInstance().getVersion(getProject());
	legacyVersionCombo.setItems(LegacyVersion.names());
	legacyVersionCombo.setText(legacyVersion.name());
}
 
开发者ID:sebez,项目名称:vertigo-chroma-kspplugin,代码行数:18,代码来源:VertigoPropertyPage.java

示例6: createDialogArea

@Override
protected Control createDialogArea(Composite parent) {
	Composite container = (Composite) super.createDialogArea(parent);
	container.getShell().setText("Component Details");
	container.setLayout(new GridLayout(1, false));
	
	ScrolledComposite scrolledComposite = new ScrolledComposite(container, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
	GridData gd_scrolledComposite = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
	gd_scrolledComposite.heightHint = 289;
	gd_scrolledComposite.widthHint = 571;
	scrolledComposite.setLayoutData(gd_scrolledComposite);
	scrolledComposite.setExpandHorizontal(true);
	scrolledComposite.setExpandVertical(true);
	
	text = new Text(scrolledComposite, SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL | SWT.READ_ONLY);
	StringBuilder stringBuilder = new StringBuilder();
	
	if(extraComponentList != null && extraComponentList.size() > 0){
		stringBuilder.append(Messages.REPLAY_EXTRA_COMPONENTS + "\n");
		extraComponentList.forEach(componentName -> { stringBuilder.append(extraCompcount + ". " + componentName + "\n");
			extraCompcount++;
		});
	}
	
	if(missedComponentList != null && missedComponentList.size() > 0 && !missedComponentList.isEmpty()){
		stringBuilder.append(Messages.REPLAY_MISSING_COMPONENTS + "\n");
		missedComponentList.forEach(componentName -> { stringBuilder.append(missedCompcount + "." + componentName + "\n");
			missedCompcount++;
		});
	}
	
	text.setText(stringBuilder.toString());
	
	scrolledComposite.setContent(text);
	
	
	return super.createDialogArea(parent);
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:38,代码来源:ViewExecutionHistoryComponentDialog.java

示例7: createControl

@Override
public void createControl(Composite parent) {
	initializeDialogUnits(parent);
	Composite composite = new Composite(parent, SWT.NULL);
	composite.setLayout(new GridLayout());

	runNpmCheckbox = new Button(composite, SWT.CHECK | SWT.LEFT);
	runNpmCheckbox.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, true, false));
	runNpmCheckbox.setText("Run npm tool for each project");
	runNpmCheckbox.setFont(parent.getFont());
	runNpmCheckbox.addListener(SWT.Selection, this);

	Label label = createPlainLabel(composite, "npm");
	label.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, true, false));

	createOptionsGroup(composite);

	textProcessOut = new Text(composite, SWT.MULTI | SWT.READ_ONLY);
	textProcessOut.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));

	restoreWidgetValues();

	setControl(composite);

	// sync the page completion
	updatePageCompletion();
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:27,代码来源:NpmToolRunnerPage.java

示例8: setLabelValue

/**
 * 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,代码行数:10,代码来源:DatasetInformationDialog.java

示例9: addPathSection

private void addPathSection(Composite parent) {
	Composite composite = createDefaultComposite(parent);

	// Label for path field
	Label pathLabel = new Label(composite, SWT.NONE);
	pathLabel.setText(PATH_TITLE);

	// Path text field
	Text pathValueText = new Text(composite, SWT.WRAP | SWT.READ_ONLY);
	pathValueText.setText(getProject().getFullPath().toString());
}
 
开发者ID:sebez,项目名称:vertigo-chroma-kspplugin,代码行数:11,代码来源:VertigoPropertyPage.java

示例10: addSecondSection

private void addSecondSection(Composite parent, Preferences prefs) {
	Composite composite = createDefaultComposite(parent);

	// Label for owner field
	Label ownerLabel = new Label(composite, SWT.NONE);
	ownerLabel.setText(MINIFIER_TITLE);

	// Create a single-selection list
    selection = new Combo(composite, SWT.READ_ONLY);

    // Add the items, one by one
    for (int i = 0; i < options()[0].length; i++) {
    	selection.add(options()[1][i]);
    }
	selection.setText(options()[1][0]);

	// Set current selection
	String minifier = prefs.get(preferenceKey(MinifyBuilder.MINIFIER),
			MinifyBuilder.DONT_MINIFY);
	if (!minifier.equals(MinifyBuilder.DONT_MINIFY)) {
		for (int i = 0; i < options()[0].length; i++) {
			if (minifier.equals(options()[0][i])) {
				selection.setText(options()[1][i]);
				break;
			}
		}
	}
}
 
开发者ID:mnlipp,项目名称:EclipseMinifyBuilder,代码行数:28,代码来源:MinifyPropertyPage.java

示例11: createContents

@Override
protected Control createContents(Composite parent) {

    this.getShell().setText(_Command);

    ScrolledComposite scrolledComposite = new ScrolledComposite(parent, SWT.V_SCROLL);
    scrolledComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    scrolledComposite.setExpandHorizontal(true);
    Text text = new Text(scrolledComposite, SWT.MULTI | SWT.READ_ONLY | SWT.WRAP);
    text.setText(_Result);
    text.pack();
    scrolledComposite.setContent(text);

    return scrolledComposite;
}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:15,代码来源:ZooKeeperServerModelFormPage.java

示例12: CreateCombo

/**
 * Create Combo Widget
 * @param control
 * @param widgetName
 * @return
 */
public Widget CreateCombo(Composite control, String[] widgetName){
	Combo combo = new Combo(control, SWT.READ_ONLY);
	combo.setItems(widgetName);
	combo.select(0);
	GridData gd_partitionKeyButton = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);
	gd_partitionKeyButton.horizontalIndent = 10;
	combo.setLayoutData(gd_partitionKeyButton);
	
	return combo;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:16,代码来源:FTPWidgetUtility.java

示例13: createType_trigger_combo

/**
 * This method initializes type_trigger_combo	
 *
 */
private void createType_trigger_combo() {
	GridData gridData2 = new GridData();
	gridData2.horizontalAlignment = GridData.FILL;
	gridData2.verticalAlignment = GridData.CENTER;
	gridData2.grabExcessHorizontalSpace = true;
	type_trigger_combo = new Combo(commun_trigger, SWT.READ_ONLY);
	type_trigger_combo.setItems(customTriggers);
	type_trigger_combo
			.addModifyListener(new org.eclipse.swt.events.ModifyListener() {
				public void modifyText(org.eclipse.swt.events.ModifyEvent e) {
					int index = type_trigger_combo.getSelectionIndex();
					if (index == -1) {
						type_trigger_combo.select(0);
					} else if (index != last_index && custom_triggers != null) {
						help_label.setText(custom_triggers[index].getHelp());
				        stackLayout.topControl = custom_triggers[index];
				        custom_trigger.layout();
						last_index = index;
						if (index == 5) { // NoWait case
							timeout_label.setVisible(false);
							timeout_spin.setVisible(false);
						} else {
							timeout_label.setVisible(true);
							timeout_spin.setVisible(true);
						}
					}
				}
			});
	type_trigger_combo.setLayoutData(gridData2);
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:34,代码来源:HttpTriggerEditorComposite.java

示例14: populateGeneralGroup

private void populateGeneralGroup(Composite container) {
    Group generalGroup = new Group(container, SWT.SHADOW_IN);
    generalGroup.setText(resourceBundle.getString("general"));
    generalGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
    generalGroup.setLayout(new GridLayout(2, false));

    Label selectLocale = new Label(generalGroup, SWT.HORIZONTAL);
    selectLocale.setText(resourceBundle.getString("select_ui_language"));
    selectLocale.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

    languageCombo = new Combo (generalGroup, SWT.READ_ONLY);
    languageCombo.setItems(Settings.SUPPORTED_LANGUAGES);
    languageCombo.select(languageCombo.indexOf(settings.getLocale().getLanguage()));
}
 
开发者ID:technology16,项目名称:pgsqlblocks,代码行数:14,代码来源:SettingsDialog.java

示例15: YesNoEditingSupport

public YesNoEditingSupport(ColumnViewer viewer, BooleanChangeValues type) {
    super(viewer);
    cellEditor = new ComboBoxViewerCellEditor((Composite) getViewer().getControl(), SWT.READ_ONLY);
    cellEditor.setLabelProvider(new LabelProvider());
    cellEditor.setContentProvider(ArrayContentProvider.getInstance());
    cellEditor.setInput(YesNoValues.values());
    this.type = type;
    this.viewer = viewer;
}
 
开发者ID:pgcodekeeper,项目名称:pgcodekeeper,代码行数:9,代码来源:YesNoEditingSupport.java


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