de.mud.jta.plugin
public class URLFilter extends Plugin implements FilterPlugin, VisualPlugin, java.lang.Runnable
Maintainer: Matthias L. Jugel
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
URLFilter(PluginBus bus,
java.lang.String id)
Create a new scripting plugin.
|
Modifier and Type | Method and Description |
---|---|
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.
|
protected java.util.Vector protocols
protected javax.swing.JList urlList
protected javax.swing.JPanel urlPanel
protected javax.swing.JMenu urlMenu
protected java.io.PipedInputStream pin
protected java.io.PipedOutputStream pout
protected java.applet.AppletContext context
protected FilterPlugin source
public URLFilter(PluginBus bus, java.lang.String id)
public void run()
run
in interface java.lang.Runnable
protected void showURL(java.lang.String url)
url
- the URL to displaypublic void setFilterSource(FilterPlugin plugin)
setFilterSource
in interface FilterPlugin
plugin
- the filter plugin we use as sourcepublic FilterPlugin getFilterSource()
getFilterSource
in interface FilterPlugin
public int read(byte[] b) throws java.io.IOException
read
in interface FilterPlugin
b
- the array where to read the bytes injava.io.IOException
public void write(byte[] b) throws java.io.IOException
FilterPlugin
write
in interface FilterPlugin
b
- the buffer to be sentjava.io.IOException
public javax.swing.JComponent getPluginVisual()
VisualPlugin
getPluginVisual
in interface VisualPlugin
public javax.swing.JMenu getPluginMenu()
VisualPlugin
getPluginMenu
in interface VisualPlugin