Package org.apache.batik.bridge.svg12
Class AbstractContentSelector
java.lang.Object
org.apache.batik.bridge.svg12.AbstractContentSelector
- Direct Known Subclasses:
DefaultContentSelector
,XPathPatternContentSelector
,XPathSubsetContentSelector
A base class for handlers of different XBL content element includes
attribute syntaxes.
- Version:
- $Id: AbstractContentSelector.java 1808023 2017-09-11 12:43:22Z ssteiner $
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static interface
An interface for content selector factories.protected static class
A factory for XPathPatternContentSelector objects.protected static class
A factory for XPathSubsetContentSelector objects. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Element
The bound element.protected XBLOMContentElement
The XBL content element.protected ContentManager
The ContentManager object that owns this selector.protected static HashMap
Map of selector languages to factories. -
Constructor Summary
ConstructorsConstructorDescriptionAbstractContentSelector
(ContentManager cm, XBLOMContentElement content, Element bound) Creates a new AbstractContentSelector object. -
Method Summary
Modifier and TypeMethodDescriptionstatic AbstractContentSelector
createSelector
(String selectorLanguage, ContentManager cm, XBLOMContentElement content, Element bound, String selector) Creates a new selector object.abstract NodeList
Returns a list of nodes that were matched by this selector.protected boolean
isSelected
(Node n) Returns true if the given node has already been selected by a content element.(package private) abstract boolean
update()
Forces this selector to update its selected nodes list.
-
Field Details
-
contentManager
The ContentManager object that owns this selector. -
contentElement
The XBL content element. -
boundElement
The bound element. -
selectorFactories
Map of selector languages to factories.
-
-
Constructor Details
-
AbstractContentSelector
Creates a new AbstractContentSelector object.
-
-
Method Details
-
getSelectedContent
Returns a list of nodes that were matched by this selector. -
update
abstract boolean update()Forces this selector to update its selected nodes list. Returns true if the selected node list needed updating. This assumes that the previous content elements in this shadow tree (in document order) have up-to-date selectedContent lists. -
isSelected
Returns true if the given node has already been selected by a content element. -
createSelector
public static AbstractContentSelector createSelector(String selectorLanguage, ContentManager cm, XBLOMContentElement content, Element bound, String selector) Creates a new selector object.- Parameters:
content
- The content element using this selector.bound
- The bound element whose children will be selected.selector
- The selector string.
-