Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.greenstone.gatherer.gui.browser
Interface HTMLViewPane  view HTMLViewPane download HTMLViewPane.java

All Known Implementing Classes:
GHTMLPane

public interface HTMLViewPane

HTMLViewPane provides the interface that all implementations must adhere to. The methods shown are used by Gatherer to interact with the rendered HTML pane, and in turn recieve messages back.


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).
 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()
          In order to add the class that implements this interface to a component hierarchy you require some way to get at the component.
 javax.swing.JProgressBar getProgress()
          If called, getProgressBar should return a reference to a JProgress bar.
 boolean isReady()
          Before attempting to issue futher instructions to the HTML pane, Gatherer must first ensure that its ready.
 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.
 boolean show(org.greenstone.gatherer.util.GURL url)
          Show, in both of its forms, allows Gatherer to display a certain URL or file in the HTML pane.
 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.
 

Method Detail

addGBrowserListener

public void addGBrowserListener(GBrowserListener listener)
Add a GBrowserListener to this browser.


afterDisplay

public void afterDisplay()

back

public boolean back()
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.


canBack

public 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


canForward

public boolean canForward()
CanForward performs approximately the same duty as canBack except, of course, in the opposite direction.


canStop

public boolean canStop()
CanStop determines whether the stop functionality is available. In general you have to be doing something before you can stop it!


capture

public java.awt.image.BufferedImage capture()
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.


current

public org.greenstone.gatherer.util.GURL current()
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.


followHyperlinks

public 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. Whether this is set or not the fetch method should still be called by the HTML pane implementation apon a hyperlink click.


forward

public boolean forward()
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.


getContent

public java.awt.Component getContent()
In order to add the class that implements this interface to a component hierarchy you require some way to get at the component. This is that way.


getProgress

public javax.swing.JProgressBar getProgress()
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.


isReady

public boolean isReady()
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.


setEnabled

public void setEnabled(boolean value)
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).


removeGBrowserListener

public void removeGBrowserListener(GBrowserListener listener)
Remove a GBrowserListener from this browser.


show

public 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.


show

public boolean show(org.greenstone.gatherer.util.GURL url)
Show, in both of its forms, allows Gatherer to display a certain URL or file in the HTML pane.


stop

public boolean stop()
Stop() kills the current rendering.