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


Java SWT.LEFT属性代码示例

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


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

示例1: createViewerToolTipContentArea

@Override
protected Composite createViewerToolTipContentArea(Event event, ViewerCell cell, Composite parent) {
    final Composite composite = new Composite(parent, SWT.NONE);
    composite.setLayout(new GridLayout(2, false));
    composite.setBackground(rowColorBack);
    Plugin plugin = (Plugin) cell.getElement();

    Hyperlink button = new Hyperlink(composite, SWT.FLAT);
    button.setText("\uf05A");
    button.setFont(fontAwesome);
    button.setBackground(composite.getBackground());
    button.setForeground(rowColorTitle);
    button.setUnderlined(false);
    button.addListener (SWT.MouseDown, e -> Program.launch(GLUON_PLUGIN_URL + plugin.getUrl()));
    button.setToolTipText("Click to access the service's JavaDoc");

    Label text = new Label(composite, SWT.LEFT);
    final String description = plugin.getDescription();
    text.setText(description.contains(".") ? description.substring(0, description.indexOf(".")) : description);
    text.setBackground(composite.getBackground());
    text.setForeground(rowColorTitle);
    composite.pack();
    return composite;
}
 
开发者ID:gluonhq,项目名称:ide-plugins,代码行数:24,代码来源:PluginsSWT.java

示例2: createDialogArea

@Override
protected Control createDialogArea(Composite parent) {
  Composite container = (Composite) super.createDialogArea(parent);
  GridLayout layout = new GridLayout(2, false);
  layout.marginRight = 5;
  layout.marginLeft = 10;
  container.setLayout(layout);

  Label lblUser = new Label(container, SWT.NONE);
  lblUser.setText("User:");

  txtUser = new Text(container, SWT.BORDER);
  txtUser.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
  txtUser.setText(user);

  Label lblPassword = new Label(container, SWT.NONE);
  GridData gd_lblNewLabel = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
  gd_lblNewLabel.horizontalIndent = 1;
  lblPassword.setLayoutData(gd_lblNewLabel);
  lblPassword.setText("Password:");

  txtPassword = new Text(container, SWT.BORDER | SWT.SINGLE | SWT.PASSWORD);
  txtPassword.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
  txtPassword.setText(password);
  return container;
}
 
开发者ID:ModelWriter,项目名称:Tarski,代码行数:26,代码来源:PasswordDialog.java

示例3: createColumns

private void createColumns(TreeViewer viewer) {

		viewer.setColumnProperties(new String[] { "Name", "Value"});
		ColumnViewerToolTipSupport.enableFor(viewer);

		TreeViewerColumn nameColumn = new TreeViewerColumn(viewer, SWT.LEFT, 0);
		nameColumn.getColumn().setText("Name");
		nameColumn.getColumn().setWidth(200);
		nameColumn.setLabelProvider(new ColumnLabelProvider() {
			@Override
			public String getText(Object element) {
				INamedNode node = (INamedNode)element;
				return node.getDisplayName();
			}
		});
		nameColumn.setEditingSupport(new NameEditingSupport(this));

		TreeViewerColumn valueColumn = new TreeViewerColumn(viewer, SWT.LEFT, 1);
		valueColumn.getColumn().setText("Value");
		valueColumn.getColumn().setWidth(300);
		valueColumn.setLabelProvider(new DelegatingStyledCellLabelProvider(new ControlValueLabelProvider(cservice, this)));
		valueColumn.setEditingSupport(new ControlEditingSupport(viewer, cservice, controlViewerMode));
	}
 
开发者ID:eclipse,项目名称:scanning,代码行数:23,代码来源:ControlTreeViewer.java

示例4: fillLabelDefaults

