Class Scanner

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----java.applet.Applet
                                   |
                                   +----Scanner

public class Scanner
extends Applet
implements Runnable

Constructor Index

 o Scanner()

Method Index

 o clearList()
clearList() is used to clear the contents of the lists and vectors of HREFs and SRCs
 o handleEvent(Event)
handleEvent(Event) is invoked when an Event is generated. Deprecated.
 o init()
init() is invoked when the applet is initialized
 o paint(Graphics)
paint(Graphics) is invoked when repainting the applet
 o parse(String)
parse(String) checks the parameters content type and decides which action should be performed
 o parseAUDIO()
parseAUDIO() starts a new thread that plays a soundfile
 o parseHTML()
parseHTML() parses the content of a html document for HREFs and SRCs
 o parseHTML(String, String)
parseHTML(String, String) parses a string depending on a delimiter
 o parseIMAGE(String)
parseIMAGE() fetches an image and shows the image in a frame
 o parseURL(String, String)
parseURL(String, String) parses the rest of a string depending on a delimiter
 o refreshList()
refreshList() is used to fill the contents of the lists and vectors with HREFs and SRCs
 o run()
run() is invoked when the applet starts
 o start()
start() is invoked when the applet starts
 o stop()
stop() is invoked when the applet stops
 o update(Graphics)
update(Graphics) is invoked when repainting the applet

Constructors

 o Scanner
  public Scanner()

Methods

 o init
  public void init()
init() is invoked when the applet is initialized

Overrides:
init in class Applet
 o start
  public void start()
start() is invoked when the applet starts

Overrides:
start in class Applet
 o stop
  public void stop()
stop() is invoked when the applet stops

Overrides:
stop in class Applet
 o run
  public void run()
run() is invoked when the applet starts

 o handleEvent
  public boolean handleEvent(Event e)
Note: handleEvent() is deprecated. handleEvent() is replaced by actionPerformed() in Java 1.1

handleEvent(Event) is invoked when an Event is generated. This method is deprecated in Java 1.1 and has been replaced by actionPerformed()

Parameters:
e - the Event
Returns:
true if handled
Overrides:
handleEvent in class Component
 o parse
  public void parse(String string)
parse(String) checks the parameters content type and decides which action should be performed

Parameters:
string - the string that is about to be parsed
 o parseAUDIO
  public void parseAUDIO()
parseAUDIO() starts a new thread that plays a soundfile

 o parseIMAGE
  public void parseIMAGE(String type)
parseIMAGE() fetches an image and shows the image in a frame

Parameters:
type - the image type
 o parseHTML
  public void parseHTML()
parseHTML() parses the content of a html document for HREFs and SRCs

 o parseHTML
  public void parseHTML(String delimiter,
                        String string)
parseHTML(String, String) parses a string depending on a delimiter

Parameters:
delimiter - the delimiter "HREF=" or "SRC="
string - the string to be delimited
 o parseURL
  public void parseURL(String delimiter,
                       String string)
parseURL(String, String) parses the rest of a string depending on a delimiter

Parameters:
delimiter - the delimiter "HREF=" or "SRC="
string - the string to be delimited
 o paint
  public void paint(Graphics g)
paint(Graphics) is invoked when repainting the applet

Parameters:
g - the Graphics object
Overrides:
paint in class Container
 o update
  public void update(Graphics g)
update(Graphics) is invoked when repainting the applet

Parameters:
g - the Graphics object
Overrides:
update in class Component
 o clearList
  public void clearList()
clearList() is used to clear the contents of the lists and vectors of HREFs and SRCs

 o refreshList
  public void refreshList()
refreshList() is used to fill the contents of the lists and vectors with HREFs and SRCs