|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.palo.api.impl.subsets.AbstractSubsetState
org.palo.api.ext.subsets.states.RegExState
public class RegExState
The RegExState determines the visible elements by a regular
expression.
| Field Summary | |
|---|---|
static java.lang.String |
ID
|
| Constructor Summary | |
|---|---|
RegExState(java.lang.String initialRegex)
|
|
| Method Summary | |
|---|---|
void |
addPath(Element element,
java.lang.String path)
Adds the specified path for the given visible element |
void |
addVisibleElement(Element element,
int position)
Adds the given element to the list of all visible elements. |
void |
addVisibleElment(Element element)
Adds the given element to the list of all visible elements |
boolean |
containsPath(Element element,
java.lang.String path)
Checks if this SubsetState contains the specified path for
the given |
java.lang.String |
getExpression()
Returns an optional expression to determine the visible elements |
java.lang.String |
getId()
Returns the unique state id. |
java.lang.String |
getName()
Returns an optional name for the state. |
java.lang.String[] |
getPaths(Element element)
Returns all paths for the given Element or null, if
no paths were defined. |
int[] |
getPositions(Element element)
Returns the positions of the given visible element. |
Attribute |
getSearchAttribute()
Returns an attribute field that is used for searching with the regular expression. |
Element[] |
getVisibleElements()
Returns all visible elements. |
boolean |
isVisible(Element element)
Checks if the given is visible within this
SubsetState. |
void |
removeAllVisibleElements()
Convenience method to remove all visible elements |
void |
removePath(Element element,
java.lang.String path)
Removes the specified path for the given visible element. |
void |
removeVisibleElement(Element element)
Removes the given element from the list of all visible elements |
void |
setExpression(java.lang.String expression)
Sets an expression to determine the visible elements |
void |
setName(java.lang.String name)
Sets an optional name, label or description |
void |
setSearchAttribute(Attribute searchAttribute)
Sets the attribute field that is used instead of the element name when filtering with a regular expression |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String ID
| Constructor Detail |
|---|
public RegExState(java.lang.String initialRegex)
| Method Detail |
|---|
public final void setExpression(java.lang.String expression)
SubsetState
setExpression in interface SubsetStateexpression - a state expression to describe the visible elementspublic final void addVisibleElment(Element element)
SubsetState
addVisibleElment in interface SubsetStateelement - the element to show
public final void addVisibleElement(Element element,
int position)
SubsetState
addVisibleElement in interface SubsetStateelement - the element to showposition - an element positionpublic final void removeVisibleElement(Element element)
SubsetState
removeVisibleElement in interface SubsetStateelement - the element to removepublic final void removeAllVisibleElements()
SubsetState
removeAllVisibleElements in interface SubsetStatepublic final java.lang.String getExpression()
SubsetState
getExpression in interface SubsetStatepublic final java.lang.String getId()
SubsetState
getId in interface SubsetStatepublic final void setName(java.lang.String name)
SubsetState
setName in interface SubsetStatename - a human readable labelpublic final java.lang.String getName()
SubsetState
getName in interface SubsetStatepublic final Element[] getVisibleElements()
SubsetStateNote: the array could be empty but that does not necessarily mean that no element is visible because an expression can determine the elements too.
getVisibleElements in interface SubsetStatepublic final Attribute getSearchAttribute()
SubsetState
getSearchAttribute in interface SubsetStatepublic final void setSearchAttribute(Attribute searchAttribute)
SubsetState
setSearchAttribute in interface SubsetStatesearchAttribute - field used for filteringpublic final java.lang.String[] getPaths(Element element)
SubsetStateElement or null, if
no paths were defined. An element path consists of a comma separated list
of element ids. Since an element can be referenced several times,
multiple paths are possible.
getPaths in interface SubsetStateelement - a visible element
null
public final void addPath(Element element,
java.lang.String path)
SubsetState
addPath in interface SubsetStateelement - a visible elementpath - a path to the visible element
public final void removePath(Element element,
java.lang.String path)
SubsetState
removePath in interface SubsetStateelement - a visible elementpath - the path to remove
public final boolean containsPath(Element element,
java.lang.String path)
SubsetStateSubsetState contains the specified path for
the given Element
containsPath in interface SubsetStateelement - a visible elementpath - a valid path to the visible element
true if the path is known for the given element,
false otherwisepublic final int[] getPositions(Element element)
SubsetState
getPositions in interface SubsetStateelement - a visible element
public final boolean isVisible(Element element)
SubsetStateElement is visible within this
SubsetState.
isVisible in interface SubsetStateelement - the Element to check
true if it is visible, false otherwise
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||