本文整理汇总了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.");
}
}
示例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();
}
示例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();
}
示例4: AboutDialog
public AboutDialog(Shell arg0) {
super(arg0, SWT.DIALOG_TRIM | SWT.RESIZE);
}
示例5: getShellStyle
@Override
protected int getShellStyle() {
return SWT.TITLE | SWT.BORDER | SWT.RESIZE | SWT.APPLICATION_MODAL;
}
示例6: getShellStyle
@Override
protected int getShellStyle() {
return SWT.RESIZE | SWT.TITLE | SWT.APPLICATION_MODAL;
}
示例7: getShellStyle
@Override
protected int getShellStyle() {
return super.getShellStyle() & (~SWT.RESIZE);
}
示例8: createTableViewerColumn
private TableViewerColumn createTableViewerColumn(TableViewer tableViewer, StyledCellLabelProvider labelProvider) {
final TableViewerColumn viewerColumn = new TableViewerColumn(tableViewer, SWT.NONE | SWT.RESIZE);
viewerColumn.setLabelProvider(labelProvider);
return viewerColumn;
}
示例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();
}
}
}
示例10: SkinnedDialog
public SkinnedDialog(String skinFile, String shellSkinObjectID) {
this(skinFile, shellSkinObjectID, SWT.DIALOG_TRIM | SWT.RESIZE);
}
示例11: getShellStyle
protected int getShellStyle() {
return super.getShellStyle()|SWT.RESIZE|SWT.MAX;
}