本文整理了Java中org.eclipse.swt.widgets.Shell.setMinimized()
方法的一些代码示例,展示了Shell.setMinimized()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Shell.setMinimized()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Shell
类名称:Shell
方法名:setMinimized
[英]Sets the minimized stated of the receiver. If the argument is true
causes the receiver to switch to the minimized state, and if the argument is false
and the receiver was previously minimized, causes the receiver to switch back to either the maximized or normal states.
[中]设置接收器的最小值。如果参数为true
,则会导致接收器切换到最小化状态,如果参数为false
,且接收器之前已最小化,则会导致接收器切换回最大化或正常状态。
代码示例来源:origin: openaudible/openaudible
void actionMinimizeWindow() {
shell.setMinimized(true);
}
代码示例来源:origin: BiglySoftware/BiglyBT
@Override
public void handleEvent(Event event) {
Shell shell = Utils.getActiveShell();
if (null == shell || shell.isDisposed()) {
event.doit = false;
return;
}
shell.setMinimized(true);
}
});
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt.q07
private static void readMode( final Shell shell ) {
final String value = WidgetLCAUtil.readPropertyValue( shell, "mode" );
if( value != null ) {
if( "maximized".equals( value ) ) {
shell.setMaximized( true );
} else if( "minimized".equals( value ) ) {
shell.setMinimized( true );
} else {
shell.setMinimized( false );
shell.setMaximized( false );
}
}
}
代码示例来源:origin: stackoverflow.com
private void shellToFront(final Shell shell)
{
shell.getDisplay().syncExec(new Runnable() {
@Override
public void run() {
if (!shell.getMinimized())
{
shell.setMinimized(true);
}
shell.setMinimized(false);
shell.setActive();
}
});
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
public void handleSetMode( Shell shell, JsonObject properties ) {
JsonValue value = properties.get( PROP_MODE );
if( value != null ) {
String mode = value.asString();
if( "maximized".equals( mode ) ) {
shell.setMaximized( true );
} else if( "minimized".equals( mode ) ) {
shell.setMinimized( true );
} else {
shell.setMinimized( false );
shell.setMaximized( false );
}
}
}
代码示例来源:origin: org.eclipse/org.eclipse.help.ui
public void displayUrl(String url) {
browser.setUrl(url);
shell.setMinimized(false);
shell.forceActive();
}
private void displayURLExternal(WindowEvent e) {
代码示例来源:origin: BiglySoftware/BiglyBT
public void show() {
if(updateWindow == null || updateWindow.isDisposed()) {
return;
}
Utils.centreWindow( updateWindow );
updateWindow.setMinimized(false);
updateWindow.open();
updateWindow.forceActive();
}
代码示例来源:origin: stackoverflow.com
shell.setMinimized(false);
shell.setActive();
org.eclipse.swt.graphics.Point shellPoint = aikataulu.getLocation();
代码示例来源:origin: org.eclipse/org.eclipse.help.ui
public void run() {
Shell windowShell=null;
if (!narrow) {
Shell[] shells = display.getShells();
for (int i=0; i<shells.length; i++) {
Object data = shells[i].getData();
if (data!=null && data instanceof IWorkbenchWindow) {
windowShell=shells[i];
break;
}
}
}
if (windowShell!=null) {
windowShell.forceActive();
if (Platform.getWS().equals(Platform.WS_WIN32)) {
// feature in Windows. Without this code,
// the window will only flash in the launch bar.
windowShell.setVisible(false);
windowShell.setMinimized(true);
windowShell.setVisible(true);
windowShell.setMinimized(false);
}
}
PreferenceDialog dialog = PreferencesUtil
.createPreferenceDialogOn(windowShell, getCapabilityPageId(),
null, null);
dialog.open();
}
});
代码示例来源:origin: org.eclipse/org.eclipse.help.ui
/**
* This was introduced to work around the behavior described in
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=130206
*/
private void forceDialogsOnTop() {
IWorkbench workbench = PlatformUI.getWorkbench();
Display display = workbench.getDisplay();
/*
* If the active shell is not in this display (e.g. help window),
* bring the active workbench window up.
*/
if (display.getActiveShell() == null) {
IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
if (window != null) {
Shell windowShell = window.getShell();
windowShell.forceActive();
if (Platform.getWS().equals(Platform.WS_WIN32)) {
// feature in Windows. Without this code,
// the window will only flash in the launch bar.
windowShell.setVisible(false);
windowShell.setMinimized(true);
windowShell.setVisible(true);
windowShell.setMinimized(false);
}
}
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.e4.ui.workbench.renderers.swt
shell.setMaximized(true);
} else if (shellME.getTags().contains(ShellMinimizedTag)) {
shell.setMinimized(true);
代码示例来源:origin: org.eclipse.e4.ui.workbench.renderers/swt
public void handleEvent(Event event) {
// Ensure that this event is for a MApplication
if (!(event.getProperty(UIEvents.EventTags.ELEMENT) instanceof MApplication))
return;
MWindow win = (MWindow) event
.getProperty(UIEvents.EventTags.NEW_VALUE);
if ((win == null) || !win.getTags().contains("topLevel")) //$NON-NLS-1$
return;
win.setToBeRendered(true);
if (!(win.getRenderer() == WBWRenderer.this))
return;
Shell shell = (Shell) win.getWidget();
if (shell.getMinimized()) {
shell.setMinimized(false);
}
shell.setActive();
shell.moveAbove(null);
}
};
代码示例来源:origin: org.eclipse.platform/org.eclipse.e4.ui.workbench.renderers.swt
@Inject
@Optional
private void subscribeTopicSelectedElementChanged(
@UIEventTopic(UIEvents.ElementContainer.TOPIC_SELECTEDELEMENT) Event event) {
// Ensure that this event is for a MApplication
if (!(event.getProperty(UIEvents.EventTags.ELEMENT) instanceof MApplication)) {
return;
}
MWindow win = (MWindow) event.getProperty(UIEvents.EventTags.NEW_VALUE);
if ((win == null) || !win.getTags().contains("topLevel")) { //$NON-NLS-1$
return;
}
win.setToBeRendered(true);
if (!(win.getRenderer() == WBWRenderer.this)) {
return;
}
Shell shell = (Shell) win.getWidget();
if (shell.getMinimized()) {
shell.setMinimized(false);
}
shell.setActive();
shell.moveAbove(null);
}
代码示例来源:origin: org.eclipse.e4.ui.workbench.renderers/swt
shell.setMaximized(true);
else if (shellME.getTags().contains(ShellMinimizedTag))
shell.setMinimized(true);
代码示例来源:origin: BiglySoftware/BiglyBT
updateWindow.setMinimized(false);
代码示例来源:origin: BiglySoftware/BiglyBT
shell.setMinimized(true);
Shell[] shells = shell.getDisplay().getShells();
for (int i = 0; i < shells.length; i++) {
shell.setMinimized(false);
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench
Shell windowShell = window.getShell();
if (windowShell.getMinimized()) {
windowShell.setMinimized(false);
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench
private void activate() {
if (editorRef != null) {
IEditorPart editor = editorRef.getEditor(true);
WorkbenchPage p = (WorkbenchPage) editor.getEditorSite()
.getPage();
Shell s = p.getWorkbenchWindow().getShell();
if (s.getMinimized()) {
s.setMinimized(false);
}
s.moveAbove(null);
p.getWorkbenchWindow().setActivePage(p);
p.activate(editor);
} else {
IWorkbenchPage p = window.getActivePage();
if (p != null) {
try {
p.openEditor(input, desc.getId(), true);
} catch (PartInitException e) {
}
}
}
}
代码示例来源:origin: stackoverflow.com
private static void bringupDialog(WindowState state) {
final Shell workbenchShell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
//bring up the application to front
workbenchShell.setVisible( true );
workbenchShell.setMinimized( false );
workbenchShell.redraw();
//focus on dialog
workbenchShell.setActive();
workbenchShell.forceActive();
workbenchShell.setFocus();
workbenchShell.forceFocus();
workbenchShell.moveAbove( null );
workbenchShell.redraw();
Shell shell = instance.getShell(); // desired window shell
shell.setActive();
shell.forceActive();
shell.setFocus();
shell.forceFocus();
shell.moveAbove( null );
shell.redraw();
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.tips.ui
} else if (isOpen() && isDialogOpen()) {
if (fTipDialog.getShell().getMinimized()) {
fTipDialog.getShell().setMinimized(false);
内容来源于网络,如有侵权,请联系作者删除!