de.mud.jta.plugin

Class URLFilter

Implemented Interfaces:
FilterPlugin, Runnable, VisualPlugin

public class URLFilter
extends Plugin
implements FilterPlugin, VisualPlugin, Runnable

Maintainer: Matthias L. Jugel
Version:
$Id: URLFilter.java 499 2005-09-29 08:24:54Z leo $
Author:
Matthias L. Jugel, Marcus Mei???ner

Field Summary

protected AppletContext
context
protected PipedInputStream
pin
protected PipedOutputStream
pout
protected Vector
protocols
protected FilterPlugin
source
holds the data source for input and output
protected JList
urlList
protected JMenu
urlMenu
protected JPanel
urlPanel

Fields inherited from class de.mud.jta.Plugin

bus, id

Constructor Summary

URLFilter(PluginBus bus, String id)
Create a new scripting plugin.

Method Summary

FilterPlugin
getFilterSource()
JMenu
getPluginMenu()
Get the menu entry for this component.
JComponent
getPluginVisual()
Get the visible components from the plugin.
int
read(byte[] b)
Read an array of bytes from the back end and send it to the url parser to see if it matches.
void
run()
void
setFilterSource(FilterPlugin plugin)
Set the filter source where we can read data from and where to write the script answer to.
protected void
showURL(String url)
Show a URL if the applet context is available.
void
write(byte[] b)

Methods inherited from class de.mud.jta.Plugin

error, getId

Field Details

context

protected AppletContext context

pin

protected PipedInputStream pin

pout

protected PipedOutputStream pout

protocols

protected Vector protocols

source

protected FilterPlugin source
holds the data source for input and output

urlList

protected JList urlList

urlMenu

protected JMenu urlMenu

urlPanel

protected JPanel urlPanel

Constructor Details

URLFilter

public URLFilter(PluginBus bus,
                 String id)
Create a new scripting plugin.

Method Details

getFilterSource

public FilterPlugin getFilterSource()
Specified by:
getFilterSource in interface FilterPlugin

getPluginMenu

public JMenu getPluginMenu()
Get the menu entry for this component.
Specified by:
getPluginMenu in interface VisualPlugin
Returns:
a menu that can be used to change the plugin state

getPluginVisual

public JComponent getPluginVisual()
Get the visible components from the plugin.
Specified by:
getPluginVisual in interface VisualPlugin
Returns:
a component that represents the plugin

read

public int read(byte[] b)
            throws IOException
Read an array of bytes from the back end and send it to the url parser to see if it matches.
Specified by:
read in interface FilterPlugin
Parameters:
b - the array where to read the bytes in
Returns:
the amount of bytes actually read

run

public void run()

setFilterSource

public void setFilterSource(FilterPlugin plugin)
Set the filter source where we can read data from and where to write the script answer to.
Specified by:
setFilterSource in interface FilterPlugin
Parameters:
plugin - the filter plugin we use as source

showURL

protected void showURL(String url)
Show a URL if the applet context is available. We may make it later able to run a web browser or use an HTML component.
Parameters:
url - the URL to display

write

public void write(byte[] b)
            throws IOException
Specified by:
write in interface FilterPlugin