|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.lobobrowser.gui.BrowserPanel
public class BrowserPanel
A BrowserPanel contains a FramePanel along
with optional address bar, toolbars, menu bar and status bar.
Invoke navigate(String) to load a document into the
top frame of the BrowserPanel.
PlatformInit.init(boolean, boolean),
Serialized Form| Nested Class Summary | |
|---|---|
class |
BrowserPanel.LocalEventDispatch
|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
javax.swing.JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
javax.swing.JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
java.awt.Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary |
|---|
| 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 | |
|---|---|
BrowserPanel()
Constructs a BrowserPanel with
toolbars, an address bar, a status bar, but
no menu bar. |
|
BrowserPanel(javax.swing.JMenuBar menuBar)
Constructs a BrowserPanel with a menu bar,
toolbars, an address bar and a status bar. |
|
BrowserPanel(javax.swing.JMenuBar menuBar,
boolean hasAddressBar,
boolean hasToolBar,
boolean hasStatusBar)
Constructs a BrowserPanel with optional menu bar,
toolbars, an address bar and a status bar. |
|
| Method Summary | |
|---|---|
void |
addAddressBarComponent(java.awt.Component addressBarComponent)
Adds a component to the address bar. |
void |
addContentListener(ContentListener listener)
Adds a listener of content events. |
void |
addMenu(java.lang.String menuId,
javax.swing.JMenu menu)
Adds a top-level menu to the window. |
void |
addNavigationListener(NavigationListener listener)
Adds a listener of navigation events, applicable only to the top frame. |
void |
addNavigatorWindowListener(NavigatorWindowListener listener)
Adds a listener of window events. |
void |
addResponseListener(ResponseListener listener)
Adds a listener of response events. |
void |
addSharedToolBarComponent(java.awt.Component toolBarComponent)
Adds a component to the shared tool bar. |
void |
addStatusBarComponent(java.awt.Component statusBarComponent)
Adds a component to the status bar. |
void |
addToolBar(java.awt.Component toolBar)
Adds a "tool bar" component to the window. |
boolean |
back()
|
boolean |
canBack()
|
boolean |
canCopy()
|
boolean |
canForward()
|
boolean |
canReload()
|
boolean |
copy()
|
java.awt.Component |
createGap()
Creates a gap component that should be placed between toolbar, address bar or status bar components. |
java.awt.Component |
createGlueComponent(java.awt.Component wrappedComponent,
boolean usingMaxSize)
Creates a component wrapper that expands to fill its parent's available space. |
void |
dispose()
Disposes the current BrowserPanel. |
boolean |
forward()
|
java.awt.Window |
getAwtWindow()
Gets the java.awt.Frame instance associated
with this NavigatorWindow. |
NavigationEntry[] |
getBackNavigationEntries()
|
java.awt.Component |
getComponent()
Gets a component that may be used as a parent of prompt dialogs during requests. |
ComponentContent |
getComponentContent()
Gets the component content currently set in the frame. |
java.lang.Object |
getContentObject()
Gets an object that is used to represent the current frame content. |
java.lang.String |
getCurrentMimeType()
Gets a mime type that goes with the object returned by FramePanel.getContentObject(). |
NavigationEntry |
getCurrentNavigationEntry()
|
java.lang.String |
getDefaultStatus()
Gets the current default status message or null
if there's no default. |
java.lang.String |
getDocumentTitle()
Gets the recommended title of the document currently in the top frame. |
NavigationEntry[] |
getForwardNavigationEntries()
|
javax.swing.JMenu |
getMenu(java.lang.String menuId)
Gets a menu previously added, typically by another extension with higher priority. |
java.lang.String |
getStatus()
Gets the current window status message. |
NavigatorFrame |
getTopFrame()
Gets the top frame of this window. |
FramePanel |
getTopFramePanel()
Gets the root FramePanel of the window. |
UserAgent |
getUserAgent()
Gets the navigator for the window. |
WindowCallback |
getWindowCallback()
Gets a WindowCallback instance that receives
navigation notifications. |
protected java.lang.String |
getWindowTitle(ClientletResponse response,
ComponentContent content)
|
boolean |
goTo(NavigationEntry entry)
Navigates to a NavigationEntry
belonging to navigation history in the current session. |
void |
handleDocumentAccess(NavigatorFrame frame,
ClientletResponse response)
Called when a document has been accessed, but has not yet rendered. |
void |
handleDocumentRendering(NavigatorFrame frame,
ClientletResponse response,
ComponentContent content)
Called when the document has either rendered or is beginning to be incrementally rendered. |
void |
handleError(NavigatorFrame frame,
ClientletResponse response,
java.lang.Throwable exception)
Invoked when there's a request error. |
boolean |
hasSource()
|
boolean |
isCloseWindowOnDispose()
Returns a value indicating whether the parent window is closed when the current BrowserPanel
is disposed. |
void |
navigate(java.lang.String urlOrPath)
Navigates to the URL or path provided. |
void |
navigate(java.net.URL url)
Navigates to the URL provided. |
boolean |
reload()
|
void |
removeContentListener(ContentListener listener)
|
void |
removeNavigationListener(NavigationListener listener)
Removes a listener of navigation events previously added with addNavigationListener(NavigationListener). |
void |
removeNavigatorWindowListener(NavigatorWindowListener listener)
Removes a listener previously added with NavigatorWindow.addNavigatorWindowListener(NavigatorWindowListener) |
void |
removeResponseListener(ResponseListener listener)
|
void |
setCloseWindowOnDispose(boolean closeWindowOnDispose)
Sets a flag indicating whether the parent window should be closed when the current BrowserPanel is disposed. |
void |
setDefaultStatus(NavigatorFrame frame,
java.lang.String defaultStatus)
Called to set a default status message. |
void |
setDocumentTitle(java.lang.String documentTitle)
|
void |
setStatus(NavigatorFrame frame,
java.lang.String value)
Called to set a status message. |
boolean |
stop()
|
void |
updateProgress(NavigatorProgressEvent event)
Updates request progress. |
void |
windowClosing()
Invoke this method when the window that owns the BrowserPanel is about to close. |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class javax.swing.JComponent |
|---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
|---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
|---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BrowserPanel()
BrowserPanel with
toolbars, an address bar, a status bar, but
no menu bar.
public BrowserPanel(javax.swing.JMenuBar menuBar)
BrowserPanel with a menu bar,
toolbars, an address bar and a status bar.
menuBar - A JMenuBar instance presumably
set on a JFrame.
public BrowserPanel(javax.swing.JMenuBar menuBar,
boolean hasAddressBar,
boolean hasToolBar,
boolean hasStatusBar)
BrowserPanel with optional menu bar,
toolbars, an address bar and a status bar.
menuBar - A JMenuBar instance presumably
set on a JFrame.hasAddressBar - Whether the panel has an address bar.hasToolBar - Whether the panel has toolbars.hasStatusBar - Whether the panel has a status bar.| Method Detail |
|---|
public void windowClosing()
BrowserPanel is about to close.
This should be done in order to inform
extensions about the window closing.
public void navigate(java.lang.String urlOrPath)
throws java.net.MalformedURLException
urlOrPath - An absolute URL or file path.
java.net.MalformedURLException
public void navigate(java.net.URL url)
throws java.net.MalformedURLException
url - A URL.
java.net.MalformedURLExceptionpublic void addAddressBarComponent(java.awt.Component addressBarComponent)
org.lobobrowser.ua.NavigatorWindow
addAddressBarComponent in interface NavigatorWindowNavigatorWindow.createGlueComponent(Component, boolean)
public void addMenu(java.lang.String menuId,
javax.swing.JMenu menu)
org.lobobrowser.ua.NavigatorWindow
addMenu in interface NavigatorWindowmenuId - A globally unique ID for the menu.menu - A JMenu instance.NavigatorWindow.getMenu(String)public void addNavigatorWindowListener(NavigatorWindowListener listener)
org.lobobrowser.ua.NavigatorWindow
addNavigatorWindowListener in interface NavigatorWindowlistener - A listener instance.public void addSharedToolBarComponent(java.awt.Component toolBarComponent)
org.lobobrowser.ua.NavigatorWindow
addSharedToolBarComponent in interface NavigatorWindowNavigatorWindow.createGlueComponent(Component, boolean)public void addStatusBarComponent(java.awt.Component statusBarComponent)
org.lobobrowser.ua.NavigatorWindow
addStatusBarComponent in interface NavigatorWindowNavigatorWindow.createGlueComponent(Component, boolean)public void addToolBar(java.awt.Component toolBar)
org.lobobrowser.ua.NavigatorWindow
addToolBar in interface NavigatorWindowtoolBar - A AWT or Swing lightweight.public boolean back()
back in interface NavigatorWindowpublic boolean canBack()
canBack in interface NavigatorWindowpublic boolean canCopy()
canCopy in interface NavigatorWindowpublic boolean canForward()
canForward in interface NavigatorWindowpublic boolean canReload()
canReload in interface NavigatorWindowpublic boolean copy()
copy in interface NavigatorWindowpublic java.awt.Component createGap()
org.lobobrowser.ua.NavigatorWindow
createGap in interface NavigatorWindow
public java.awt.Component createGlueComponent(java.awt.Component wrappedComponent,
boolean usingMaxSize)
org.lobobrowser.ua.NavigatorWindowBoxLayout. Examples of components that are wrapped this way
are the address combo box and the status message component.
createGlueComponent in interface NavigatorWindowwrappedComponent - The component that is wrapped by the
glue box.usingMaxSize - Whether the adjacent components have
a maximum size that the container
should try to use. If this
argument is false, it is
assumed that the adjacent components can
be shrunk to their minimum sizes.public boolean isCloseWindowOnDispose()
BrowserPanel
is disposed.
setCloseWindowOnDispose(boolean)public void setCloseWindowOnDispose(boolean closeWindowOnDispose)
BrowserPanel is disposed.
The BrowserPanel is normally disposed by
the standard File/Exit menu and equivalent actions.
The default value of the flag is true.
closeWindowOnDispose - A boolean value.dispose()public void dispose()
BrowserPanel. This method is
normally activated by the standard File/Exit menu.
dispose in interface NavigatorWindowsetCloseWindowOnDispose(boolean)public boolean forward()
forward in interface NavigatorWindowpublic java.awt.Window getAwtWindow()
org.lobobrowser.ua.NavigatorWindowjava.awt.Frame instance associated
with this NavigatorWindow. In most cases this method
will return an instance of javax.swing.JFrame.
getAwtWindow in interface NavigatorWindowpublic NavigationEntry[] getBackNavigationEntries()
getBackNavigationEntries in interface NavigatorWindowpublic NavigationEntry getCurrentNavigationEntry()
getCurrentNavigationEntry in interface NavigatorWindowpublic NavigationEntry[] getForwardNavigationEntries()
getForwardNavigationEntries in interface NavigatorWindowpublic javax.swing.JMenu getMenu(java.lang.String menuId)
org.lobobrowser.ua.NavigatorWindow
getMenu in interface NavigatorWindowmenuId - The unique ID of the menu. The convention
in Lobo is to use "lobo." followed by the
name of the menu in lower case, with any
spaces converted to dots. For example,
the ID of the File menu should be
"lobo.file". The ID of the Page Services
menu should be "lobo.page.services".
public NavigatorFrame getTopFrame()
org.lobobrowser.ua.NavigatorWindow
getTopFrame in interface NavigatorWindowpublic UserAgent getUserAgent()
org.lobobrowser.ua.NavigatorWindow
getUserAgent in interface NavigatorWindowpublic boolean goTo(NavigationEntry entry)
org.lobobrowser.ua.NavigatorWindowNavigationEntry
belonging to navigation history in the current session.
without generating a new entry, in much the same
way that NavigatorWindow.back() and NavigatorWindow.forward() work.
goTo in interface NavigatorWindowentry - A existing NavigationEntry.
public boolean hasSource()
hasSource in interface NavigatorWindowpublic boolean reload()
reload in interface NavigatorWindowpublic void removeNavigatorWindowListener(NavigatorWindowListener listener)
org.lobobrowser.ua.NavigatorWindowNavigatorWindow.addNavigatorWindowListener(NavigatorWindowListener)
removeNavigatorWindowListener in interface NavigatorWindowpublic boolean stop()
stop in interface NavigatorWindowpublic FramePanel getTopFramePanel()
BrowserWindowFramePanel of the window.
getTopFramePanel in interface BrowserWindowpublic WindowCallback getWindowCallback()
BrowserWindowWindowCallback instance that receives
navigation notifications. This method may
return null.
getWindowCallback in interface BrowserWindowpublic java.awt.Component getComponent()
WindowCallback
getComponent in interface WindowCallbackpublic java.lang.String getDefaultStatus()
WindowCallbacknull
if there's no default.
getDefaultStatus in interface WindowCallbackpublic java.lang.String getStatus()
WindowCallback
getStatus in interface WindowCallback
public void handleDocumentAccess(NavigatorFrame frame,
ClientletResponse response)
WindowCallback
handleDocumentAccess in interface WindowCallback
public void handleDocumentRendering(NavigatorFrame frame,
ClientletResponse response,
ComponentContent content)
WindowCallback
handleDocumentRendering in interface WindowCallback
protected java.lang.String getWindowTitle(ClientletResponse response,
ComponentContent content)
public java.lang.String getDocumentTitle()
public void setDocumentTitle(java.lang.String documentTitle)
public void handleError(NavigatorFrame frame,
ClientletResponse response,
java.lang.Throwable exception)
WindowCallback
handleError in interface WindowCallback
public void setDefaultStatus(NavigatorFrame frame,
java.lang.String defaultStatus)
WindowCallback
setDefaultStatus in interface WindowCallback
public void setStatus(NavigatorFrame frame,
java.lang.String value)
WindowCallback
setStatus in interface WindowCallbackpublic void updateProgress(NavigatorProgressEvent event)
WindowCallback
updateProgress in interface WindowCallbackpublic java.lang.Object getContentObject()
org.w3c.dom.html2.HTMLDocument.
public java.lang.String getCurrentMimeType()
FramePanel.getContentObject().
This is not necessarily the same as the mime type declared in the headers
of the response that produced the current content.
public void addNavigationListener(NavigationListener listener)
listener - The listener.FramePanel.addNavigationListener(NavigationListener),
FramePanelFactorySourcepublic void removeNavigationListener(NavigationListener listener)
addNavigationListener(NavigationListener).
listener - The listener.public void addContentListener(ContentListener listener)
listener - The listener.getComponentContent()public void removeContentListener(ContentListener listener)
public void addResponseListener(ResponseListener listener)
listener - The listener.public void removeResponseListener(ResponseListener listener)
public ComponentContent getComponentContent()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||