|
HTML Parser Home Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent org.htmlparser.parserapplications.filterbuilder.Filter org.htmlparser.parserapplications.filterbuilder.wrappers.HasAttributeFilterWrapper
public class HasAttributeFilterWrapper
Wrapper for HasAttributeFilters.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected JComboBox |
mAttributeName
Combo box for attribute name. |
protected JTextArea |
mAttributeValue
Value to check for. |
protected HasAttributeFilter |
mFilter
The underlying filter. |
protected JCheckBox |
mValued
The check box for has value. |
Fields inherited from class org.htmlparser.parserapplications.filterbuilder.Filter |
---|
mWrappers |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
HasAttributeFilterWrapper()
Create a wrapper over a new HasAttributeFilter. |
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 |
addAttributes(Set set,
Node node)
Add the attribute names from the node to the set of attribute names. |
protected void |
addAttributeValues(Set set,
Node node)
Add the attribute values from the node to the set of attribute values. |
void |
changedUpdate(DocumentEvent e)
Handle a change update event. |
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 |
insertUpdate(DocumentEvent e)
Handle an insert update event. |
void |
removeUpdate(DocumentEvent e)
Handle a remove update event. |
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. |
Methods inherited from class org.htmlparser.parserapplications.filterbuilder.Filter |
---|
deconstitute, deserialize, getEnclosed, getIcon, instantiate, newline, pickle, reconstitute, serialize, setExpanded, setSelected, spaces, toString, unpickle, wrap |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected HasAttributeFilter mFilter
protected JComboBox mAttributeName
protected JCheckBox mValued
protected JTextArea mAttributeValue
Constructor Detail |
---|
public HasAttributeFilterWrapper()
Method Detail |
---|
protected void addAttributes(Set set, Node node)
set
- The set to add to.node
- The node with attributes to add.protected void addAttributeValues(Set set, Node node)
set
- The set to add to.node
- The node with attributes to add.public String getDescription()
getDescription
in class Filter
public String getIconSpec()
getIconSpec
in class Filter
public NodeFilter getNodeFilter()
getNodeFilter
in class Filter
public void setNodeFilter(NodeFilter filter, Parser context)
setNodeFilter
in class Filter
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.public NodeFilter[] getSubNodeFilters()
getSubNodeFilters
in class Filter
public void setSubNodeFilters(NodeFilter[] filters)
setSubNodeFilters
in class Filter
filters
- The filters to insert into the underlying node filter.public String toJavaCode(StringBuffer out, int[] context)
toJavaCode
in class Filter
out
- The output buffer.context
- Three integers as follows:
public boolean accept(Node node)
accept
in interface NodeFilter
node
- The node to test.
true
if the node is to be kept, false
if it is to be discarded.public void actionPerformed(ActionEvent event)
actionPerformed
in interface ActionListener
event
- Details about the action event.public void insertUpdate(DocumentEvent e)
insertUpdate
in interface DocumentListener
e
- Details about the insert event.public void removeUpdate(DocumentEvent e)
removeUpdate
in interface DocumentListener
e
- Details about the remove event.public void changedUpdate(DocumentEvent e)
changedUpdate
in interface DocumentListener
e
- Details about the change event.
|
© 2006 Derrick Oswald Sep 17, 2006
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
HTML Parser is an open source library released under Common Public License. |