本文整理汇总了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 );
}
示例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;
}
示例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;
}
示例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$
}
示例5: withGap
protected GridData withGap ()
{
final GridData result = new GridData ( SWT.BEGINNING, SWT.BEGINNING, false, false );
result.horizontalIndent = 10;
return result;
}
示例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);
}
示例7: createIndexLabelGridData
@Override
GridData createIndexLabelGridData() {
return new GridData(SWT.CENTER, SWT.BEGINNING, false, false);
}
示例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();
}
示例9: isBeginning
protected boolean isBeginning(int style) {
return (style & SWT.BEGINNING) != 0;
}