net.sourceforge.rssowl.util.shop
Class BrowserShop

java.lang.Object
  extended by net.sourceforge.rssowl.util.shop.BrowserShop

public class BrowserShop
extends java.lang.Object

Factory class for browser concerns in RSSOwl

Version:
1.2.4
Author:
Benjamin Pasero

Field Summary
(package private) static java.lang.String executable
          Custom browser executable and arguments
static java.lang.String IE_MOTW
          Windows only: Mark of the Web
(package private) static java.lang.String localHref
          Local link to launch
(package private) static java.lang.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 java.lang.String createBrowserError(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 java.lang.String getOwlAgent()
          Get the owl agent for the platform
static java.lang.String getUserAgent()
          Get the user agent for the platform
static void openLink(java.lang.String href)
          Open a link in the external browser
static void openLinkInTab(java.lang.String url)
          Open the given URL in a tab with the given title
(package private) static java.lang.Process openWebBrowser(java.lang.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

IE_MOTW

public static final java.lang.String IE_MOTW
Windows only: Mark of the Web

See Also:
Constant Field Values

executable

static java.lang.String executable
Custom browser executable and arguments


localHref

static java.lang.String localHref
Local link to launch


webBrowser

static java.lang.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 java.lang.String createBrowserError(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 java.lang.String getOwlAgent()
Get the owl agent for the platform

Returns:
String The owl agent

getUserAgent

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

Returns:
String The user agent

openLink

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

Parameters:
href - Any URL

openLinkInTab

public static void openLinkInTab(java.lang.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 java.lang.Process openWebBrowser(java.lang.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