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

Quick Search    Search Deep

org.greenstone.gatherer.gui.browser
Class GBrowserEvent  view GBrowserEvent download GBrowserEvent.java

java.lang.Object
  extended byjava.util.EventObject
      extended byjava.awt.AWTEvent
          extended byorg.greenstone.gatherer.gui.browser.GBrowserEvent
All Implemented Interfaces:
java.io.Serializable

public class GBrowserEvent
extends java.awt.AWTEvent

A GBrowserEvent is an event fired by one of Gatherers HTMLViewPane browser implementations. They come in two flavours; GURL events contain a url which the message is about and may have an associated message String, while pure message events contain only a String.


Field Summary
private  java.lang.String message
          The message payload of this event.
private  javax.swing.JProgressBar progress
           
private  org.greenstone.gatherer.util.GURL url
          The url payload of this event.
 
Fields inherited from class java.awt.AWTEvent
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, id, INPUT_METHOD_EVENT_MASK, INVOCATION_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, MOUSE_WHEEL_EVENT_MASK, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK, WINDOW_FOCUS_EVENT_MASK, WINDOW_STATE_EVENT_MASK
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
GBrowserEvent(java.lang.Object source, int id, org.greenstone.gatherer.util.GURL url)
          This contructor is used to pass events about GURLs out to its listeners.
GBrowserEvent(java.lang.Object source, int id, org.greenstone.gatherer.util.GURL url, java.lang.String message)
          This contructor is used to pass events about GURLs out to its listeners.
GBrowserEvent(java.lang.Object source, int id, java.lang.String message)
          This constructor is used to pass message events out to its listeners.
 
Method Summary
 java.lang.String getMessage()
          Used to get the String message contained within this event.
 org.greenstone.gatherer.util.GURL getURL()
          Used to get the GURL contained within this event.
 boolean hasProgress()
          Returns a boolean showing whether it is legal to request this GURLs progress bar.
 
Methods inherited from class java.awt.AWTEvent
consume, getID, isConsumed, paramString, setSource, toString
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

url

private org.greenstone.gatherer.util.GURL url
The url payload of this event.


progress

private javax.swing.JProgressBar progress

message

private java.lang.String message
The message payload of this event.

Constructor Detail

GBrowserEvent

public GBrowserEvent(java.lang.Object source,
                     int id,
                     org.greenstone.gatherer.util.GURL url)
This contructor is used to pass events about GURLs out to its listeners. The source and id are needed by the super class of AWTEvents but the url is specific to this class.


GBrowserEvent

public GBrowserEvent(java.lang.Object source,
                     int id,
                     org.greenstone.gatherer.util.GURL url,
                     java.lang.String message)
This contructor is used to pass events about GURLs out to its listeners. The source and id are needed by the super class of AWTEvents but the url and message are specific to this class.


GBrowserEvent

public GBrowserEvent(java.lang.Object source,
                     int id,
                     java.lang.String message)
This constructor is used to pass message events out to its listeners. It is much the same as the first constructor, however instead of a GURL as payload, we instead have a message String.

Method Detail

getURL

public org.greenstone.gatherer.util.GURL getURL()
Used to get the GURL contained within this event.


getMessage

public java.lang.String getMessage()
Used to get the String message contained within this event.


hasProgress

public boolean hasProgress()
Returns a boolean showing whether it is legal to request this GURLs progress bar. All GURLs have progress bars, but only those spawned in GHTMLPanes etc will actually have their progress bars updated. Webclient does not yet support this functionality but will eventually via the DocumentProgressEvent.