本文整理汇总了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);
}
示例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();
}
示例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();
}
示例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;
}
示例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;
}
示例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 );
}
}
示例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);
}
示例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();
}
示例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();
}
示例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();
}
}
示例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);
}