private JPanel createXPathExpressionTestingPanel()

in taverna-xpath-activity-ui/src/main/java/org/apache/taverna/activities/xpath/ui/config/XPathActivityConfigurationPanel.java [785:862]


	private JPanel createXPathExpressionTestingPanel() {
		JPanel jpTesting = new JPanel(new GridBagLayout());
		GridBagConstraints c = new GridBagConstraints();

		c.gridx = 0;
		c.gridy = 0;
		c.gridwidth = 1;
		c.anchor = GridBagConstraints.WEST;
		c.fill = GridBagConstraints.NONE;
		c.weightx = 0;
		c.weighty = 0;
		c.insets = new Insets(0, 0, 10, 10);
		jpTesting.add(new JLabel("Executed XPath expression:"), c);

		c.gridx++;
		c.fill = GridBagConstraints.HORIZONTAL;
		c.weightx = 1.0;
		c.weighty = 0;
		c.insets = new Insets(0, 0, 10, 10);
		tfExecutedXPathExpression = new JTextField();
		tfExecutedXPathExpression.setEditable(false);
		tfExecutedXPathExpression.setBorder(null);
		jpTesting.add(tfExecutedXPathExpression, c);

		c.gridx = 0;
		c.gridy++;
		c.fill = GridBagConstraints.NONE;
		c.weightx = 0;
		c.weighty = 0;
		c.insets = new Insets(0, 0, 5, 10);
		jpTesting.add(new JLabel("Number of matching nodes:"), c);

		c.gridx++;
		c.fill = GridBagConstraints.HORIZONTAL;
		c.weightx = 1.0;
		c.weighty = 0;
		c.insets = new Insets(0, 0, 5, 10);
		tfMatchingElementCount = new JTextField();
		tfMatchingElementCount.setEditable(false);
		tfMatchingElementCount.setBorder(null);
		jpTesting.add(tfMatchingElementCount, c);

		c.gridx = 0;
		c.gridy++;
		c.gridwidth = 2;
		c.fill = GridBagConstraints.BOTH;
		c.weightx = 1.0;
		c.weighty = 1.0;
		tpExecutedXPathExpressionResults = new JTabbedPane();
		jpTesting.add(tpExecutedXPathExpressionResults, c);

		taExecutedXPathExpressionResultsAsText = new JTextArea();
		taExecutedXPathExpressionResultsAsText.setEditable(false);
		spExecutedXPathExpressionResultsAsText = new JScrollPane(
				taExecutedXPathExpressionResultsAsText);
		spExecutedXPathExpressionResultsAsText.setPreferredSize(new Dimension(
				200, 60));
		spExecutedXPathExpressionResultsAsText.setBorder(BorderFactory
				.createLineBorder(INACTIVE_PANEL_BACKGROUND_COLOR, 3));
		tpExecutedXPathExpressionResults.add("Results as text",
				spExecutedXPathExpressionResultsAsText);

		taExecutedXPathExpressionResultsAsXML = new JTextArea();
		taExecutedXPathExpressionResultsAsXML.setEditable(false);
		spExecutedXPathExpressionResultsAsXML = new JScrollPane(
				taExecutedXPathExpressionResultsAsXML);
		spExecutedXPathExpressionResultsAsXML.setPreferredSize(new Dimension(
				200, 60));
		spExecutedXPathExpressionResultsAsXML.setBorder(BorderFactory
				.createLineBorder(INACTIVE_PANEL_BACKGROUND_COLOR, 3));
		tpExecutedXPathExpressionResults.add("Results as XML",
				spExecutedXPathExpressionResultsAsXML);

		// initialise some values / tooltips
		resetXPathTestingPanel();

		return (jpTesting);
	}