FileDocCategorySizeDatePackage
UIFunctionsImpl.javaAPI DocAzureus 3.0.3.411088Sun Sep 23 04:57:40 BST 2007org.gudy.azureus2.ui.swt.mainwindow

UIFunctionsImpl

public class UIFunctionsImpl extends Object implements com.aelitis.azureus.ui.swt.UIFunctionsSWT
author
TuxPaper
created
Jul 12, 2006

Fields Summary
private final MainWindow
mainwindow
Constructors Summary
public UIFunctionsImpl(MainWindow mainwindow)

param
window

		this.mainwindow = mainwindow;
	
Methods Summary
public voidaddPluginView(UISWTPluginView view)

		Utils.execSWTThread(new AERunnable() {
			public void runSupport() {
				if (mainwindow.getMenu() != null) {
					mainwindow.getMenu().addPluginView(view, view.getPluginViewName());
				} else {
					Debug.out("No menu to addPluginView to");
				}
			}
		});
	
public voidaddPluginView(java.lang.String viewID, UISWTViewEventListener l)

		Utils.execSWTThread(new AERunnable() {
			public void runSupport() {
				if (mainwindow.getMenu() != null) {
					mainwindow.getMenu().addPluginView(viewID, l);
				} else {
					Debug.out("No menu to addPluginView to");
				}
			}
		});
	
public voidaddPluginView(org.gudy.azureus2.plugins.PluginView view)

		Utils.execSWTThread(new AERunnable() {
			public void runSupport() {
				if (mainwindow.getMenu() != null) {
					mainwindow.getMenu().addPluginView(view, view.getPluginViewName());
				} else {
					Debug.out("No menu to addPluginView to");
				}
			}
		});
	
public voidbringToFront()

		bringToFront(true);
	
public voidbringToFront(boolean tryTricks)

		Utils.execSWTThread(new AERunnable() {
			public void runSupport() {
				mainwindow.setVisible(true, tryTricks);
			}
		});
	
public voidcloseDownloadBars()

		Utils.execSWTThread(new AERunnable() {
			public void runSupport() {
				MiniBarManager.getManager().closeAll();
			}
		});
	
public voidcloseGlobalTransferBar()

		Utils.execSWTThread(new AERunnable() {
			public void runSupport() {
				AllTransfersBar.close(mainwindow.getGlobalManager());
			}
		});
	
public voidclosePluginView(org.gudy.azureus2.ui.swt.views.IView view)

		Utils.execSWTThread(new AERunnable() {
			public void runSupport() {
				mainwindow.closePluginView(view);
			}
		});
	
public voidclosePluginViews(java.lang.String sViewID)

		Utils.execSWTThread(new AERunnable() {
			public void runSupport() {
				mainwindow.closePluginViews(sViewID);
			}
		});
	
public booleandispose(boolean for_restart, boolean close_already_in_progress)

		return mainwindow.dispose(for_restart, close_already_in_progress);
	
public org.eclipse.swt.widgets.ShellgetMainShell()

		return mainwindow.getShell();
	
public org.eclipse.swt.widgets.MenugetMenu(int id)

		if (mainwindow.getMenu() != null) {
			return mainwindow.getMenu().getMenu(id);
		}
		return null;
	
public UISWTView[]getPluginViews()

		return mainwindow.getPluginViews();
	
public org.gudy.azureus2.ui.swt.pluginsimpl.UISWTInstanceImplgetSWTPluginInstanceImpl()

		return mainwindow.getUISWTInstanceImpl();
	
public UISWTInstancegetUISWTInstance()

		return mainwindow.getUISWTInstanceImpl();
	
public com.aelitis.azureus.ui.UIFunctionsUserPromptergetUserPrompter(java.lang.String title, java.lang.String text, java.lang.String[] buttons, int defaultOption)


		MessageBoxShell mb = new MessageBoxShell(getMainShell(), title, text,
				buttons, defaultOption);
		return mb;
	
public booleanisGlobalTransferBarShown()

		return AllTransfersBar.getManager().isOpen(mainwindow.getGlobalManager());
	
public voidopenManagerView(org.gudy.azureus2.core3.download.DownloadManager dm)

		Utils.execSWTThread(new AERunnable() {
			public void runSupport() {
				mainwindow.openManagerView(dm);
			}
		});
	
public voidopenPluginView(UISWTPluginView view)

		Utils.execSWTThread(new AERunnable() {
			public void runSupport() {
				mainwindow.openPluginView(view, view.getPluginViewName());
			}
		});
	
public voidopenPluginView(java.lang.String sParentID, java.lang.String sViewID, UISWTViewEventListener l, java.lang.Object dataSource, boolean bSetFocus)

		Utils.execSWTThread(new AERunnable() {
			public void runSupport() {
				mainwindow.openPluginView(sParentID, sViewID, l, dataSource, bSetFocus);
			}
		});
	
public voidopenPluginView(org.gudy.azureus2.ui.swt.views.AbstractIView view, java.lang.String name)

		Utils.execSWTThread(new AERunnable() {
			public void runSupport() {
				mainwindow.openPluginView(view, name);
			}
		});
	