/** Default GridData for all labels */
public static GridData fillLabelDefaults() {
	GridData data = new GridData();
	data.grabExcessHorizontalSpace = false;
	data.grabExcessVerticalSpace = false;
	data.horizontalAlignment = SWT.LEFT;
	data.verticalAlignment = SWT.CENTER;
	return data;
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:9,代码来源:WizardComponentUtils.java

示例5: 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

示例6: createDialogArea

protected Control createDialogArea(Composite parent) {
	createMessageArea(parent);

	// Create a composite to hold the label
	Composite composite = new Composite(parent, SWT.NONE);
	GridData data = new GridData(GridData.FILL_BOTH);
	data.horizontalSpan = 2;
	composite.setLayoutData(data);
	composite.setLayout(new FillLayout());

	// Create the label for the "hidden" message
	label = new Label(composite, SWT.LEFT);

	return composite;
}
 
开发者ID:sergueik,项目名称:SWET,代码行数:15,代码来源:IconAndMessageDialogEx.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: createLabel

/**
 *  Create Label Widget
 * @param control
 * @param widgetName
 * @return
 */
public Widget createLabel(Composite control, String widgetName){
	Label label = new Label(control, SWT.NONE);
	GridData label_gridData = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
	label.setLayoutData(label_gridData);
	label.setText(widgetName);
	return label;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:13,代码来源:FTPWidgetUtility.java

示例9: createTableNameComposite

/**
 * Creates the stack layout composite for Table option
 * @param eltSuDefaultSubgroupComposite
 */
private void createTableNameComposite(ELTSubGroupCompositeWithStack eltSuDefaultSubgroupComposite) {

	Utils.INSTANCE.loadProperties();
	cursor = eltSuDefaultSubgroupComposite.getContainerControl().getDisplay().getSystemCursor(SWT.CURSOR_HAND);
	tableComposite = new ELTSubGroupCompositeWithStack(eltSuDefaultSubgroupComposite.getContainerControl());
	tableComposite.createContainerWidget();

	tableComposite.numberOfBasicWidgets(2);
	AbstractELTWidget createWidgetlabel = createWidgetlabel(Messages.LABEL_TABLE_NAME, tableComposite);
	selectLable.getSWTWidgetControl().setData(String.valueOf(key_value++), createWidgetlabel.getSWTWidgetControl());
	
	AbstractELTWidget tableNameWgt = createWidgetTextbox(Messages.LABEL_TABLE_NAME, tableComposite);
	tableNameDecorator = attachDecoratorToTextbox(Messages.LABEL_TABLE_NAME, tableNameWgt, tableNameDecorator);
	textBoxTableName = (Text) tableNameWgt.getSWTWidgetControl();

	attachListeners(tableNameWgt);

	AbstractELTWidget createWidgetlabel2 = createWidgetlabel(Messages.EXTRACT_FROM_METASTORE, tableComposite);
	selectLable.getSWTWidgetControl().setData(String.valueOf(key_value++), createWidgetlabel2.getSWTWidgetControl());
	ELTDefaultButton editButton = new ELTDefaultButton(Messages.EXTRACT);
	tableComposite.attachWidget(editButton);

	Button button = (Button) editButton.getSWTWidgetControl();
	GridData data = new GridData(SWT.LEFT, SWT.CENTER, false, false, 0, 0);
	data.widthHint = 92;
	data.horizontalIndent = 15;
	button.setLayoutData(data);

	button.addSelectionListener(attachExtractButtonSelectionListner());

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

示例10: setColumnsName

private void setColumnsName (TableViewer tv) {
  for (int i = 0; i < ColumnsConst.COLUMNS.length; i++) {
   TableColumn col = new TableColumn(tv.getTable(), SWT.LEFT );
       col.setText(ColumnsConst.COLUMNS[i]);
       col.setData(new Integer (i));
       col.addSelectionListener(new SelectionAdapter() {
           public void widgetSelected(SelectionEvent event) {
           	TableColumn tc  = (TableColumn)event.getSource();
           	Integer index = (Integer)tc.getData();
               ((PerformanceStatsViewerSorter) tv.getComparator()).doSort(index);
               tv.refresh();
           }
      });
  }
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:15,代码来源:PerformanceView.java

示例11: createButtonBar

@Override
protected Control createButtonBar(Composite parent) {
    final Composite buttonBar = (Composite) super.createButtonBar(parent);

    Button help = new Button(buttonBar, SWT.CENTER);
    final GridData layoutData = new GridData(SWT.LEFT, SWT.CENTER, true, true, 1, 1);
    layoutData.widthHint = 100;
    help.setLayoutData(layoutData);
    help.setText("Help");
    help.addListener(SWT.Selection, e -> openURL(GLUON_DOWN_URL));
    help.moveAbove(buttonControl);
    
    return buttonBar;
}
 
开发者ID:gluonhq,项目名称:ide-plugins,代码行数:14,代码来源:PluginsSWT.java

示例12: createLogLevelGroup

/**
 * @param logLevel 
 * 
 */
private void createLogLevelGroup(String logLevel) {
	
	HydroGroup hydroGroup = new HydroGroup(this, SWT.NONE);
	
	hydroGroup.setHydroGroupText(Messages.LOG_LEVEL_PREF_MESSAGE);
	hydroGroup.setLayout(new GridLayout(1, false));
	hydroGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
	hydroGroup.getHydroGroupClientArea().setLayout(new GridLayout(2, false));
	
	Label label = new Label(hydroGroup.getHydroGroupClientArea(), SWT.NONE);
	
	label.setText(Messages.LOG_LEVEL_CONSOLE_PREF_MESSAGE);
	
	ccLogLevels=new CCombo(hydroGroup.getHydroGroupClientArea(), SWT.BORDER);
	GridData gd_ccLogLevels = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
	gd_ccLogLevels.widthHint = 300;
	if(OSValidator.isMac()){
		gd_ccLogLevels.heightHint=20;
	}
	ccLogLevels.setLayoutData(gd_ccLogLevels);
	
	ccLogLevels.setItems(Messages.COMBO_LOG_LEVELS.split(HASH_REGEX));
	
	ccLogLevels.setText(logLevel);
	
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:30,代码来源:JobRunPreferenceComposite.java

示例13: layoutColumns

private void layoutColumns() {
    columns = getColumnsToDisplay();
    tableColumns.clear();

    TableColumn cols[] = table.getColumns();
    int index = 0;
    for (F o : columns) {
        TableColumn column;
        // Check to see if column already set...
        if (cols.length > index) {
            column = cols[index];

        } else {
            column = new TableColumn(table, SWT.LEFT);
            column.addSelectionListener(getColumnListener());
        }
        String n = getColumnName(o);
        Image r = getColumnImage(o);
        column.setImage(r);
        column.setText(n);
        column.setWidth(getColumnWidth(o));
        column.setData(o);

        tableColumns.add(column);
        index++;
    }

    // Make sure we didn't shrink. May not be tested.
    while (table.getColumns().length > columns.length) {
        table.getColumn(columns.length).dispose(); // last one
    }

    assert (table.getColumns().length == columns.length);

    //

    setColumWidths();
}
 
开发者ID:openaudible,项目名称:openaudible,代码行数:38,代码来源:EnumTable.java

示例14: init

public void init (Listener listener,GridData gd) {
	getTable().setLayoutData(new GridData(GridData.FILL_BOTH));

	getTable().setLayoutData(gd);
	
			
	setContentProvider(new IStructuredContentProvider() {
		@Override
		public Object[] getElements(Object inputElement) {
			BuildPolicy[] ret = (BuildPolicy[]) inputElement;
			return ret;
		}
	});

	setLabelProvider(new LabelProvider() {
		@Override
		public String getText(Object element) {
			BuildPolicy bp = (BuildPolicy) element;
			return bp.getPathGenerator();
		}

	});
	getTable().addListener(SWT.Resize, new Listener() {
		@Override
		public void handleEvent(Event event) {
			TableHelper.handleEvent(event);
		}
	});

	TableColumn column = new TableColumn(getTable(), SWT.LEFT);
	column.setText("");
	column.pack();

	getTable().setHeaderVisible(true);
	getTable().setLinesVisible(true);

	getTable().addListener(SWT.Selection, listener);

}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:39,代码来源:BuildPoliciesCheckboxTableViewer.java

示例15: createDecoration

/**
 * Creates a decoration with the given image for this text.
 *
 * Note that the decoration is only displayed in focus.
 */
public void createDecoration(Image decorationImage) {
	contentProposalDecoration = new ControlDecoration(this, SWT.TOP | SWT.LEFT);
	contentProposalDecoration.setImage(decorationImage);
	contentProposalDecoration.hide();
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:10,代码来源:SuffixText.java


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