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


Java SWT.RESIZE属性代码示例

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


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

示例1: createShell

/**
 * Create the Shell, setting up any elements that are not set up by the main Composite.
 *
 * @throws IllegalStateException If the parent shell is unusable (null or disposed).
 */
private void createShell() {
	// Lock the parent shell for this operation.
	if (this.parentShell != null) {
		synchronized (this.parentShell) {
			if (this.parentShell.isDisposed()) {
				throw new IllegalStateException("The parent shell is unusable.");
			}

			// Continue building this shell.
			this.shell = new Shell(this.display, SWT.BORDER | SWT.CLOSE | SWT.TITLE | SWT.MIN | SWT.RESIZE);
			this.shell.setText(Globals.WINDOWS_TITLE + Globals.WINDOWS_TITLE_CONNECTOR + "Log...");
			this.shell.setLayout(new FillLayout(SWT.VERTICAL));

			// No need to read it later, so it is not assigned to a variable.
			new LogComposite(this, this.shell, this.display, SWT.NONE);

			// Compute the needed size.
			Point point = this.shell.computeSize(SWT.DEFAULT, SWT.DEFAULT);
			point.x += 2;
			point.y += 2;
			int[] posXY = StaticGuiSupport.getCenteredPosition(point.x, point.y, this.parentShell);
			this.shell.setBounds(posXY[0], posXY[1], point.x, point.y);
		}
	} else {
		throw new IllegalStateException("The parent shell is unusable.");
	}
}
 
开发者ID:wwu-pi,项目名称:tap17-muggl-javaee,代码行数:32,代码来源:LogWindow.java

示例2: KaviPickListDialog

public KaviPickListDialog() {
	super(ProgressManagerUtil.getDefaultParent(), SWT.RESIZE | SWT.NO_BACKGROUND, true, true, false, true, true, null, "Central Command");
	kaviList = new KaviList<T>(KaviPickListDialog.this);
	kaviList.setListContentChangedAction((list, selections) -> {
		displayInfo.filteredCount = list.size();
		displayInfo.selectedCount = selections.size();
		displayInfo.mode = kaviList.currentContentMode();
		updateInfoDisplay();
	});
	create();
}
 
开发者ID:dakaraphi,项目名称:eclipse-plugin-commander,代码行数:11,代码来源:KaviPickListDialog.java

示例3: attachWidget

@Override
public void attachWidget(Composite container) {
	TableViewer tableViewer = new TableViewer(container, SWT.BORDER|SWT.CENTER | SWT.MULTI | SWT.FULL_SELECTION |SWT.H_SCROLL |SWT.V_SCROLL|SWT.RESIZE);
	tableViewer.setContentProvider(iStructuredContentProvider);
	tableViewer.setLabelProvider(iTableLabelProvider);
	jfaceWidgets = tableViewer;
	widget = tableViewer.getTable();
	
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:9,代码来源:ELTTableViewer.java

示例4: AboutDialog

public AboutDialog(Shell arg0) {
	super(arg0, SWT.DIALOG_TRIM | SWT.RESIZE);
}
 
开发者ID:juanerasmoe,项目名称:pmTrans,代码行数:3,代码来源:AboutDialog.java

示例5: getShellStyle

@Override
protected int getShellStyle() {
	return SWT.TITLE | SWT.BORDER | SWT.RESIZE | SWT.APPLICATION_MODAL;
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:4,代码来源:EditorFrameworkDialog.java

示例6: getShellStyle

@Override
protected int getShellStyle() {
	return SWT.RESIZE | SWT.TITLE | SWT.APPLICATION_MODAL;
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:4,代码来源:ProjectChooseTestCasesDialog.java

示例7: getShellStyle

@Override
protected int getShellStyle() {
	return super.getShellStyle() & (~SWT.RESIZE);
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:4,代码来源:CustomDialog.java

示例8: createTableViewerColumn

private TableViewerColumn createTableViewerColumn(TableViewer tableViewer, StyledCellLabelProvider labelProvider) {
    final TableViewerColumn viewerColumn = new TableViewerColumn(tableViewer, SWT.NONE | SWT.RESIZE);
    viewerColumn.setLabelProvider(labelProvider);
    return viewerColumn;
}
 
开发者ID:dakaraphi,项目名称:eclipse-plugin-commander,代码行数:5,代码来源:KaviListColumns.java

示例9: open

public void open(final Shell parent, Display... parentDisplay) {
	if (TipDayEx.index == -1) {
		TipDayEx.index = new Random().nextInt(this.tips.size());
	}
	this.shell = new Shell(parent,
			SWT.SYSTEM_MODAL | SWT.TITLE | SWT.BORDER | SWT.CLOSE | SWT.RESIZE);
	this.shell.setText("Tip of the day");
	this.shell.setLayout(new GridLayout(2, false));

	this.shell.addListener(SWT.Traverse, new Listener() {
		@Override
		public void handleEvent(final Event event) {
			switch (event.detail) {
			case SWT.TRAVERSE_ESCAPE:
				TipDayEx.this.shell.dispose();
				event.detail = SWT.TRAVERSE_NONE;
				event.doit = false;
				break;
			}
		}
	});
	buildLeftColumn();
	buildTip();
	buildButtons();

	this.shell.setDefaultButton(this.buttonClose);
	this.shell.pack();
	this.shell.open();

	if (parentDisplay != null) {
		display = parentDisplay[0];
	} else {

		display = this.shell.getDisplay();
	}
	Monitor primary = display.getPrimaryMonitor();
	Rectangle bounds = primary.getBounds();
	Rectangle rect = shell.getBounds();

	int x = bounds.x + (bounds.width - rect.width) / 2;
	int y = bounds.y + (bounds.height - rect.height) / 2;

	shell.setLocation(x, y);

	while (!this.shell.isDisposed()) {
		if (!display.readAndDispatch()) {
			display.sleep();
		}
	}
}
 
开发者ID:sergueik,项目名称:SWET,代码行数:50,代码来源:TipDayEx.java

示例10: SkinnedDialog

public SkinnedDialog(String skinFile, String shellSkinObjectID) {
	this(skinFile, shellSkinObjectID, SWT.DIALOG_TRIM | SWT.RESIZE);
}
 
开发者ID:BiglySoftware,项目名称:BiglyBT,代码行数:3,代码来源:SkinnedDialog.java

示例11: getShellStyle

protected int getShellStyle() {
	return super.getShellStyle()|SWT.RESIZE|SWT.MAX;
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:3,代码来源:ColumnDialog.java


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