org.freehep.jas.plugin.web
Class SimpleWebBrowser

java.lang.Object
  extended by org.freehep.application.studio.Plugin
      extended by org.freehep.jas.plugin.web.SimpleWebBrowser
All Implemented Interfaces:
FileHandler, PreferencesTopic, WebBrowser

public class SimpleWebBrowser
extends org.freehep.application.studio.Plugin
implements FileHandler, PreferencesTopic, WebBrowser

Version:
$Id: SimpleWebBrowser.java 13876 2011-09-20 00:52:21Z tonyj $
Author:
tonyj

Nested Class Summary
 class SimpleWebBrowser.WebBrowserCommands
           
 
Constructor Summary
SimpleWebBrowser()
           
 
Method Summary
 boolean accept(File file)
          Returns true if this file handler is able to open the file
protected  void applicationVisible()
           
 boolean apply(JComponent panel)
          Called when the user pushes the apply button in the preferences dialog.
 JComponent component()
          Get the component to display in the preferences dialog
 void freeProgressMeter(org.freehep.application.ProgressMeter meter)
           
 FileFilter getFileFilter()
          Returns a file filter suitable for using in a FileOpen dialog.
 URL getHomePage()
           
 org.freehep.application.ProgressMeter getProgressMeter()
           
protected  void init()
           
 boolean isAntiAlias()
           
 boolean isShowAtStart()
           
 void openFile(File file)
          Opens a given file.
 String[] path()
          Specifies where in the preferences tree this item should appear.
protected  void postInit()
           
 void setAntiAlias(boolean antiAlias)
           
 void setHomePage(URL homePage)
           
 void setShowAtStart(boolean showAtStart)
           
 void showURL(URL url)
          Shows a URL in the internal browser.
 void showURL(URL url, boolean external)
          Shows a URL.
 
Methods inherited from class org.freehep.application.studio.Plugin
addMenu, canBeShutDown, getApplication, shutdown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleWebBrowser

public SimpleWebBrowser()
Method Detail

setAntiAlias

public void setAntiAlias(boolean antiAlias)

isAntiAlias

public boolean isAntiAlias()

getFileFilter

public FileFilter getFileFilter()
Description copied from interface: FileHandler
Returns a file filter suitable for using in a FileOpen dialog.

Specified by:
getFileFilter in interface FileHandler

setHomePage

public void setHomePage(URL homePage)

getHomePage

public URL getHomePage()

getProgressMeter

public org.freehep.application.ProgressMeter getProgressMeter()

setShowAtStart

public void setShowAtStart(boolean showAtStart)

isShowAtStart

public boolean isShowAtStart()

accept

public boolean accept(File file)
               throws IOException
Description copied from interface: FileHandler
Returns true if this file handler is able to open the file

Specified by:
accept in interface FileHandler
Parameters:
file - The file to test
Returns:
true if file can be opened.
Throws:
IOException

apply

public boolean apply(JComponent panel)
Description copied from interface: PreferencesTopic
Called when the user pushes the apply button in the preferences dialog. This is also called if the user changes to another preferences topic, or if the user hits OK to dismiss the preferences dialog.

Specified by:
apply in interface PreferencesTopic
Parameters:
panel - The component currently being displayed
Returns:
true if success, false if an error occured (invalid input)
See Also:
PreferencesTopic.component()

component

public JComponent component()
Description copied from interface: PreferencesTopic
Get the component to display in the preferences dialog

Specified by:
component in interface PreferencesTopic
Returns:
The component to be used.

freeProgressMeter

public void freeProgressMeter(org.freehep.application.ProgressMeter meter)

postInit

protected void postInit()
Overrides:
postInit in class org.freehep.application.studio.Plugin

applicationVisible

protected void applicationVisible()
Overrides:
applicationVisible in class org.freehep.application.studio.Plugin

openFile

public void openFile(File file)
              throws IOException
Description copied from interface: FileHandler
Opens a given file.

Specified by:
openFile in interface FileHandler
Parameters:
file - The file to open
Throws:
IOException

path

public String[] path()
Description copied from interface: PreferencesTopic
Specifies where in the preferences tree this item should appear.

Specified by:
path in interface PreferencesTopic
Returns:
The path under which this topic should be displayed in the preferences dialog.

showURL

public void showURL(URL url,
                    boolean external)
Description copied from interface: WebBrowser
Shows a URL.

Specified by:
showURL in interface WebBrowser
Parameters:
url - The URL to show
external - If true display in OS specific browser, else use internal browser

showURL

public void showURL(URL url)
Description copied from interface: WebBrowser
Shows a URL in the internal browser.

Specified by:
showURL in interface WebBrowser
Parameters:
url - The URL to show

init

protected void init()
             throws SAXException,
                    IOException
Overrides:
init in class org.freehep.application.studio.Plugin
Throws:
SAXException
IOException


Copyright © 2013. All Rights Reserved.