|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | 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 TopManager.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 BrowserComponent
provides a dockable window with
the same, and Impl
(coming from a Factory
) is the lower-level
renderer itself (sans toolbar).
Summary: for client use, try TopManager.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.
Inner Class Summary | |
static class |
HtmlBrowser.BrowserComponent
|
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. |
Inner classes inherited from class javax.swing.JPanel |
JPanel.AccessibleJPanel |
Inner classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
Inner classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
Inner classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent |
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()
|
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()
|
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 |
getUIClassID, paramString, updateUI |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree |
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)
str
- 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 Dimension getPreferredSize()
getPreferredSize
in class JComponent
public void requestFocus()
requestFocus
in class JComponent
public AccessibleContext getAccessibleContext()
getAccessibleContext
in class JPanel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |