treebolic.browser
Class Context

java.lang.Object
  extended by treebolic.browser.Context
All Implemented Interfaces:
IContext

public class Context
extends java.lang.Object
implements IContext

Author:
bbou

Field Summary
private  java.lang.String theBase
          Source
private  MainFrame theBrowser
          Browser
private  java.lang.String theImageBase
          Source
private  java.lang.String theSource
          Source
private  IWidget theWidget
          Connected Widget
 
Constructor Summary
Context(MainFrame thisApplication, java.lang.String thisSource, java.lang.String thisBase, java.lang.String thisImageBase)
          Constructor
 
Method Summary
 void connect(IWidget thisWidget)
          Connected Widget
 java.net.URL getBase()
          Get base URL
protected  java.net.URL getDefaultBase()
          Get base default
protected  java.net.URL getDefaultImagesBase()
          Get images base default
 java.net.URL getHtmlDocumentBase()
          Get embedding HTML document base URL
 java.awt.Image getImage(java.net.URL thisURL)
          Get image
 java.net.URL getImagesBase()
          Get images base URL
 java.lang.String getParameter(java.lang.String thisName)
          Get parameter
 boolean linkTo(java.lang.String thisLinkUrl, java.lang.String thisLinkTarget)
          Navigate to link
protected  java.net.URL makeURL(java.lang.String thisSource)
          Make url
protected  java.net.URL makeURLAlt(java.lang.String thisSource)
          Make url
 void showStatus(java.lang.String thisString)
          Show status
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theBrowser

private final MainFrame theBrowser
Browser


theWidget

private IWidget theWidget
Connected Widget


theSource

private java.lang.String theSource
Source


theBase

private java.lang.String theBase
Source


theImageBase

private java.lang.String theImageBase
Source

Constructor Detail

Context

public Context(MainFrame thisApplication,
               java.lang.String thisSource,
               java.lang.String thisBase,
               java.lang.String thisImageBase)
Constructor

Method Detail

connect

public void connect(IWidget thisWidget)
Connected Widget


getBase

public java.net.URL getBase()
Description copied from interface: IContext
Get base URL

Specified by:
getBase in interface IContext
Returns:
base url

getImagesBase

public java.net.URL getImagesBase()
Description copied from interface: IContext
Get images base URL

Specified by:
getImagesBase in interface IContext
Returns:
images base url

getHtmlDocumentBase

public java.net.URL getHtmlDocumentBase()
Description copied from interface: IContext
Get embedding HTML document base URL

Specified by:
getHtmlDocumentBase in interface IContext
Returns:
base url

getImage

public java.awt.Image getImage(java.net.URL thisURL)
Description copied from interface: IContext
Get image

Specified by:
getImage in interface IContext
Parameters:
thisURL - url
Returns:
image

getParameter

public java.lang.String getParameter(java.lang.String thisName)
Description copied from interface: IContext
Get parameter

Specified by:
getParameter in interface IContext
Parameters:
thisName - parameter name
Returns:
parameter value

linkTo

public boolean linkTo(java.lang.String thisLinkUrl,
                      java.lang.String thisLinkTarget)
Description copied from interface: IContext
Navigate to link

Specified by:
linkTo in interface IContext
Parameters:
thisLinkUrl - link url
thisLinkTarget - link target
Returns:
true if the context handles the link, false means the current provider will re-init () with the link as source

showStatus

public void showStatus(java.lang.String thisString)
Description copied from interface: IContext
Show status

Specified by:
showStatus in interface IContext
Parameters:
thisString - message

makeURLAlt

protected java.net.URL makeURLAlt(java.lang.String thisSource)
                           throws java.net.MalformedURLException
Make url

Parameters:
thisSource - source
Returns:
url
Throws:
java.net.MalformedURLException

makeURL

protected java.net.URL makeURL(java.lang.String thisSource)
Make url

Parameters:
thisSource - source
Returns:
url

getDefaultBase

protected java.net.URL getDefaultBase()
Get base default

Returns:
base default;

getDefaultImagesBase

protected java.net.URL getDefaultImagesBase()
Get images base default

Returns:
image base default;