org.htmlparser.parserapplications.filterbuilder.wrappers
public class TagNameFilterWrapper extends Filter implements ActionListener
Field Summary | |
---|---|
protected TagNameFilter | mFilter
The underlying filter. |
protected JComboBox | mName
Combo box for tag name. |
Constructor Summary | |
---|---|
TagNameFilterWrapper()
Create a wrapper over a new TagNameFilter. |
Method Summary | |
---|---|
boolean | accept(Node node)
Predicate to determine whether or not to keep the given node.
|
void | actionPerformed(ActionEvent event)
Invoked when an action occurs on the combo box. |
protected void | addName(Set set, Node node)
Add the tag name and it's children's tag names to the set of tag names. |
String | getDescription()
Get the name of the filter. |
String | getIconSpec()
Get the resource name for the icon. |
NodeFilter | getNodeFilter()
Get the underlying node filter object. |
NodeFilter[] | getSubNodeFilters()
Get the underlying node filter's subordinate filters. |
void | setNodeFilter(NodeFilter filter, Parser context)
Assign the underlying node filter for this wrapper. |
void | setSubNodeFilters(NodeFilter[] filters)
Assign the underlying node filter's subordinate filters. |
String | toJavaCode(StringBuffer out, int[] context)
Convert this filter into Java code.
|
Parameters: node The node to test.
Returns: true
if the node is to be kept, false
if it is to be discarded.
Parameters: event Details about the action event.
Parameters: set The set to add to. node The node to get the names from.
Returns: A descriptive name for the filter.
Returns: The icon resource specification.
Returns: The node filter object suitable for serialization.
Returns: The node filter object's contained filters.
Parameters: filter The filter to wrap. context The parser to use for conditioning this filter. Some filters need contextual information to provide to the user, i.e. for tag names or attribute names or values, so the Parser context is provided.
Parameters: filters The filters to insert into the underlying node filter.
Parameters: out The output buffer. context Three integers as follows:
Returns: The variable name to use when referencing this filter (usually "filter" + context[1]++)
HTML Parser is an open source library released under LGPL. | |