public Vector getAllValidTemplates() { // Return templates if no imported/included stylesheets if (_includedStylesheets == null) { return _templates; } // Is returned value cached? if (_allValidTemplates == null) { Vector templates = new Vector(); int size = _includedStylesheets.size(); for (int i = 0; i < size; i++) { Stylesheet included =(Stylesheet)_includedStylesheets.elementAt(i); templates.addAll(included.getAllValidTemplates()); } templates.addAll(_templates); // Cache results in top-level stylesheet only if (_parentStylesheet != null) { return templates; } _allValidTemplates = templates; } return _allValidTemplates; }
/** * Returns true if at least one template in the stylesheet has params * defined. Uses the variable <code>_hasLocalParams</code> to cache the * result. */ public boolean hasLocalParams() { if (_hasLocalParams == null) { Vector templates = getAllValidTemplates(); final int n = templates.size(); for (int i = 0; i < n; i++) { final Template template = (Template)templates.elementAt(i); if (template.hasParams()) { _hasLocalParams = Boolean.TRUE; return true; } } _hasLocalParams = Boolean.FALSE; return false; } else { return _hasLocalParams.booleanValue(); } }
public Vector getAllValidTemplates() { // Return templates if no imported/included stylesheets if (_includedStylesheets == null) { return _templates; } // Is returned value cached? if (_allValidTemplates == null) { Vector templates = new Vector(); int size = _includedStylesheets.size(); for (int i = 0; i < size; i++) { Stylesheet included =(Stylesheet)_includedStylesheets.elementAt(i); templates.addAll(included.getAllValidTemplates()); } templates.addAll(_templates); // Cache results in top-level stylesheet only if (_parentStylesheet != null) { return templates; } _allValidTemplates = templates; } return _allValidTemplates; }
public Vector getAllValidTemplates() { // Return templates if no imported/included stylesheets if (_includedStylesheets == null) { return _templates; } // Is returned value cached? if (_allValidTemplates == null) { Vector templates = new Vector(); int size = _includedStylesheets.size(); for (int i = 0; i < size; i++) { Stylesheet included =(Stylesheet)_includedStylesheets.elementAt(i); templates.addAll(included.getAllValidTemplates()); } templates.addAll(_templates); // Cache results in top-level stylesheet only if (_parentStylesheet != null) { return templates; } _allValidTemplates = templates; } return _allValidTemplates; }
public Vector getAllValidTemplates() { // Return templates if no imported/included stylesheets if (_includedStylesheets == null) { return _templates; } // Is returned value cached? if (_allValidTemplates == null) { Vector templates = new Vector(); int size = _includedStylesheets.size(); for (int i = 0; i < size; i++) { Stylesheet included =(Stylesheet)_includedStylesheets.elementAt(i); templates.addAll(included.getAllValidTemplates()); } templates.addAll(_templates); // Cache results in top-level stylesheet only if (_parentStylesheet != null) { return templates; } _allValidTemplates = templates; } return _allValidTemplates; }
/** * Returns true if at least one template in the stylesheet has params * defined. Uses the variable <code>_hasLocalParams</code> to cache the * result. */ public boolean hasLocalParams() { if (_hasLocalParams == null) { Vector templates = getAllValidTemplates(); final int n = templates.size(); for (int i = 0; i < n; i++) { final Template template = (Template)templates.elementAt(i); if (template.hasParams()) { _hasLocalParams = Boolean.TRUE; return true; } } _hasLocalParams = Boolean.FALSE; return false; } else { return _hasLocalParams.booleanValue(); } }
/** * Returns true if at least one template in the stylesheet has params * defined. Uses the variable <code>_hasLocalParams</code> to cache the * result. */ public boolean hasLocalParams() { if (_hasLocalParams == null) { Vector templates = getAllValidTemplates(); final int n = templates.size(); for (int i = 0; i < n; i++) { final Template template = (Template)templates.elementAt(i); if (template.hasParams()) { _hasLocalParams = Boolean.TRUE; return true; } } _hasLocalParams = Boolean.FALSE; return false; } else { return _hasLocalParams.booleanValue(); } }
/** * Returns true if at least one template in the stylesheet has params * defined. Uses the variable <code>_hasLocalParams</code> to cache the * result. */ public boolean hasLocalParams() { if (_hasLocalParams == null) { Vector templates = getAllValidTemplates(); final int n = templates.size(); for (int i = 0; i < n; i++) { final Template template = (Template)templates.elementAt(i); if (template.hasParams()) { _hasLocalParams = Boolean.TRUE; return true; } } _hasLocalParams = Boolean.FALSE; return false; } else { return _hasLocalParams.booleanValue(); } }