net.sourceforge.rssowl.util.shop
Class BrowserShop

java.lang.Object
  extended bynet.sourceforge.rssowl.util.shop.BrowserShop

public class BrowserShop
extends Object

Factory class for browser concerns in RSSOwl

Version:
1.1.3
Author:
Benjamin Pasero

Field Summary
(package private) static String executable
          Custom browser executable and arguments
(package private) static String localHref
          Local link to launch
(package private) static String webBrowser
          Either netscape or mozilla for Linux / Solaris
(package private) static boolean webBrowserSuccessfullyOpened
          Flag to indicate a successfull launch on Linux / Solaris
 
Constructor Summary
private BrowserShop()
          This utility class constructor is hidden
 
Method Summary
static String createBrowserError(org.eclipse.swt.SWTError e)
          Create a human readable Error message from the given SWTError.
(package private) static void errorMessage()
          Display an error dialog if browser execution fails
static String getOwlAgent()
          Get the owl agent for the platform
static String getUserAgent()
          Get the user agent for the platform
static void openLink(String href)
          Open a link in the external browser
static void openLinkInTab(String url)
          Open the given URL in a tab with the given title
(package private) static Process openWebBrowser(String href)
          Open the webbrowser on Linux or Solaris
private static void useCustomBrowser()
          Use custom browser
(package private) static void useDefaultBrowser()
          Use default browser to display the URL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

executable

static String executable
Custom browser executable and arguments


localHref

static String localHref
Local link to launch


webBrowser

static String webBrowser
Either netscape or mozilla for Linux / Solaris


webBrowserSuccessfullyOpened

static boolean webBrowserSuccessfullyOpened
Flag to indicate a successfull launch on Linux / Solaris

Constructor Detail

BrowserShop

private BrowserShop()
This utility class constructor is hidden

Method Detail

createBrowserError

public static String createBrowserError(org.eclipse.swt.SWTError e)
Create a human readable Error message from the given SWTError. Point the user to the FAQ as it includes the required help.

Parameters:
e - The SWTError that occured while creating the Browser.
Returns:
String Human readable Error Message pointing to the FAQ.

getOwlAgent

public static String getOwlAgent()
Get the owl agent for the platform

Returns:
String The owl agent

getUserAgent

public static String getUserAgent()
Get the user agent for the platform

Returns:
String The user agent

openLink

public static void openLink(String href)
Open a link in the external browser

Parameters:
href - Any URL

openLinkInTab

public static void openLinkInTab(String url)
Open the given URL in a tab with the given title

Parameters:
url - The URL of the link to open

useCustomBrowser

private static void useCustomBrowser()
Use custom browser


errorMessage

static void errorMessage()
Display an error dialog if browser execution fails


openWebBrowser

static Process openWebBrowser(String href)
Open the webbrowser on Linux or Solaris

Parameters:
href - An URL
Returns:
Process The process that was executed

useDefaultBrowser

static void useDefaultBrowser()
Use default browser to display the URL



RSSOwl - RSS / RDF / Atom Newsreader

SourceForge.net Logo