4,10 → 4,10 |
* Coded by: Group 5, software practice summer 2003 |
* University of Bielefeld, Germany |
* |
* @version $Revision: 1.46 $ |
* @version $Revision: 1.47 $ |
* |
* Last modification: $Date: 2003/07/22 13:10:35 $ |
* $Id: UpdateView.java,v 1.46 2003/07/22 13:10:35 mdonner Exp $ |
* Last modification: $Date: 2003/07/22 13:41:54 $ |
* $Id: UpdateView.java,v 1.47 2003/07/22 13:41:54 cstollen Exp $ |
*/ |
|
package src.gui; |
46,7 → 46,7 |
* |
* @author Christian Stollenwerk |
* |
* @version $Revision: 1.46 $ Last modification: $Date: 2003/07/22 13:10:35 $ |
* @version $Revision: 1.47 $ Last modification: $Date: 2003/07/22 13:41:54 $ |
*/ |
public class UpdateView implements ActionListener, UpdateViewInterface, |
OurEventListener, TreeModelListener, TreeExpansionListener, TreeSelectionListener { |
77,31 → 77,36 |
*/ |
public void actionPerformed(ActionEvent event) { |
viewFilter.setLogInterface(logInterface); |
|
// GUI fires event if user wants to change the XPath filter |
if(event.getActionCommand() == "Set XPath") { |
expression = JOptionPane.showInputDialog( |
"Enter XPath expression", expression); |
if(expression == null) |
expression = ""; |
expression.trim(); |
if(expression.length() == 0) { |
isFiltered = false; |
documentManagerInterface.setExpression(""); |
} |
else { |
isFiltered = true; |
doc = documentManagerInterface.getActualDocument(); |
nodeList = viewFilter.filter(doc, expression); |
documentManagerInterface.setExpression(expression); |
if(nodeList == null) { |
JOptionPane.showMessageDialog(gui.getRootPane(), |
"You entered an invalid XPath expression", |
"XPath not valid", |
JOptionPane.ERROR_MESSAGE); |
isFiltered = false; |
|
if (! documentManagerInterface.getOpenDocumentList().isEmpty()) { |
|
expression = JOptionPane.showInputDialog( |
"Enter XPath expression", expression); |
if (expression == null) { |
expression = ""; |
expression.trim(); |
} |
if (expression.length() == 0) { |
isFiltered = false; |
documentManagerInterface.setExpression(""); |
} else { |
isFiltered = true; |
doc = documentManagerInterface.getActualDocument(); |
nodeList = viewFilter.filter(doc, expression); |
documentManagerInterface.setExpression(expression); |
if(nodeList == null) { |
JOptionPane.showMessageDialog(gui.getRootPane(), |
"You entered an invalid XPath expression", |
"XPath not valid", |
JOptionPane.ERROR_MESSAGE); |
isFiltered = false; |
} |
} |
update(); |
} |
update(); |
} |
} |
|
113,7 → 118,7 |
*/ |
public void update() { |
|
if(documentManagerInterface.getOpendDocumentList().isEmpty()) { |
if(documentManagerInterface.getOpenDocumentList().isEmpty()) { |
gui.setTreeVisible(false); |
} |
else { |