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


Java SWT.BOTTOM属性代码示例

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


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

示例1: createContent

private void createContent() {
    toolBar = new ToolBar(this, SWT.HORIZONTAL);
    toolBar.setEnabled(false);
    GridLayout layout = new GridLayout();
    GridData layoutData = new GridData(SWT.FILL, SWT.TOP, true, false);
    toolBar.setLayout(layout);
    toolBar.setLayoutData(layoutData);

    ToolItem cancelProcessToolItem = new ToolItem(toolBar, SWT.PUSH);
    cancelProcessToolItem.setText(resourceBundle.getString("cancel_process"));
    cancelProcessToolItem.addListener(SWT.Selection, event -> {
        listeners.forEach(DBProcessInfoViewListener::dbProcessInfoViewCancelProcessToolItemClicked);
    });

    ToolItem terminateProcessToolItem = new ToolItem(toolBar, SWT.PUSH);
    terminateProcessToolItem.setText(resourceBundle.getString("kill_process"));
    terminateProcessToolItem.addListener(SWT.Selection, event -> {
        listeners.forEach(DBProcessInfoViewListener::dbProcessInfoViewTerminateProcessToolItemClicked);
    });

    processInfoText = new Text(this, SWT.MULTI | SWT.READ_ONLY | SWT.WRAP | SWT.V_SCROLL);
    GridData textLayoutData = new GridData(SWT.FILL, SWT.BOTTOM, true, false);
    textLayoutData.heightHint = 200;
    processInfoText.setLayoutData(textLayoutData);
}
 
开发者ID:technology16,项目名称:pgsqlblocks,代码行数:25,代码来源:DBProcessInfoView.java

示例2: createTabFolderOutputDesign

/**
 * This method initializes tabFolder
 * 
 */
private void createTabFolderOutputDesign() {
	GridData gridData2 = new org.eclipse.swt.layout.GridData();
	gridData2.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
	gridData2.grabExcessVerticalSpace = true;
	gridData2.grabExcessHorizontalSpace = true;
	gridData2.verticalAlignment = org.eclipse.swt.layout.GridData.FILL;
	tabFolderOutputDesign = new TabFolder(this, SWT.BOTTOM);
	tabFolderOutputDesign.setLayoutData(gridData2);
	createCompositeDesign();
	createCompositeOutput();
	tabItemOutput = new TabItem(tabFolderOutputDesign, SWT.NONE);
	tabItemOutput.setText("Output");
	tabItemOutput.setControl(compositeOutput);
	tabItemDesign = new TabItem(tabFolderOutputDesign, SWT.NONE);
	tabItemDesign.setText("Design");
	tabItemDesign.setControl(compositeDesign);
	if (connector instanceof HtmlConnector)
		selectTabDesign();
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:23,代码来源:ConnectorEditorPart.java

示例3: open

/**
 * Setup the Disk window and display (open) it.
 */
public void open() {
	shell = new Shell(parentShell, SWT.SHELL_TRIM);
	shell.setLayout(new FillLayout());
	shell.setImage(imageManager.get(ImageManager.ICON_DISK));
	setStandardWindowTitle();
	shell.addDisposeListener(new DisposeListener() {
			public void widgetDisposed(DisposeEvent event) {
				dispose(event);
			}
		});
		
	CTabFolder tabFolder = new CTabFolder(shell, SWT.BOTTOM);
	new DiskExplorerTab(tabFolder, disks, imageManager, this);
	diskMapTabs = new DiskMapTab[disks.length];
	for (int i=0; i<disks.length; i++) {
		if (disks[i].supportsDiskMap()) {
			diskMapTabs[i] = new DiskMapTab(tabFolder, disks[i]);
		}
	}
	diskInfoTab = new DiskInfoTab(tabFolder, disks);
	tabFolder.setSelection(tabFolder.getItems()[0]);
	
	
	shell.open();
}
 
开发者ID:AppleCommander,项目名称:AppleCommander,代码行数:28,代码来源:DiskWindow.java

示例4: convertColumnAlignmentToSWT

public static int convertColumnAlignmentToSWT(int align) {
	int swt = 0;
	int hAlign = align & 3;
	if (hAlign == TableColumn.ALIGN_CENTER) {
		swt = SWT.CENTER;
	} else if (hAlign == TableColumn.ALIGN_LEAD) {
		swt = SWT.LEAD;
	} else if (hAlign == TableColumn.ALIGN_TRAIL) {
		swt = SWT.TRAIL;
	} else {
		swt = SWT.LEAD;
	}
	int vAlign = align & ~3;
	if (vAlign == TableColumn.ALIGN_TOP) {
		swt |= SWT.TOP;
	} else if (vAlign == TableColumn.ALIGN_BOTTOM) {
		swt |= SWT.BOTTOM;
	}
	return swt;
}
 
开发者ID:BiglySoftware,项目名称:BiglyBT,代码行数:20,代码来源:TableColumnSWTUtils.java

示例5: getAlignment

public static int getAlignment(String sAlign, int def) {
	int align;

	if (sAlign == null) {
		align = def;
	} else if (sAlign.equalsIgnoreCase("center")) {
		align = SWT.CENTER;
	} else if (sAlign.equalsIgnoreCase("bottom")) {
		align = SWT.BOTTOM;
	} else if (sAlign.equalsIgnoreCase("top")) {
		align = SWT.TOP;
	} else if (sAlign.equalsIgnoreCase("left")) {
		align = SWT.LEFT;
	} else if (sAlign.equalsIgnoreCase("right")) {
		align = SWT.RIGHT;
	} else {
		align = def;
	}

	return align;
}
 
开发者ID:BiglySoftware,项目名称:BiglyBT,代码行数:21,代码来源:SWTSkinUtils.java

示例6: doRender

@Override
protected void doRender ( final Graphics g, final Rectangle clientRectangle )
{
    if ( this.axis == null )
    {
        return;
    }

    final Double position = getPosition ();
    if ( position == null )
    {
        return;
    }

    final int y = (int)this.axis.translateToClient ( clientRectangle.height, getPosition () );

    if ( ( this.style & SWT.TOP ) > 0 )
    {
        g.fillRectangle ( clientRectangle.x, clientRectangle.y, clientRectangle.width, y );
    }
    else if ( ( this.style & SWT.BOTTOM ) > 0 )
    {
        g.fillRectangle ( clientRectangle.x, y, clientRectangle.width, clientRectangle.height - y );
    }
    else
    {
        if ( y < 0 || y > clientRectangle.width )
        {
            return;
        }
        g.drawLine ( clientRectangle.x, clientRectangle.y + y, clientRectangle.width, clientRectangle.y + y );
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:33,代码来源:AbstractPositionYRuler.java

示例7: createTabFolderOutputDesign

private void createTabFolderOutputDesign() {
	GridData gridData2 = new org.eclipse.swt.layout.GridData();
	gridData2.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
	gridData2.grabExcessVerticalSpace = true;
	gridData2.grabExcessHorizontalSpace = true;
	gridData2.verticalAlignment = org.eclipse.swt.layout.GridData.FILL;
	tabFolderOutputDesign = new TabFolder(this, SWT.BOTTOM);
	tabFolderOutputDesign.setLayoutData(gridData2);
	createCompositeOutput();
	tabItemOutput = new TabItem(tabFolderOutputDesign, SWT.NONE);
	tabItemOutput.setText("Output");
	tabItemOutput.setControl(compositeOutput);
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:13,代码来源:SequenceEditorPart.java

示例8: createPartControl

/**
	 * This is a callback that will allow us
	 * to create the viewer and initialize it.
	 */
	public void createPartControl(Composite parent) {
		parent.setLayout(new FillLayout());
		
		this.tabFolder = new CTabFolder(parent, SWT.BOTTOM);
        createFSTab(tabFolder);
        createPlatformTab(tabFolder);
        tabFolder.addSelectionListener(new SelectionAdapter() {
        	
        	@Override
        	public void widgetSelected(SelectionEvent e) {
        		CTabItem selection = tabFolder.getSelection();
        		if (selection != null) {
        			setActiveViewerPage((ViewerPage) selection.getControl());
        		}
        		saveChoosedPage(tabFolder.getSelectionIndex());
        	}
        	
		});
        int choosedPage = loadChoosedPage();
        tabFolder.setSelection(choosedPage);
        activePage = (ViewerPage) tabFolder.getItem(choosedPage).getControl();
        
//        GridData gridData = new GridData(SWT.FILL,SWT.TOP,true,false);
//        tabFolder.setLayoutData(gridData);
//        GridDataFactory.fillDefaults().grab(true, false).applyTo(tabFolder);
		// Create the help context id for the viewer's control
//		PlatformUI.getWorkbench().getHelpSystem().setHelp(viewer.getControl(), "com.onpositive.prefeditor.viewer");
		makeActions();
//		hookDoubleClickAction();
		contributeToActionBars();
	}
 
开发者ID:32kda,项目名称:com.onpositive.prefeditor,代码行数:35,代码来源:PreferenceView.java

示例9: DBProcessInfoView

public DBProcessInfoView(ResourceBundle resourceBundle, Composite parent, int style) {
    super(parent, style);
    this.resourceBundle = resourceBundle;
    GridLayout layout = new GridLayout();
    layout.marginWidth = 0;
    layout.marginHeight = 0;
    GridData layoutData = new GridData(SWT.FILL, SWT.BOTTOM, true, false);
    setLayout(layout);
    setLayoutData(layoutData);
    createContent();
}
 
开发者ID:technology16,项目名称:pgsqlblocks,代码行数:11,代码来源:DBProcessInfoView.java

示例10: createFormContent

@Override
protected final void createFormContent(IManagedForm managedForm) {

    makeActions();

    ScrolledForm form = managedForm.getForm();

    form.setText(getTitle());
    form.setImage(getImage());
    FormLayout bodyLayout = new FormLayout();
    bodyLayout.marginWidth = 0;
    bodyLayout.marginHeight = 0;

    Composite body = form.getBody();
    body.setLayout(bodyLayout);
    Dialog.applyDialogFont(body);

    _InfoBar = createInfoBar(body);

    setInfoText(getInfoText());

    _Client = createClient(managedForm, body);

    FormData clientFormData = new FormData();

    if (_InfoBar != null) {
        clientFormData.top = new FormAttachment(_InfoBar, 0, SWT.BOTTOM);
    }
    else {
        clientFormData.top = new FormAttachment(0, 0);
    }
    clientFormData.left = new FormAttachment(0, 0);
    clientFormData.right = new FormAttachment(100, 0);
    clientFormData.bottom = new FormAttachment(100, 0);
    _Client.setLayoutData(clientFormData);

    IToolBarManager toolBarManager = form.getToolBarManager();
    contributeToToolBar(toolBarManager);
    toolBarManager.update(true);

    if (!getModel().isDestroyed()) {
        createModelFormContent(managedForm, _Client);
        initFromModel();
    }

}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:46,代码来源:DataModelFormPage.java

示例11: createAdvancedControls

protected void createAdvancedControls(Composite parent) {
	LOGGER.debug("Creating Import Engine XML layout");
	Composite fileSelectionArea = new Composite(parent, SWT.NONE);
	fileSelectionArea.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL | GridData.FILL_HORIZONTAL));

	GridLayout fileSelectionLayout = new GridLayout();
	fileSelectionLayout.makeColumnsEqualWidth = false;
	fileSelectionLayout.marginWidth = 0;
	fileSelectionLayout.marginHeight = 0;
	fileSelectionArea.setLayout(fileSelectionLayout);

	editor = new FileFieldEditor("fileSelect", Messages.SELECT_FILE_LABEL_TEXT, fileSelectionArea);
	editor.getTextControl(fileSelectionArea).addModifyListener(new ModifyListener() {
		public void modifyText(ModifyEvent e) {
			IPath path = new Path(ImportEngineXmlWizardPage.this.editor.getStringValue());
			if (path.segment(0) != null) {
				targetxmlFilePath = editor.getStringValue();
				setFileName(path.lastSegment());
			} else {
				targetxmlFilePath = null;
				displayError();
			}
		}
	});
	String[] extensions = new String[] { ALLOWED_EXTENSIONS }; // NON-NLS-1
	editor.setFileExtensions(extensions);
	fileSelectionArea.moveAbove(null);

	Composite fileSelectionArea2 = new Composite(parent, SWT.NONE);
	fileSelectionArea2.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL | GridData.FILL_HORIZONTAL));
	GridLayout fileSelectionLayout2 = new GridLayout();
	fileSelectionLayout2.numColumns = 2;

	fileSelectionLayout2.makeColumnsEqualWidth = false;
	fileSelectionLayout2.marginWidth = 0;
	fileSelectionLayout2.marginHeight = 0;
	fileSelectionArea2.setLayout(fileSelectionLayout2);
	Font fontNote = new Font(fileSelectionArea2.getDisplay(), TIMES_NEW_ROMAN_BALTIC_FONT, 9, SWT.BOLD);
	Label lblNoteHeader = new Label(fileSelectionArea2, SWT.NONE);
	lblNoteHeader.setText(Messages.NOTE_LABEL_HEADER_TEXT);
	lblNoteHeader.setFont(fontNote);
	Label lblNote = new Label(fileSelectionArea2, SWT.NONE);

	GridData gd_lblNote = new GridData(SWT.BOTTOM, SWT.CENTER, false, false, 1, 1);
	gd_lblNote.widthHint = 391;
	lblNote.setLayoutData(gd_lblNote);
	lblNote.setText(Messages.NOTE_MESSAGE_TEXT);

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


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