當前位置: 首頁>>代碼示例>>Java>>正文


Java Shell.setImages方法代碼示例

本文整理匯總了Java中org.eclipse.swt.widgets.Shell.setImages方法的典型用法代碼示例。如果您正苦於以下問題:Java Shell.setImages方法的具體用法?Java Shell.setImages怎麽用?Java Shell.setImages使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.swt.widgets.Shell的用法示例。


在下文中一共展示了Shell.setImages方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: ProgressDialog

import org.eclipse.swt.widgets.Shell; //導入方法依賴的package包/類
public ProgressDialog(Shell shell) {
    super(shell);

    shell.setImages(PaintShop.getAppIconList());
    init(shell);
    for (; ; ) {
        synchronized (waitObj) {
            if (closed)
                break;
            try {
                waitObj.wait(1000);
            } catch (InterruptedException ie) {
                log.error(ie);
            }
        }
    }
}
 
開發者ID:openaudible,項目名稱:openaudible,代碼行數:18,代碼來源:ProgressDialog.java

示例2: initComponents

import org.eclipse.swt.widgets.Shell; //導入方法依賴的package包/類
/**
 * Init all components
 */
protected void initComponents() {

    /* Build a new shell that holds the application */
    shell = new Shell(display);
    shell.setLayout(LayoutShop.createGridLayout(1, 3, 2, 3));
    shell.setText(i18n.getTranslation("APP_NAME"));
    /* On Mac do not set Shell Image since it will change the Dock Image */
    if (isWindows())
        shell.setImages(PaintShop.appIcon);
    /* Save favorites before quit */
    shell.addDisposeListener(e -> onDispose());
    /* Listen for close event to set isClosing flag */
    shell.addListener(SWT.Close, event -> onClose(event));
    /* Listen for iconify event */
    shell.addListener(SWT.Iconify, event -> onIconify());
    /* Listen for deactivate event */
    shell.addListener(SWT.Deactivate, event -> onDeactivate());

    if (GUI.isLinux()) {
        System.setProperty("SWT_GTK3", "0");
    }

    createEventManager();
    /* Fake ToolTip */
    fakeToolTip = new FakeToolTip();
    appMenu = createAppMenu();
    /* Sync controls with event manager */
}
 
開發者ID:openaudible,項目名稱:openaudible,代碼行數:32,代碼來源:GUI.java

示例3: start

import org.eclipse.swt.widgets.Shell; //導入方法依賴的package包/類
@Override
public Object start(final IApplicationContext appContext) throws Exception {
	final Display display = createDisplay();

	try {

		// look and see if there's a splash shell we can parent off of
		final Shell shell = WorkbenchPlugin.getSplashShell(display);
		if (shell != null) {
			// should should set the icon and message for this shell to be the
			// same as the chooser dialog - this will be the guy that lives in
			// the task bar and without these calls you'd have the default icon
			// with no message.
			shell.setText(ChooseWorkspaceDialog.getWindowTitle());
			shell.setImages(Window.getDefaultImages());
		}

		final Object instanceLocationCheck = checkInstanceLocation(shell, appContext.getArguments());
		if (instanceLocationCheck != null) {
			WorkbenchPlugin.unsetSplashShell(display);
			appContext.applicationRunning();
			return instanceLocationCheck;
		}

		// create the workbench with this advisor and run it until it exits
		// N.B. createWorkbench remembers the advisor, and also registers
		// the workbench globally so that all UI plug-ins can find it using
		// PlatformUI.getWorkbench() or AbstractUIPlugin.getWorkbench()
		final int returnCode = createAndRunWorkbench(display, new N4JSApplicationWorkbenchAdvisor());

		// the workbench doesn't support relaunch yet (bug 61809) so
		// for now restart is used, and exit data properties are checked
		// here to substitute in the relaunch return code if needed
		if (returnCode != PlatformUI.RETURN_RESTART) {
			return EXIT_OK;
		}

		// if the exit code property has been set to the relaunch code, then
		// return that code now, otherwise this is a normal restart
		return EXIT_RELAUNCH.equals(Integer.getInteger(PROP_EXIT_CODE)) ? EXIT_RELAUNCH
				: EXIT_RESTART;
	} finally {
		if (display != null) {
			display.dispose();
		}
		final Location instanceLoc = Platform.getInstanceLocation();
		if (instanceLoc != null)
			instanceLoc.release();
	}
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:51,代碼來源:N4JSApplication.java

示例4: setShellImage

import org.eclipse.swt.widgets.Shell; //導入方法依賴的package包/類
public static void setShellImage(Shell s) {
    s.setImages(appIcon);
}
 
開發者ID:openaudible,項目名稱:openaudible,代碼行數:4,代碼來源:PaintShop.java


注:本文中的org.eclipse.swt.widgets.Shell.setImages方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。