de.mud.jta.plugin
Class URLFilter
java.lang.Object
|
+--de.mud.jta.Plugin
|
+--de.mud.jta.plugin.URLFilter
- All Implemented Interfaces:
- FilterPlugin, java.lang.Runnable, VisualPlugin
- public class URLFilter
- extends Plugin
- implements FilterPlugin, VisualPlugin, java.lang.Runnable
Maintainer: Matthias L. Jugel
- Version:
- $Id: URLFilter.java,v 1.7 2002/05/06 07:24:20 leo Exp $
- Author:
- Matthias L. Jugel, Marcus Meißner
Field Summary |
protected java.applet.AppletContext |
context
|
protected java.io.PipedInputStream |
pin
|
protected java.io.PipedOutputStream |
pout
|
protected java.util.Vector |
protocols
|
protected FilterPlugin |
source
holds the data source for input and output |
protected javax.swing.JList |
urlList
|
protected javax.swing.JMenu |
urlMenu
|
protected javax.swing.JPanel |
urlPanel
|
Constructor Summary |
URLFilter(PluginBus bus,
java.lang.String id)
Create a new scripting plugin. |
Method Summary |
FilterPlugin |
getFilterSource()
|
javax.swing.JMenu |
getPluginMenu()
Get the menu entry for this component. |
javax.swing.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(java.lang.String url)
Show a URL if the applet context is available. |
void |
write(byte[] b)
Write a block of data to the back end. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
protocols
protected java.util.Vector protocols
urlList
protected javax.swing.JList urlList
urlPanel
protected javax.swing.JPanel urlPanel
urlMenu
protected javax.swing.JMenu urlMenu
pin
protected java.io.PipedInputStream pin
pout
protected java.io.PipedOutputStream pout
context
protected java.applet.AppletContext context
source
protected FilterPlugin source
- holds the data source for input and output
URLFilter
public URLFilter(PluginBus bus,
java.lang.String id)
- Create a new scripting plugin.
run
public void run()
- Specified by:
run
in interface java.lang.Runnable
showURL
protected void showURL(java.lang.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
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
getFilterSource
public FilterPlugin getFilterSource()
- Specified by:
getFilterSource
in interface FilterPlugin
read
public int read(byte[] b)
throws java.io.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
write
public void write(byte[] b)
throws java.io.IOException
- Description copied from interface:
FilterPlugin
- Write a block of data to the back end.
- Specified by:
write
in interface FilterPlugin
- Following copied from interface:
de.mud.jta.FilterPlugin
- Parameters:
b
- the buffer to be sent
getPluginVisual
public javax.swing.JComponent getPluginVisual()
- Description copied from interface:
VisualPlugin
- Get the visible components from the plugin.
- Specified by:
getPluginVisual
in interface VisualPlugin
- Following copied from interface:
de.mud.jta.VisualPlugin
- Returns:
- a component that represents the plugin
getPluginMenu
public javax.swing.JMenu getPluginMenu()
- Description copied from interface:
VisualPlugin
- Get the menu entry for this component.
- Specified by:
getPluginMenu
in interface VisualPlugin
- Following copied from interface:
de.mud.jta.VisualPlugin
- Returns:
- a menu that can be used to change the plugin state