use of com.biglybt.ui.swt.browser.listener.VuzeListener in project BiglyBT by BiglySoftware.
the class SWTSkinObjectBrowser method init.
public void init() {
if (browser != null && !browser.isDisposed()) {
return;
}
try {
browser = BrowserWrapper.createBrowser(cArea, SWT.NONE);
browser.setLayoutData(Utils.getFilledFormData());
browser.getParent().layout(true);
} catch (SWTError e) {
System.err.println("Browser: " + e.toString());
return;
}
Control widgetIndicator = null;
String sIndicatorWidgetID = properties.getStringValue(sConfigID + ".indicator");
if (sIndicatorWidgetID != null) {
SWTSkinObject skinObjectIndicator = skin.getSkinObjectByID(sIndicatorWidgetID);
if (skinObjectIndicator != null) {
widgetIndicator = skinObjectIndicator.getControl();
}
}
String browserID = properties.getStringValue(sConfigID + ".view");
if (browserID == null) {
browserID = sID;
}
forceVisibleAfterLoad = properties.getBooleanValue(sConfigID + ".forceVisibleAfterLoad", true);
context = new BrowserContext(browserID, browser, widgetIndicator, forceVisibleAfterLoad);
if (autoReloadPending) {
context.setAutoReloadPending(autoReloadPending, false);
}
boolean noListeners = properties.getBooleanValue(sConfigID + ".browser.nolisteners", false);
if (!noListeners) {
context.addMessageListener(new TorrentListener());
context.addMessageListener(new VuzeListener());
context.addMessageListener(new DisplayListener());
context.addMessageListener(new ConfigListener(browser));
}
boolean popouts = properties.getBooleanValue(sConfigID + ".browser.allowPopouts", true);
context.setAllowPopups(popouts);
String[] whitelist_urls = properties.getStringArray(sConfigID + ".browser.popoutWhitelist", null);
if (whitelist_urls != null) {
context.setPopoutWhitelist(whitelist_urls);
}
String[] blacklist_urls = properties.getStringArray(sConfigID + ".browser.popoutBlacklist", null);
if (blacklist_urls != null) {
context.setPopoutBlacklist(blacklist_urls);
}
context.addListener(new BrowserContext.loadingListener() {
@Override
public void browserLoadingChanged(boolean loading, String url) {
if (loading && browser.isVisible()) {
// hack so search results page doesn't clear cur selected
if (UrlFilter.getInstance().urlCanRPC(url)) {
SelectedContentManager.clearCurrentlySelectedContent();
}
}
}
});
String url = urlToUse != null ? urlToUse : sStartURL != null ? sStartURL : properties.getStringValue(sConfigID + ".url", (String) null);
if (url != null) {
setURL(url);
}
}
use of com.biglybt.ui.swt.browser.listener.VuzeListener in project BiglyBT by BiglySoftware.
the class Initializer method initializePlatformClientMessageContext.
/**
* @since 3.0.5.3
*/
private void initializePlatformClientMessageContext() {
ClientMessageContext clientMsgContext = PlatformMessenger.getClientMessageContext();
if (clientMsgContext != null) {
clientMsgContext.setMessageDispatcher(new MessageDispatcherSWT(clientMsgContext));
clientMsgContext.addMessageListener(new TorrentListener());
clientMsgContext.addMessageListener(new VuzeListener());
clientMsgContext.addMessageListener(new DisplayListener());
clientMsgContext.addMessageListener(new ConfigListener(null));
}
}
Aggregations