org.htmlparser.parserapplications.filterbuilder
Class SubFilterList
JPanel
org.htmlparser.parserapplications.filterbuilder.SubFilterList
public class SubFilterList
extends JPanel
A helper class for lists of filters within filters.
protected int | mExtra - Padding for the drop target.
|
protected Filter | mHome - The parent filter wrapper.
|
protected int | mMax - The number of filters limit.
|
protected Component | mSpacer - The drop target spacer at the bottom of the list.
|
protected String | mTitle - The textual title for the list.
|
void | addFilter(Filter filter) - Add a filter to the container contents.
|
void | addFilter(Filter filter, int index) - Add a filter to the container at a specific position.
|
protected void | addSpacer() - Stuff a spacer component at the end of the list.
|
boolean | canAccept() - Check if our maximum number of filters limit has been reached.
|
Component[] | getDropTargets() - Get the components in which to drop commands.
|
Filter[] | getFilters() - Return the list of filters in this container.
|
void | removeFilter(int index) - Remove a filter from the container.
|
void | removeFilter(Filter filter) - Remove a filter from the container.
|
protected void | removeSpacer() - Remove the spacer component at the end of the list.
|
void | setSelected(boolean selected) - Set the 'selected look' for the component.
|
String | toString(int indent, int level) - Get the bytes for this command as a String.
|
mExtra
protected int mExtra
Padding for the drop target.
mHome
protected Filter mHome
The parent filter wrapper.
mMax
protected int mMax
The number of filters limit.
mSpacer
protected Component mSpacer
The drop target spacer at the bottom of the list.
mTitle
protected String mTitle
The textual title for the list.
SubFilterList
public SubFilterList(Filter home,
String title,
int max)
Creates a container panel.
Set the panel minimum size to the same width as the container
but with a bit of extra length.
home
- The filter we belong to.title
- The border title.max
- The maximum number of filters in the list (0 for no limit).
addFilter
public void addFilter(Filter filter)
Add a filter to the container contents.
filter
- The command to add to the container.
addFilter
public void addFilter(Filter filter,
int index)
Add a filter to the container at a specific position.
filter
- The filter to add to the container.index
- The index at which to add it.
addSpacer
protected void addSpacer()
Stuff a spacer component at the end of the list.
canAccept
public boolean canAccept()
Check if our maximum number of filters limit has been reached.
true
if the sublist can accept one more filter,
false
otherwise.
getDropTargets
public Component[] getDropTargets()
Get the components in which to drop commands.
- The component to act as a drop target.
getFilters
public Filter[] getFilters()
Return the list of filters in this container.
- The list of contained filters.
removeFilter
public void removeFilter(int index)
Remove a filter from the container.
index
- The index of the filter to remove from the container.
removeFilter
public void removeFilter(Filter filter)
Remove a filter from the container.
filter
- The filter to remove from the container.
removeSpacer
protected void removeSpacer()
Remove the spacer component at the end of the list.
setSelected
public void setSelected(boolean selected)
Set the 'selected look' for the component.
selected
- If true
, 'select' this component,
otherwise 'deselect' it.
toString
public String toString(int indent,
int level)
Get the bytes for this command as a String.
indent
- The number of spaces to indent a block.level
- The current indentation level.
The first non-whitespace character should be at
indented indent
* level
spaces.
- The string representing this command.
| © 2005 Derrick Oswald Mai 08, 2008 |
HTML Parser is an open source library released under LGPL. |  |