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


Java SWT.BEGINNING屬性代碼示例

本文整理匯總了Java中org.eclipse.swt.SWT.BEGINNING屬性的典型用法代碼示例。如果您正苦於以下問題:Java SWT.BEGINNING屬性的具體用法?Java SWT.BEGINNING怎麽用?Java SWT.BEGINNING使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在org.eclipse.swt.SWT的用法示例。


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

示例1: createContent

@Override
public void createContent ( final Composite parent )
{
    parent.setLayout ( new GridLayout ( 1, false ) );

    final Label label = new Label ( parent, SWT.NONE );
    label.setText ( System.getProperty ( Properties.MAIN_PAGE_TEXT, "Administration Console" ) );
    label.setData ( RWT.CUSTOM_VARIANT, "mainLabel" );

    final GridData gd = new GridData ( SWT.CENTER, SWT.BEGINNING, true, true );
    gd.verticalIndent = 20;
    label.setLayoutData ( gd );
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:13,代碼來源:MainPage.java

示例2: getToolBarStyle

@Override
public int getToolBarStyle(String toolBarId) {
	if (TOP_TOOLBAR_ID.equals(toolBarId)) {
		return SWT.HORIZONTAL | SWT.FLAT;
	}
	return SWT.HORIZONTAL | SWT.FLAT | SWT.BEGINNING;
}
 
開發者ID:Talend,項目名稱:avro-schema-editor,代碼行數:7,代碼來源:StudioToolBarConfigurationImpl.java

示例3: getToolBarStyle

@Override
public int getToolBarStyle(String toolBarId) {
	int style = SWT.HORIZONTAL | SWT.FLAT;// | SWT.BEGINNING)
	Kind toolBarKind = getToolBarKind(toolBarId);
	if (isLeftAlignment(toolBarKind)) {
		style = style | SWT.BEGINNING;
	}
	return style;
}
 
開發者ID:Talend,項目名稱:avro-schema-editor,代碼行數:9,代碼來源:SchemaToolBarConfigurationImpl.java

示例4: FilterQueryByExampleComposite

public FilterQueryByExampleComposite ( final FilterChangedListener filterChangedListener, final Composite parent, final int style, final String filter )
{
    super ( parent, style );

    final GridLayout layout = new GridLayout ();
    layout.numColumns = 6;
    layout.marginHeight = 12;
    layout.marginWidth = 12;
    setLayout ( layout );

    final FilterModified filterModified = new FilterModified () {
        @Override
        public void onModified ()
        {
            final String filterString = toFilter ().toString ();
            filterChangedListener.onFilterChanged ( new Pair<SearchType, String> ( SearchType.SIMPLE, filterString ) );
        };
    };
    this.fields.put ( "sourceTimestamp", new DateFieldEntry ( this, "sourceTimestamp", Messages.sourceTimestamp, filterModified ) ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    this.fields.put ( "entryTimestamp", new DateFieldEntry ( this, "entryTimestamp", Messages.entryTimestamp, filterModified ) ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$

    this.fields.put ( "message", new TextFieldEntry ( this, "message", Messages.message, filterModified ) ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    this.fields.put ( "monitorType", new TextFieldEntry ( this, "monitorType", Messages.monitorType, filterModified ) ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    this.fields.put ( "eventType", new TextFieldEntry ( this, "eventType", Messages.eventType, filterModified ) ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    this.fields.put ( "item", new TextFieldEntry ( this, "item", Messages.item, filterModified ) ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    this.fields.put ( "value", new TextFieldEntry ( this, "value", Messages.value, filterModified ) ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    this.fields.put ( "priority", new TextFieldEntry ( this, "priority", Messages.priority, filterModified ) ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    this.fields.put ( "source", new TextFieldEntry ( this, "source", Messages.source, filterModified ) ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    this.fields.put ( "actorType", new TextFieldEntry ( this, "actorType", Messages.actorType, filterModified ) ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    this.fields.put ( "actorName", new TextFieldEntry ( this, "actorName", Messages.actorName, filterModified ) ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    this.fields.put ( "component", new TextFieldEntry ( this, "component", Messages.component, filterModified ) ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    this.fields.put ( "system", new TextFieldEntry ( this, "system", Messages.system, filterModified ) ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    this.fields.put ( "hive", new TextFieldEntry ( this, "hive", Messages.hive, filterModified ) ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    this.fields.put ( "location", new TextFieldEntry ( this, "location", Messages.location, filterModified ) ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    this.fields.put ( "messageSource", new TextFieldEntry ( this, "messageSource", Messages.messageSource, filterModified ) );
    this.fields.put ( "comment", new TextFieldEntry ( this, "comment", Messages.comment, filterModified ) ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$

    // clear button
    this.clearButton = new Button ( this, SWT.PUSH );
    this.clearButton.setText ( Messages.clear );
    final GridData clearButtonLayoutData = new GridData ();
    clearButtonLayoutData.horizontalAlignment = SWT.BEGINNING;
    clearButtonLayoutData.horizontalSpan = 6;
    this.clearButton.setLayoutData ( clearButtonLayoutData );
    this.clearButton.addSelectionListener ( new SelectionAdapter () {
        @Override
        public void widgetSelected ( final SelectionEvent e )
        {
            for ( final FieldEntry fieldEntry : FilterQueryByExampleComposite.this.fields.values () )
            {
                fieldEntry.clear ();
            }
            FilterQueryByExampleComposite.this.fields.get ( "sourceTimestamp" ).focus (); //$NON-NLS-1$
        }
    } );

    populateFromFilter ( filter );

    this.fields.get ( "sourceTimestamp" ).focus (); //$NON-NLS-1$
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:60,代碼來源:FilterQueryByExampleComposite.java

示例5: withGap

protected GridData withGap ()
{
    final GridData result = new GridData ( SWT.BEGINNING, SWT.BEGINNING, false, false );
    result.horizontalIndent = 10;
    return result;
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:6,代碼來源:NgpExportPage.java

示例6: tabSelected

private void tabSelected(CTabItem item) {
	if (item.getData() instanceof IConfigurationElement) {
		final IConfigurationElement element = (IConfigurationElement) item
				.getData();

		Composite pageComposite = (Composite) item.getControl();
		try {
			final InstallationPage page = (InstallationPage) element
					.createExecutableExtension(IWorkbenchRegistryConstants.ATT_CLASS);
			page.createControl(pageComposite);
			// new controls created since the dialog font was applied, so
			// apply again.
			Dialog.applyDialogFont(pageComposite);
			page.setPageContainer(this);
			// Must be done before creating the buttons because the control
			// button creation methods
			// use this map.
			pageToId.put(page, element
					.getAttribute(IWorkbenchRegistryConstants.ATT_ID));
			createButtons(page);
			item.setData(page);
			item.addDisposeListener(new DisposeListener() {

				@Override
				public void widgetDisposed(DisposeEvent e) {
					page.dispose();
				}
			});
			pageComposite.layout(true, true);

		} catch (CoreException e1) {
			Label label = new Label(pageComposite, SWT.NONE);
			label.setText(e1.getMessage());
			item.setData(null);
		}

	}
	String id = (String) item.getData(ID);
	rememberSelectedTab(id);
	buttonManager.update(id);
	Button button = createButton(buttonManager.getParent(),
			IDialogConstants.CLOSE_ID, IDialogConstants.CLOSE_LABEL, true);
	GridData gd = (GridData) button.getLayoutData();
	gd.horizontalAlignment = SWT.BEGINNING;
	gd.horizontalIndent = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH) / 2;
	// Layout the button bar's parent and all of its children.  We must
	// cascade through all children because the buttons have changed and
	// because tray dialog inserts an extra composite in the button bar
	// hierarchy.
	getButtonBar().getParent().layout(true, true);

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

示例7: createIndexLabelGridData

@Override
GridData createIndexLabelGridData() {
	return new GridData(SWT.CENTER, SWT.BEGINNING, false, false);
}
 
開發者ID:andre-santos-pt,項目名稱:pandionj,代碼行數:4,代碼來源:ArrayPrimitiveFigure.java

示例8: RuntimeViewer

RuntimeViewer(Composite parent) {
	super(parent, SWT.BORDER);
	instance = this;

	setLayout(new FillLayout());
	setBackground(PandionJConstants.Colors.VIEW_BACKGROUND);
	scroll = new ScrolledComposite(this, SWT.H_SCROLL | SWT.V_SCROLL);
	scroll.setBackground(PandionJConstants.Colors.VIEW_BACKGROUND);
	canvas = new Canvas(scroll, SWT.DOUBLE_BUFFERED);
	canvas.setBackground(ColorConstants.white);
	canvas.setLayoutData(new GridData(GridData.FILL_BOTH));
	scroll.setContent(canvas);
	addMenu();

	//				rootFig = new ScalableLayeredPane();
	//				((ScalableLayeredPane) rootFig).setScale(2);
	rootFig = new Figure();
	rootFig.setOpaque(true);
	rootGrid = new GridLayout(2, false);
	rootGrid.horizontalSpacing = PandionJConstants.STACK_TO_OBJECTS_GAP;
	rootGrid.marginWidth = PandionJConstants.MARGIN;
	rootGrid.marginHeight = PandionJConstants.MARGIN;
	rootFig.setLayoutManager(rootGrid);

	stackFig = new StackContainer();
	rootFig.add(stackFig);
	org.eclipse.draw2d.GridData d = new org.eclipse.draw2d.GridData(SWT.BEGINNING, SWT.BEGINNING, true, true);
	d.widthHint = Math.max(PandionJConstants.STACKCOLUMN_MIN_WIDTH, stackFig.getPreferredSize().width);
	rootGrid.setConstraint(stackFig, d);

	objectContainers = new ArrayList<>();
	objectContainer = ObjectContainer.create(true);
	rootFig.add(objectContainer);
	rootGrid.setConstraint(objectContainer, new org.eclipse.draw2d.GridData(SWT.FILL, SWT.FILL, true, true));

	lws = new LightweightSystem(canvas);
	lws.setContents(rootFig);
	pointersMap = new HashMap<>();
	pointersMapOwners = ArrayListMultimap.create();

}
 
開發者ID:andre-santos-pt,項目名稱:pandionj,代碼行數:41,代碼來源:RuntimeViewer.java

示例9: isBeginning

protected boolean isBeginning(int style) {
	return (style & SWT.BEGINNING) != 0;
}
 
開發者ID:Talend,項目名稱:avro-schema-editor,代碼行數:3,代碼來源:SchemaViewer.java


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