public class SimpleWebBrowser extends org.freehep.application.studio.Plugin implements FileHandler, PreferencesTopic, WebBrowser
Modifier and Type | Class and Description |
---|---|
class |
SimpleWebBrowser.WebBrowserCommands |
Constructor and Description |
---|
SimpleWebBrowser() |
Modifier and Type | Method and Description |
---|---|
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.
|
public void setAntiAlias(boolean antiAlias)
public boolean isAntiAlias()
public FileFilter getFileFilter()
FileHandler
getFileFilter
in interface FileHandler
public void setHomePage(URL homePage)
public URL getHomePage()
public org.freehep.application.ProgressMeter getProgressMeter()
public void setShowAtStart(boolean showAtStart)
public boolean isShowAtStart()
public boolean accept(File file) throws IOException
FileHandler
accept
in interface FileHandler
file
- The file to testIOException
public boolean apply(JComponent panel)
PreferencesTopic
apply
in interface PreferencesTopic
panel
- The component currently being displayedPreferencesTopic.component()
public JComponent component()
PreferencesTopic
component
in interface PreferencesTopic
public void freeProgressMeter(org.freehep.application.ProgressMeter meter)
protected void postInit()
postInit
in class org.freehep.application.studio.Plugin
protected void applicationVisible()
applicationVisible
in class org.freehep.application.studio.Plugin
public void openFile(File file) throws IOException
FileHandler
openFile
in interface FileHandler
file
- The file to openIOException
public String[] path()
PreferencesTopic
path
in interface PreferencesTopic
public void showURL(URL url, boolean external)
WebBrowser
showURL
in interface WebBrowser
url
- The URL to showexternal
- If true
display in OS specific browser, else use internal browserpublic void showURL(URL url)
WebBrowser
showURL
in interface WebBrowser
url
- The URL to showprotected void init() throws SAXException, IOException
init
in class org.freehep.application.studio.Plugin
SAXException
IOException
Copyright © 2016. All rights reserved.