|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jdesktop.swingx.decorator.Filter
org.jdesktop.swingx.decorator.PatternFilter
public class PatternFilter
Pluggable pattern filter.
Constructor Summary | |
---|---|
PatternFilter()
Instantiates a includeAll PatternFilter with matchFlag 0 on column 0. |
|
PatternFilter(java.lang.String regularExpr,
int matchFlags,
int col)
Instantiates a PatternFilter with a Pattern compiled from the given regex and matchFlags on the column in model coordinates. |
Method Summary | |
---|---|
java.util.regex.Pattern |
getPattern()
Returns the pattern used by this filter for matching. |
int |
getSize()
Returns the number of records that remain in this filter's output ("view") after the input records have been filtered. |
void |
setPattern(java.util.regex.Pattern pattern)
Sets the pattern used by this filter for matching. |
void |
setPattern(java.lang.String regularExpr,
int matchFlags)
Convenience to set the pattern in terms of a regex and matchFlags, which are used to compile the pattern to apply. |
boolean |
test(int row)
Tests whether the given row (in this filter's coordinates) should be added. |
Methods inherited from class org.jdesktop.swingx.decorator.Filter |
---|
convertRowIndexToModel, convertRowIndexToView, getColumnIndex, getColumnName, getStringAt, getValueAt, isCellEditable, refresh, setColumnIndex, setValueAt |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PatternFilter()
public PatternFilter(java.lang.String regularExpr, int matchFlags, int col)
regularExpr
- the regex to compile, a null or empty String
is interpreted as ".*"matchFlags
- the matchflags to use in the compilecol
- the column to filter in model coordinates.Method Detail |
---|
public void setPattern(java.lang.String regularExpr, int matchFlags)
regularExpr
- the regex to compile, a null or empty String
is interpreted as ".*"matchFlags
- the matchflags to use in the compilefor details
public void setPattern(java.util.regex.Pattern pattern)
setPattern
in interface PatternMatcher
pattern
- the pattern used by this filter for matchingPattern
public java.util.regex.Pattern getPattern()
getPattern
in interface PatternMatcher
Pattern
public boolean test(int row)
PENDING JW: why is this public? called from a protected method?
row
- the row to test
public int getSize()
getSize
in class Filter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |