|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.pmd.util.viewer.model.ViewerModel
The model for the viewer gui
This is the model part of MVC
Constructor Summary | |
ViewerModel()
constructs the model |
Method Summary | |
void |
addViewerModelListener(ViewerModelListener l)
adds a listener to the model |
void |
appendToXPathExpression(java.lang.String pathFragment,
java.lang.Object appender)
appends the given fragment to the XPath expression |
void |
commitSource(java.lang.String source)
commits source code to the model. |
void |
evaluateXPathExpression(java.lang.String xPath,
java.lang.Object evaluator)
evaluates the given XPath expression against the current tree |
protected void |
fireViewerModelEvent(ViewerModelEvent e)
notifes all listener of a change in the model |
java.util.List |
getLastEvaluationResults()
retrieves the results of last evaluation |
SimpleNode |
getRootNode()
Retrieves AST's root node |
boolean |
hasCompiledTree()
determines wheteher the model has a compiled tree at it's disposal |
void |
removeViewerModelListener(ViewerModelListener l)
removes the lisetener from the model |
void |
selectNode(SimpleNode node,
java.lang.Object selector)
selects the given node in the AST |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ViewerModel()
Method Detail |
public SimpleNode getRootNode()
public void commitSource(java.lang.String source)
source
- source to be commitedpublic boolean hasCompiledTree()
public void evaluateXPathExpression(java.lang.String xPath, java.lang.Object evaluator) throws ParseException, org.jaxen.JaxenException
xPath
- XPath expression to be evaluatedevaluator
- object which requests the evaluation
ParseException
org.jaxen.JaxenException
public java.util.List getLastEvaluationResults()
public void selectNode(SimpleNode node, java.lang.Object selector)
node
- node to be selectedselector
- object which requests the selectionpublic void appendToXPathExpression(java.lang.String pathFragment, java.lang.Object appender)
pathFragment
- fragment to be addedappender
- object that is trying to append the fragmentpublic void addViewerModelListener(ViewerModelListener l)
l
- listener to be addedpublic void removeViewerModelListener(ViewerModelListener l)
l
- listener to be removedprotected void fireViewerModelEvent(ViewerModelEvent e)
e
- change's reason
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |