|
|||||||||
| Home >> All >> org >> greenstone >> gatherer >> gui >> [ browser overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.greenstone.gatherer.gui.browser
Class GHTMLPane

java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.greenstone.gatherer.gui.browser.GHTMLPane
- All Implemented Interfaces:
- javax.accessibility.Accessible, java.util.EventListener, HTMLViewPane, javax.swing.event.HyperlinkListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.PropertyChangeListener, java.io.Serializable
- public class GHTMLPane
- extends javax.swing.JPanel
- implements HTMLViewPane, javax.swing.event.HyperlinkListener, java.beans.PropertyChangeListener
- extends javax.swing.JPanel
Class Name: GHTMLPane Description: To provide a most basic implementation of the HTMLViewPane. Its rendering performance may be poor, but it will fully support all methods defined in the interface.
| Nested Class Summary |
| Nested classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
| Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
(package private) java.util.Vector |
back_pages
back_pages - Vector of pages that have been visited. |
(package private) java.lang.Object |
control
|
(package private) org.greenstone.gatherer.util.GURL |
current_url
current_page - the URL of the currently shown page. |
(package private) boolean |
follow_links
follow_links - does the class automatically follow hyperlinks. |
(package private) java.util.Vector |
forward_pages
Vector of pages that have been backed up from. |
(package private) org.greenstone.gatherer.Gatherer |
gatherer
gatherer - a reference to the main class of Gatherer for messaging. |
(package private) javax.swing.event.EventListenerList |
listeners
the list of listeners associated with this class. |
(package private) boolean |
ready
ready - has the view finished rendering the current URL. |
(package private) javax.swing.JEditorPane |
view
view - the JEditorPane the page content will be rendered on to. |
| 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.Container |
|
| 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 | |
GHTMLPane(org.greenstone.gatherer.Gatherer gatherer,
java.lang.Object control)
Constructor - collects initial settings, lays out view, renders initial URL. |
|
| Method Summary | |
void |
addGBrowserListener(GBrowserListener listener)
Add a GBrowserListener to this browser. |
void |
afterDisplay()
|
boolean |
back()
Back tells the browser to display a previous page if there is one. |
boolean |
canBack()
CanBack is used to determine if there are further pages to 'back' to, and based on the result whether the functionality should be available |
boolean |
canForward()
CanForward performs approximately the same duty as canBack except, of course, in the opposite direction. |
boolean |
canStop()
CanStop determines whether the stop functionality is available. |
java.awt.image.BufferedImage |
capture()
Capture is used to grab a buffered image of the current graphics context of the HTML pane. |
org.greenstone.gatherer.util.GURL |
current()
When called this method returns the URL of the resource currently being displayed (or rendered). |
protected void |
fireActionFailed(org.greenstone.gatherer.util.GURL url)
|
protected void |
fireControlsChanged()
|
protected void |
fireHyperlinkClick(org.greenstone.gatherer.util.GURL url)
|
protected void |
fireRenderBegun(org.greenstone.gatherer.util.GURL url)
|
protected void |
fireRenderComplete(org.greenstone.gatherer.util.GURL url)
|
protected void |
fireStatusChange(org.greenstone.gatherer.util.GURL url)
|
void |
followHyperlinks(boolean value)
This method is used to tell the HTML pane whether it should attempt to follow hyperlinks when a user clicks them. |
boolean |
forward()
Forward is a call for the HTMLViewPane implementation to move forward one page in its browser history. |
java.awt.Component |
getContent()
Since you can't add an interface to a component hierarchy this method is required to get a reference of the actual rendering component. |
javax.swing.JProgressBar |
getProgress()
If called, getProgressBar should return a reference to a JProgress bar. |
void |
hyperlinkUpdate(javax.swing.event.HyperlinkEvent event)
When a hyperlink event is fired we handle it in one of several ways, based on the event type. |
boolean |
isReady()
Before attempting to issue futher instructions to the HTML pane, Gatherer must first ensure that its ready. |
void |
propertyChange(java.beans.PropertyChangeEvent evt)
Fired after a Bean's property has changed. |
void |
removeGBrowserListener(GBrowserListener listener)
Remove a GBrowserListener from this browser. |
void |
setEnabled(boolean value)
SetEnabled is used to temporarily prevent further user interaction with the pane. |
private void |
setPage(org.greenstone.gatherer.util.GURL url)
|
boolean |
show(org.greenstone.gatherer.util.GURL url)
Precondition: ready = true |
boolean |
show(java.lang.String filename)
Show, in both of its forms, allows Gatherer to display a certain URL or file in the HTML pane. |
boolean |
stop()
Stop() kills the current rendering. |
| Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
follow_links
boolean follow_links
- follow_links - does the class automatically follow hyperlinks.
ready
boolean ready
- ready - has the view finished rendering the current URL.
listeners
javax.swing.event.EventListenerList listeners
- the list of listeners associated with this class.
gatherer
org.greenstone.gatherer.Gatherer gatherer
- gatherer - a reference to the main class of Gatherer for messaging.
view
javax.swing.JEditorPane view
- view - the JEditorPane the page content will be rendered on to.
control
java.lang.Object control
current_url
org.greenstone.gatherer.util.GURL current_url
- current_page - the URL of the currently shown page.
back_pages
java.util.Vector back_pages
- back_pages - Vector of pages that have been visited.
forward_pages
java.util.Vector forward_pages
- Vector of pages that have been backed up from.
Reset whenever a new url 'path' is entered.
| Constructor Detail |
GHTMLPane
public GHTMLPane(org.greenstone.gatherer.Gatherer gatherer, java.lang.Object control)
- Constructor - collects initial settings, lays out view, renders initial
URL.
| Method Detail |
addGBrowserListener
public void addGBrowserListener(GBrowserListener listener)
- Description copied from interface:
HTMLViewPane - Add a GBrowserListener to this browser.
- Specified by:
addGBrowserListenerin interfaceHTMLViewPane
afterDisplay
public void afterDisplay()
- Specified by:
afterDisplayin interfaceHTMLViewPane
back
public boolean back()
- Description copied from interface:
HTMLViewPane - Back tells the browser to display a previous page if there is one. All
implementations of HTMLViewPane should remember pages visited within this
session, and react appropriately to calls to this function. Any caller of
back should then immediately call canBack to determine if the function
should be enabled.
- Specified by:
backin interfaceHTMLViewPane
canBack
public boolean canBack()
- Description copied from interface:
HTMLViewPane - CanBack is used to determine if there are further pages to 'back' to, and
based on the result whether the functionality should be available
- Specified by:
canBackin interfaceHTMLViewPane
canForward
public boolean canForward()
- Description copied from interface:
HTMLViewPane - CanForward performs approximately the same duty as canBack except, of
course, in the opposite direction.
- Specified by:
canForwardin interfaceHTMLViewPane
canStop
public boolean canStop()
- Description copied from interface:
HTMLViewPane - CanStop determines whether the stop functionality is available. In general
you have to be doing something before you can stop it!
- Specified by:
canStopin interfaceHTMLViewPane
capture
public java.awt.image.BufferedImage capture()
- Description copied from interface:
HTMLViewPane - Capture is used to grab a buffered image of the current graphics context of
the HTML pane. Note that this may not actually be feasible in embedded
applications such as Mozilla, as the apllication has a seperate graphics
buffer.
- Specified by:
capturein interfaceHTMLViewPane
current
public org.greenstone.gatherer.util.GURL current()
- Description copied from interface:
HTMLViewPane - When called this method returns the URL of the resource currently being
displayed (or rendered). If no resource has been requested the return URL
is null. The URL can point to local files, web-based resources etc.
- Specified by:
currentin interfaceHTMLViewPane
followHyperlinks
public void followHyperlinks(boolean value)
- Description copied from interface:
HTMLViewPane - This method is used to tell the HTML pane whether it should attempt to
follow hyperlinks when a user clicks them. Whether this is set or not the
fetch method should still be called by the HTML pane implementation apon
a hyperlink click.
- Specified by:
followHyperlinksin interfaceHTMLViewPane
forward
public boolean forward()
- Description copied from interface:
HTMLViewPane - Forward is a call for the HTMLViewPane implementation to move forward one
page in its browser history. It should react appropriately to calls to this
method and should retain a history of forward pages.
- Specified by:
forwardin interfaceHTMLViewPane
getContent
public java.awt.Component getContent()
- Since you can't add an interface to a component hierarchy this method is required to get a reference of the actual rendering component.
- Specified by:
getContentin interfaceHTMLViewPane
getProgress
public javax.swing.JProgressBar getProgress()
- Description copied from interface:
HTMLViewPane - If called, getProgressBar should return a reference to a JProgress bar. The
HTML pane is then resposible for updating the progress bar for its lifetime
whereapon the caller will dispose of it. If no page is currently being
downloaded/rendered then the call should return null.
- Specified by:
getProgressin interfaceHTMLViewPane
hyperlinkUpdate
public void hyperlinkUpdate(javax.swing.event.HyperlinkEvent event)
- When a hyperlink event is fired we handle it in one of several ways,
based on the event type. Enters and exits get fired off as messages to
the listeners so they can update their status bars. Clicks also fire
status changes, but their event messages include the GURLs incase we
to do something special to them. Furthermore if follow hyperlinks is
set the browser is responsible for loading up the newly designated url.
- Specified by:
hyperlinkUpdatein interfacejavax.swing.event.HyperlinkListener
isReady
public boolean isReady()
- Description copied from interface:
HTMLViewPane - Before attempting to issue futher instructions to the HTML pane, Gatherer must first ensure that its ready. A pane should always be responsive but there are foreseeable times when an interrupt to go to a new page may cause the renderer to become unstable, or perhaps a user is filling out a form and thus shouldn't be pre-empted.
- Specified by:
isReadyin interfaceHTMLViewPane
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent evt)
- Description copied from interface:
java.beans.PropertyChangeListener - Fired after a Bean's property has changed.
- Specified by:
propertyChangein interfacejava.beans.PropertyChangeListener
removeGBrowserListener
public void removeGBrowserListener(GBrowserListener listener)
- Description copied from interface:
HTMLViewPane - Remove a GBrowserListener from this browser.
- Specified by:
removeGBrowserListenerin interfaceHTMLViewPane
setEnabled
public void setEnabled(boolean value)
- Description copied from interface:
HTMLViewPane - SetEnabled is used to temporarily prevent further user interaction with the
pane. This may be caused by certain user requests in other parts of Gatherer
or is called when a modal dialogue is opened by the Gatherer application.
Any implementation of setEnabled should in turn call an equivent method
within its subcomponents and update its appearance to indicate its current
state (ie greyed out boxes or background, wait cursor).
- Specified by:
setEnabledin interfaceHTMLViewPane
show
public boolean show(java.lang.String filename)
- Description copied from interface:
HTMLViewPane - Show, in both of its forms, allows Gatherer to display a certain URL or file
in the HTML pane.
- Specified by:
showin interfaceHTMLViewPane
show
public boolean show(org.greenstone.gatherer.util.GURL url)
- Precondition: ready = true
- Specified by:
showin interfaceHTMLViewPane
stop
public boolean stop()
- Description copied from interface:
HTMLViewPane - Stop() kills the current rendering.
- Specified by:
stopin interfaceHTMLViewPane
fireActionFailed
protected void fireActionFailed(org.greenstone.gatherer.util.GURL url)
fireControlsChanged
protected void fireControlsChanged()
fireHyperlinkClick
protected void fireHyperlinkClick(org.greenstone.gatherer.util.GURL url)
fireRenderBegun
protected void fireRenderBegun(org.greenstone.gatherer.util.GURL url)
fireRenderComplete
protected void fireRenderComplete(org.greenstone.gatherer.util.GURL url)
fireStatusChange
protected void fireStatusChange(org.greenstone.gatherer.util.GURL url)
setPage
private void setPage(org.greenstone.gatherer.util.GURL url)
|
|||||||||
| Home >> All >> org >> greenstone >> gatherer >> gui >> [ browser overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC