|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel org.openide.awt.HtmlBrowser
Object that provides viewer for HTML pages.
If all you want to do is to show some URL in the IDE's normal way, this
is overkill. Just use HtmlBrowser.URLDisplayer.showURL(java.net.URL)
instead. Using HtmlBrowser
is appropriate mainly if you want to embed a web browser in some other GUI component
(if the user has selected an external browser, this will fall back to a simple Swing
renderer). Similarly Impl
(coming from a Factory
) is the lower-level
renderer itself (sans toolbar).
Summary: for client use, try URLDisplayer.showURL
, or for more control
or where embedding is needed, create an HtmlBrowser
. For provider use,
create a Factory
and register an instance of it to lookup.
Nested Class Summary | |
static interface |
HtmlBrowser.Factory
Implementation of BrowerFactory creates new instances of some Browser implementation. |
static class |
HtmlBrowser.Impl
This interface represents an implementation of html browser used in HtmlBrowser. |
static class |
HtmlBrowser.URLDisplayer
A manager class which can display URLs in the proper way. |
Nested classes inherited from class javax.swing.JPanel |
JPanel.AccessibleJPanel |
Nested classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
static int |
DEFAULT_HEIGHT
Preferred height of the browser |
static int |
DEFAULT_WIDTH
Preferred width of the browser |
Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
HtmlBrowser()
Creates new html browser with toolbar and status line. |
|
HtmlBrowser(boolean toolbar,
boolean statusLine)
Creates new html browser. |
|
HtmlBrowser(HtmlBrowser.Factory fact,
boolean toolbar,
boolean statusLine)
Creates new html browser. |
Method Summary | |
AccessibleContext |
getAccessibleContext()
|
Component |
getBrowserComponent()
Get the browser component. |
HtmlBrowser.Impl |
getBrowserImpl()
Get the browser implementation. |
URL |
getDocumentURL()
Gets current document url. |
static String |
getHomePage()
Getter for the home page |
Dimension |
getPreferredSize()
Returns preferred size. |
boolean |
isStatusLineVisible()
Gets status line state. |
boolean |
isToolbarVisible()
Gets status toolbar. |
void |
requestFocus()
|
boolean |
requestFocusInWindow()
|
void |
setEnableHome(boolean b)
Enables/disables Home button. |
void |
setEnableLocation(boolean b)
Enables/disables location. |
static void |
setFactory(HtmlBrowser.Factory brFactory)
Deprecated. Use Lookup instead to register factories |
static void |
setHomePage(String u)
Sets the home page. |
void |
setStatusLineVisible(boolean v)
Shows/hides status line. |
void |
setToolbarVisible(boolean v)
Shows/hides toolbar. |
void |
setURL(String str)
Sets new URL. |
void |
setURL(URL url)
Sets new URL. |
Methods inherited from class javax.swing.JPanel |
getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int DEFAULT_WIDTH
public static final int DEFAULT_HEIGHT
Constructor Detail |
public HtmlBrowser()
public HtmlBrowser(boolean toolbar, boolean statusLine)
public HtmlBrowser(HtmlBrowser.Factory fact, boolean toolbar, boolean statusLine)
fact
- Factory that is used for creation. Default factory is used if null is passedtoolbar
- visibility of toolbarstatusLine
- visibility of statusLineMethod Detail |
public static void setHomePage(String u)
u
- the home pagepublic static String getHomePage()
public static void setFactory(HtmlBrowser.Factory brFactory)
public void setURL(String str)
str
- URL to show in this browser.public void setURL(URL url)
url
- URL to show in this browser.public final URL getDocumentURL()
public final void setEnableHome(boolean b)
public final void setEnableLocation(boolean b)
public boolean isStatusLineVisible()
public void setStatusLineVisible(boolean v)
public boolean isToolbarVisible()
public void setToolbarVisible(boolean v)
public final HtmlBrowser.Impl getBrowserImpl()
public final Component getBrowserComponent()
public Dimension getPreferredSize()
public void requestFocus()
public boolean requestFocusInWindow()
public AccessibleContext getAccessibleContext()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |