Package openbook.client
Class SourceCodeBrowser
- java.lang.Object
-
- openbook.client.SourceCodeBrowser
-
public class SourceCodeBrowser extends java.lang.ObjectBrowses source code. The source code URI is resolved with respect to a root URI. The source code is expected to be in HTML format. The actual rendering of the source code can be either through an internal or an external browser.- Author:
- Pinaki Poddar
-
-
Constructor Summary
Constructors Constructor Description SourceCodeBrowser(java.lang.String root, boolean useDesktop)Construct a browser.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPage(java.lang.String key, java.lang.String path)java.io.FilegetRootDirectory()Gets the root source directory if the sources are being serverd from a local file system directory.java.net.URIgetRootURI()SourceCodeViewergetViewer()voidshowPage(java.lang.String key, java.lang.String page)Shows the given page.voidshowPage(java.lang.String key, java.net.URI uri)Shows the given page.
-
-
-
Method Detail
-
getRootURI
public java.net.URI getRootURI()
-
getRootDirectory
public java.io.File getRootDirectory()
Gets the root source directory if the sources are being serverd from a local file system directory.
-
showPage
public void showPage(java.lang.String key, java.lang.String page)Shows the given page.- Parameters:
key- key a user visible moniker for the page.page- the path of the page content w.r.t the root URI of this browser.
-
addPage
public void addPage(java.lang.String key, java.lang.String path)
-
getViewer
public SourceCodeViewer getViewer()
-
showPage
public void showPage(java.lang.String key, java.net.URI uri)Shows the given page.- Parameters:
key- a user visible moniker for the page.uri- the URI of the page content.
-
-