public voidopenPluginView(org.gudy.azureus2.plugins.PluginView view)

		Utils.execSWTThread(new AERunnable() {
			public void runSupport() {
				mainwindow.openPluginView(view, view.getPluginViewName());
			}
		});
	
public intpromptUser(java.lang.String title, java.lang.String text, java.lang.String[] buttons, int defaultOption, java.lang.String rememberID, java.lang.String rememberText, boolean rememberByDefault, int autoCloseInMS)

		return MessageBoxShell.open(getMainShell(), title, text, buttons,
				defaultOption, rememberID, rememberText, rememberByDefault,
				autoCloseInMS);
	
public voidrefreshIconBar()

		Utils.execSWTThread(new AERunnable() {
			public void runSupport() {
				mainwindow.refreshIconBar();
			}
		});
	
public voidrefreshLanguage()

		Utils.execSWTThread(new AERunnable() {
			public void runSupport() {
				mainwindow.setSelectedLanguageItem();
			}
		});
	
public voidrefreshTorrentMenu()

		mainwindow.refreshTorrentMenu();
	
public voidremoveManagerView(org.gudy.azureus2.core3.download.DownloadManager dm)

		Utils.execSWTThread(new AERunnable() {
			public void runSupport() {
				mainwindow.removeManagerView(dm);
			}
		});
	
public voidremovePluginView(UISWTPluginView view)

		Utils.execSWTThread(new AERunnable() {
			public void runSupport() {
				if (mainwindow.getMenu() != null) {
					mainwindow.getMenu().removePluginView(view, view.getPluginViewName());
				}
			}
		});
	
public voidremovePluginView(java.lang.String viewID)

		Utils.execSWTThread(new AERunnable() {
			public void runSupport() {
				if (mainwindow.getMenu() != null) {
					mainwindow.getMenu().removePluginViews(viewID);
				}
			}
		});
	
public voidremovePluginView(org.gudy.azureus2.plugins.PluginView view)

		Utils.execSWTThread(new AERunnable() {
			public void runSupport() {
				if (mainwindow.getMenu() != null) {
					mainwindow.getMenu().removePluginView(view, view.getPluginViewName());
				}
			}
		});
	
public booleanrequestShutdown()

		return mainwindow.destroyRequest();
	
public voidsetStatusText(java.lang.String string)

		Utils.execSWTThread(new AERunnable() {
			public void runSupport() {
				mainwindow.setStatusText(string);
			}
		});
	
public voidsetStatusText(int statustype, java.lang.String string, com.aelitis.azureus.ui.UIStatusTextClickListener l)

		Utils.execSWTThread(new AERunnable() {
			public void runSupport() {
				mainwindow.setStatusText(statustype, string, l);
			}
		});
	
public voidshowAllPeersView()

		Utils.execSWTThread(new AERunnable() {
			public void runSupport() {
				mainwindow.showAllPeersView();
			}
		});
	
public booleanshowConfig(java.lang.String string)

		return mainwindow.showConfig(string);
	
public voidshowConsole()

		Utils.execSWTThread(new AERunnable() {
			public void runSupport() {
				mainwindow.showConsole();
			}
		});
	
public voidshowGlobalTransferBar()

		Utils.execSWTThread(new AERunnable() {
			public void runSupport() {
				AllTransfersBar.open(mainwindow.getGlobalManager(), mainwindow.getShell());
			}
		});
	
public voidshowMyShares()

		Utils.execSWTThread(new AERunnable() {
			public void runSupport() {
				mainwindow.showMyShares();
			}
		});
	
public voidshowMyTorrents()

		Utils.execSWTThread(new AERunnable() {
			public void runSupport() {
				mainwindow.showMyTorrents();
			}
		});
	
public voidshowMyTracker()

		Utils.execSWTThread(new AERunnable() {
			public void runSupport() {
				mainwindow.showMyTracker();
			}
		});
	
public voidshowStats()

		Utils.execSWTThread(new AERunnable() {
			public void runSupport() {
				mainwindow.showStats();
			}
		});
	
public voidshowStatsDHT()

		Utils.execSWTThread(new AERunnable() {
			public void runSupport() {
				mainwindow.showStatsDHT();
			}
		});
	
public voidshowStatsTransfers()

		Utils.execSWTThread(new AERunnable() {
			public void runSupport() {
				mainwindow.showStatsTransfers();
			}
		});
	
public booleanviewURL(java.lang.String url, java.lang.String target, int w, int h, boolean allowResize, boolean isModal)

		return Utils.execSWTThreadWithBool("viewURL", new AERunnableBoolean() {
			public boolean runSupport() {
				SimpleBrowserWindow window = new SimpleBrowserWindow(
						mainwindow.getShell(), url, w, h, allowResize, isModal);
				window.waitUntilClosed();
				return true;
			}
		});
	
public booleanviewURL(java.lang.String url, java.lang.String target, double w, double h, boolean allowResize, boolean isModal)

		return Utils.execSWTThreadWithBool("viewURL", new AERunnableBoolean() {
			public boolean runSupport() {
				SimpleBrowserWindow window = new SimpleBrowserWindow(
						mainwindow.getShell(), url, w, h, allowResize, isModal);
				window.waitUntilClosed();
				return true;
			}
		});