New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xpath assertion - Textfield not in FlowLayout #4125
Comments
@FSchumacher (migrated from Bugzilla): The doc will have to be updated in either case, since it shows an old view, where no textarea was used. Created attachment xpathassertion.patch: Use more available space for the textarea xpathassertion.patchdiff --git a/src/components/org/apache/jmeter/assertions/gui/XPathAssertionGui.java b/src/components/org/apache/jmeter/assertions/gui/XPathAssertionGui.java
index f3732b1..59d56eb 100644
--- a/src/components/org/apache/jmeter/assertions/gui/XPathAssertionGui.java
+++ b/src/components/org/apache/jmeter/assertions/gui/XPathAssertionGui.java
@@ -27,7 +27,6 @@ import javax.swing.JPanel;
import org.apache.jmeter.assertions.XPathAssertion;
import org.apache.jmeter.testelement.TestElement;
import org.apache.jmeter.util.JMeterUtils;
-import org.apache.jorphan.gui.layout.VerticalLayout;
public class XPathAssertionGui extends AbstractAssertionGui {
@@ -76,14 +75,22 @@ public class XPathAssertionGui extends AbstractAssertionGui {
}
private void init() { // WARNING: called from ctor so must not be overridden (i.e. must be private or final)
- setLayout(new VerticalLayout(5, VerticalLayout.BOTH, VerticalLayout.TOP));
+ setLayout(new BorderLayout());
setBorder(makeBorder());
- add(makeTitlePanel());
- Box box = Box.createVerticalBox();
- box.add(createScopePanel(true));
- add(box);
-
+ Box topBox = Box.createVerticalBox();
+
+ topBox.add(makeTitlePanel());
+
+ topBox.add(createScopePanel(true));
+
+ xml = new XMLConfPanel();
+ xml.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils
+ .getResString("xpath_assertion_option"))); //$NON-NLS-1$
+ topBox.add(xml);
+
+ add(topBox, BorderLayout.NORTH);
+
// USER_INPUT
JPanel sizePanel = new JPanel(new BorderLayout());
sizePanel.setBorder(BorderFactory.createEmptyBorder(0, 10, 10, 10));
@@ -91,13 +98,7 @@ public class XPathAssertionGui extends AbstractAssertionGui {
getXPathAttributesTitle()));
xpath = new XPathPanel();
sizePanel.add(xpath);
-
- xml = new XMLConfPanel();
- xml.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils
- .getResString("xpath_assertion_option"))); //$NON-NLS-1$
- add(xml);
-
- add(sizePanel);
+ add(sizePanel, BorderLayout.CENTER);
}
/**
diff --git a/src/components/org/apache/jmeter/assertions/gui/XPathPanel.java b/src/components/org/apache/jmeter/assertions/gui/XPathPanel.java
index 04eae16..497254f 100644
--- a/src/components/org/apache/jmeter/assertions/gui/XPathPanel.java
+++ b/src/components/org/apache/jmeter/assertions/gui/XPathPanel.java
@@ -20,6 +20,7 @@ package org.apache.jmeter.assertions.gui;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
+import java.awt.BorderLayout;
import javax.swing.Box;
import javax.swing.JButton;
@@ -62,18 +63,18 @@ public class XPathPanel extends JPanel {
}
private void init() { // WARNING: called from ctor so must not be overridden (i.e. must be private or final)
+ setLayout(new BorderLayout());
+
Box hbox = Box.createHorizontalBox();
+
hbox.add(Box.createHorizontalGlue());
- hbox.add(JTextScrollPane.getInstance(getXPathField()));
+ hbox.add(getNegatedCheckBox());
hbox.add(Box.createHorizontalGlue());
hbox.add(getCheckXPathButton());
+ hbox.add(Box.createHorizontalGlue());
- Box vbox = Box.createVerticalBox();
- vbox.add(hbox);
- vbox.add(Box.createVerticalGlue());
- vbox.add(getNegatedCheckBox());
-
- add(vbox);
+ add(JTextScrollPane.getInstance(getXPathField()), BorderLayout.CENTER);
+ add(hbox, BorderLayout.SOUTH);
setDefaultValues();
} |
@pmouawad (migrated from Bugzilla): |
Lenzen (migrated from Bugzilla): |
Lenzen (migrated from Bugzilla): |
@FSchumacher (migrated from Bugzilla): URL: http://svn.apache.org/viewvc?rev=1763632&view=rev Modified: |
Lenzen (Bug 60203):
The xpath assertion Textfield is not in FlowLayout. The XPath Assertion TestField have fixed values (like 300 x 600). That's not pretty for a long row.
Severity: normal
OS: Windows NT
The text was updated successfully, but these errors were encountered: