org.apache.jmeter.gui.util.HorizontalPanel Java Examples
The following examples show how to use
org.apache.jmeter.gui.util.HorizontalPanel.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AdditionalFieldsPanel.java From jmeter-plugins with Apache License 2.0 | 6 votes |
public AdditionalFieldsPanel(boolean showConcurrencyLimit) { JPanel groupPanel = new HorizontalPanel(); unitMinutes.setActionCommand(ArrivalsThreadGroup.UNIT_MINUTES); unitSeconds.setActionCommand(ArrivalsThreadGroup.UNIT_SECONDS); unitGroup.add(unitMinutes); unitGroup.add(unitSeconds); groupPanel.add(unitMinutes); groupPanel.add(unitSeconds); add("Time Unit: ", groupPanel); add("Thread Iterations Limit: ", iterations); add("Log Threads Status into File: ", logFile); if (showConcurrencyLimit) { add("Concurrency Limit: ", concurrLimit); } }
Example #2
Source File: EfficientConnectSamplerUI.java From mqtt-jmeter with Apache License 2.0 | 6 votes |
private JPanel createSubOption() { JPanel optsPanelCon = new VerticalPanel(); optsPanelCon.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Subscription options")); JPanel optsPanel0 = new HorizontalPanel(); optsPanel0.add(shouldSub); shouldSub.setSelected(false); optsPanelCon.add(optsPanel0); JPanel optsPanel1 = new HorizontalPanel(); qosChoice = new JLabeledChoice("QoS Level:", new String[] { String.valueOf(QOS_0), String.valueOf(QOS_1), String.valueOf(QOS_2) }, true, false); optsPanel1.add(qosChoice); optsPanel1.add(topicNames); optsPanelCon.add(optsPanel1); return optsPanelCon; }
Example #3
Source File: CommonConnUI.java From mqtt-jmeter with Apache License 2.0 | 6 votes |
public JPanel createConnOptions() { JPanel optsPanelCon = new VerticalPanel(); optsPanelCon.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Connection options")); JPanel optsPanel0 = new HorizontalPanel(); optsPanel0.add(connNamePrefix); optsPanel0.add(connNameSuffix); connNameSuffix.setSelected(true); optsPanelCon.add(optsPanel0); JPanel optsPanel1 = new HorizontalPanel(); optsPanel1.add(connKeepAlive); optsPanelCon.add(optsPanel1); optsPanel1.add(connAttmptMax); optsPanel1.add(reconnAttmptMax); optsPanel1.add(connCleanSession); optsPanelCon.add(optsPanel1); return optsPanelCon; }
Example #4
Source File: CommonConnUI.java From mqtt-jmeter with Apache License 2.0 | 6 votes |
public JPanel createConnPanel() { JPanel con = new HorizontalPanel(); JPanel connPanel = new HorizontalPanel(); connPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "MQTT connection")); connPanel.add(serverAddr); connPanel.add(serverPort); connPanel.add(mqttVersion); JPanel timeoutPannel = new HorizontalPanel(); timeoutPannel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Timeout")); timeoutPannel.add(timeout); con.add(connPanel); con.add(timeoutPannel); return con; }
Example #5
Source File: PubSamplerUI.java From mqtt-jmeter with Apache License 2.0 | 6 votes |
private JPanel createPayload() { JPanel optsPanelCon = new VerticalPanel(); optsPanelCon.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Payloads")); JPanel horizon1 = new HorizontalPanel(); messageTypes = new JLabeledChoice("Message type:", new String[] { MESSAGE_TYPE_STRING, MESSAGE_TYPE_HEX_STRING, MESSAGE_TYPE_RANDOM_STR_WITH_FIX_LEN }, false, false); messageTypes.addChangeListener(this); messageTypes.setSelectedIndex(0); horizon1.add(messageTypes, BorderLayout.WEST); stringLength.setVisible(false); horizon1.add(stringLength); JPanel horizon2 = new VerticalPanel(); messagePanel.setVisible(false); horizon2.add(messagePanel); optsPanelCon.add(horizon1); optsPanelCon.add(horizon2); return optsPanelCon; }
Example #6
Source File: PubSamplerUI.java From mqtt-jmeter with Apache License 2.0 | 6 votes |
private JPanel createPubOption() { JPanel optsPanelCon = new VerticalPanel(); optsPanelCon.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Pub options")); qosChoice = new JLabeledChoice("QoS Level:", new String[] { String.valueOf(QOS_0), String.valueOf(QOS_1), String.valueOf(QOS_2) }, true, false); qosChoice.addChangeListener(this); JPanel optsPanel = new HorizontalPanel(); optsPanel.add(qosChoice); optsPanel.add(retainedMsg); optsPanel.add(topicName); topicName.setToolTipText("Name of topic that the message will be sent to."); optsPanel.add(timestamp); optsPanelCon.add(optsPanel); return optsPanelCon; }
Example #7
Source File: AbstractCollectorTable.java From jmeter-prometheus-plugin with Apache License 2.0 | 6 votes |
protected JPanel makeButtonPanel() { add = new JButton(ADD); add.setActionCommand(ADD); add.setEnabled(true); add.addActionListener(this); delete = new JButton(DELETE); delete.setActionCommand(DELETE); delete.setEnabled(true); delete.addActionListener(this); HorizontalPanel panel = new HorizontalPanel(); panel.add(add); panel.add(delete); return panel; }
Example #8
Source File: RotatingResultCollectorGui.java From jmeter-bzm-plugins with Apache License 2.0 | 6 votes |
private void init() { setLayout(new BorderLayout(0, 5)); setBorder(makeBorder()); Container topPanel = makeTitlePanel(); add(JMeterPluginsUtils.addHelpLinkToPanel(topPanel, WIKIPAGE), BorderLayout.NORTH); add(topPanel, BorderLayout.NORTH); JPanel mainPanel = new HorizontalPanel(); mainPanel.setBorder(BorderFactory.createTitledBorder("File Rotating Rules")); mainPanel.add(new JLabel("Limit samples count in file: ", JLabel.RIGHT)); maxSamplesCount = new JTextField(20); mainPanel.add(maxSamplesCount); topPanel.add(mainPanel); }
Example #9
Source File: ParallelControllerGui.java From jmeter-bzm-plugins with Apache License 2.0 | 6 votes |
private void init() { setLayout(new BorderLayout(0, 5)); setBorder(makeBorder()); add(JMeterPluginsUtils.addHelpLinkToPanel(makeTitlePanel(), WIKIPAGE), BorderLayout.NORTH); Container topPanel = makeTitlePanel(); add(topPanel, BorderLayout.NORTH); JPanel mainPanel = new HorizontalPanel(); JLabel lbl = new JLabel(MSG, JLabel.CENTER); topPanel.add(lbl); generateParentSamples = new JCheckBox(); mainPanel.add(generateParentSamples); mainPanel.add(new JLabel("Generate parent sample", JLabel.RIGHT)); topPanel.add(mainPanel); }
Example #10
Source File: ChromeDriverConfigGui.java From jmeter-plugins-webdriver with Apache License 2.0 | 6 votes |
private JPanel createServicePanel() { final JPanel browserPanel = new VerticalPanel(); final JPanel chromeServicePanel = new HorizontalPanel(); final JLabel chromeDriverServiceLabel = new JLabel("Path to Chrome Driver"); chromeServicePanel.add(chromeDriverServiceLabel); chromeServicePath = new JTextField(); chromeServicePanel.add(chromeServicePath); browserPanel.add(chromeServicePanel); androidEnabled = new JCheckBox("Use Chrome on Android"); browserPanel.add(androidEnabled); headlessEnabled = new JCheckBox("Use Chrome headless mode"); browserPanel.add(getHeadlessEnabled()); insecureCertsEnabled = new JCheckBox("Allow Insecure Certs"); browserPanel.add(getInsecureCertsEnabled()); incognitoEnabled = new JCheckBox("Run in Incognito mode"); browserPanel.add(getIncognitoEnabled()); return browserPanel; }
Example #11
Source File: HTTP2SamplerGui.java From jmeter-http2-plugin with Apache License 2.0 | 6 votes |
private final JPanel getPathPanel() { path = new JTextField(15); JLabel label = new JLabel("Path"); label.setLabelFor(path); JPanel pathPanel = new HorizontalPanel(); pathPanel.add(label); pathPanel.add(path); JPanel panel = new JPanel(); panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS)); panel.add(pathPanel); return panel; }
Example #12
Source File: EfficientConnectSamplerUI.java From mqtt-jmeter with Apache License 2.0 | 5 votes |
private JPanel createConCapacityOption() { JPanel optsPanelCon = new VerticalPanel(); optsPanelCon.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Connection capacity options")); JPanel optsPanel0 = new HorizontalPanel(); optsPanel0.add(connCapacity); optsPanelCon.add(optsPanel0); return optsPanelCon; }
Example #13
Source File: SubSamplerUI.java From mqtt-jmeter with Apache License 2.0 | 5 votes |
private JPanel createSubOption() { JPanel optsPanelCon = new VerticalPanel(); optsPanelCon.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Sub options")); qosChoice = new JLabeledChoice("QoS Level:", new String[] { String.valueOf(QOS_0), String.valueOf(QOS_1), String.valueOf(QOS_2) }, true, false); sampleOnCondition = new JLabeledChoice("Sample on:", new String[] {SAMPLE_ON_CONDITION_OPTION1, SAMPLE_ON_CONDITION_OPTION2}); JPanel optsPanel1 = new HorizontalPanel(); optsPanel1.add(qosChoice); optsPanel1.add(topicNames); topicNames.setToolTipText("A list of topics to be subscribed to, comma-separated."); optsPanel1.add(timestamp); optsPanelCon.add(optsPanel1); JPanel optsPanel3 = new HorizontalPanel(); sampleOnCondition.addChangeListener(this); optsPanel3.add(sampleOnCondition); optsPanel3.add(sampleConditionValue); sampleOnCondition.setToolTipText("When sub sampler should report out."); sampleConditionValue.setToolTipText("Please specify an integer value great than 0, other values will be ignored."); optsPanelCon.add(optsPanel3); JPanel optsPanel2 = new HorizontalPanel(); optsPanel2.add(debugResponse); optsPanelCon.add(optsPanel2); return optsPanelCon; }
Example #14
Source File: HTTP2SamplerGui.java From jmeter-http2-plugin with Apache License 2.0 | 5 votes |
private final JPanel getWebServerPanel() { JPanel webServerPanel = new HorizontalPanel(); final JPanel domainPanel = getDomainPanel(); final JPanel portPanel = getPortPanel(); webServerPanel.add(domainPanel, BorderLayout.CENTER); webServerPanel.add(portPanel, BorderLayout.EAST); return webServerPanel; }
Example #15
Source File: HttpSimpleTableControlGui.java From jmeter-plugins with Apache License 2.0 | 5 votes |
private JPanel createPortPanel() { portField = new JTextField(HttpSimpleTableControl.DEFAULT_PORT_S, 8); portField.setName(HttpSimpleTableControl.PORT); JLabel label = new JLabel(JMeterUtils.getResString("port")); label.setLabelFor(portField); datasetDirectoryField = new JTextField( HttpSimpleTableControl.DEFAULT_DATA_DIR, 8); datasetDirectoryField.setName(HttpSimpleTableControl.DATA_DIR); JLabel ddLabel = new JLabel("Dataset directory:"); ddLabel.setLabelFor(datasetDirectoryField); timestampChkBox = new JCheckBox(); timestampChkBox.setSelected(HttpSimpleTableControl.DEFAULT_TIMESTAMP); timestampChkBox.setName(HttpSimpleTableControl.TIMESTAMP); JLabel tsLabel = new JLabel("Timestamp:"); tsLabel.setLabelFor(timestampChkBox); HorizontalPanel panel = new HorizontalPanel(); panel.setBorder(BorderFactory.createTitledBorder( BorderFactory.createEtchedBorder(), "Settings")); panel.add(label); panel.add(portField); panel.add(ddLabel); panel.add(datasetDirectoryField); panel.add(tsLabel); panel.add(timestampChkBox); panel.add(Box.createHorizontalStrut(10)); return panel; }
Example #16
Source File: JSONPathAssertionGui.java From jmeter-plugins with Apache License 2.0 | 5 votes |
public void init() { setLayout(new BorderLayout()); setBorder(makeBorder()); add(JMeterPluginsUtils.addHelpLinkToPanel(makeTitlePanel(), WIKIPAGE), BorderLayout.NORTH); VerticalPanel panel = new VerticalPanel(); panel.setBorder(BorderFactory.createEmptyBorder(5, 0, 5, 0)); JPanel groupPanel = new HorizontalPanel(); inputJSON.setActionCommand(JSONPathAssertion.INPUT_JSON); inputYAML.setActionCommand(JSONPathAssertion.INPUT_YAML); inputFormatGroup.add(inputJSON); inputFormatGroup.add(inputYAML); groupPanel.add(inputJSON); groupPanel.add(inputYAML); JPanel inputFormatPanel = new HorizontalPanel(); inputFormatPanel.add(new JLabel("Input Format: ")); inputFormatPanel.add(groupPanel); jsonPath = new JLabeledTextField("Assert JSON Path exists: "); jsonValidation = new JCheckBox("Additionally assert value"); isRegex = new JCheckBox("Match as regular expression"); jsonValue = new JLabeledTextArea("Expected Value: "); expectNull = new JCheckBox("Expect null"); invert = new JCheckBox("Invert assertion (will fail if above conditions met)"); jsonValidation.addChangeListener(this); expectNull.addChangeListener(this); panel.add(inputFormatPanel); panel.add(jsonPath); panel.add(jsonValidation); panel.add(isRegex); panel.add(jsonValue); panel.add(expectNull); panel.add(invert); add(panel, BorderLayout.CENTER); }
Example #17
Source File: WebSocketSamplerGui.java From jmeter-websocket with Apache License 2.0 | 5 votes |
private void init() { setLayout(new BorderLayout(0, 5)); if (displayName) { setBorder(makeBorder()); add(makeTitlePanel(), BorderLayout.NORTH); } // MAIN PANEL VerticalPanel mainPanel = new VerticalPanel(); JPanel webRequestPanel = new HorizontalPanel(); JPanel serverPanel = new JPanel(); serverPanel.setLayout(new BoxLayout(serverPanel, BoxLayout.X_AXIS)); serverPanel.add(getDomainPanel()); serverPanel.add(getPortPanel()); webRequestPanel.add(serverPanel, BorderLayout.NORTH); JPanel northPanel = new JPanel(); northPanel.setLayout(new BoxLayout(northPanel, BoxLayout.Y_AXIS)); northPanel.add(getProtocolAndPathPanel()); webRequestPanel.add(northPanel, BorderLayout.CENTER); argsPanel = new HTTPArgumentsPanel(); webRequestPanel.add(argsPanel, BorderLayout.SOUTH); mainPanel.add(webRequestPanel); mainPanel.add(getSendMessagePanel()); mainPanel.add(getRecvMessagePanel()); add(mainPanel, BorderLayout.CENTER); }
Example #18
Source File: CommonConnUI.java From mqtt-jmeter with Apache License 2.0 | 5 votes |
public JPanel createAuthentication() { JPanel optsPanelCon = new VerticalPanel(); optsPanelCon.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "User authentication")); JPanel optsPanel = new HorizontalPanel(); optsPanel.add(userNameAuth); optsPanel.add(passwordAuth); optsPanelCon.add(optsPanel); return optsPanelCon; }
Example #19
Source File: PhantomJSDriverConfigGui.java From jmeter-plugins-webdriver with Apache License 2.0 | 5 votes |
private JPanel buildGui() { final JPanel browserPanel = new VerticalPanel(); final JPanel phantomJsExecutablePanel = new HorizontalPanel(); final JLabel phantomJsExecutableLabel = new JLabel("Path to PhantomJS executable"); phantomJsExecutablePanel.add(phantomJsExecutableLabel); phantomJsExecutablePath = new JTextField(); phantomJsExecutablePanel.add(phantomJsExecutablePath); browserPanel.add(phantomJsExecutablePanel); final JPanel phantomJsCliArgsPanel = new VerticalPanel(); final JLabel phantomJsCliArgsLabel = new JLabel("value for phantomjs.cli.args (comma separator) likes --web-security=false, --ignore-ssl-errors=true"); phantomJsCliArgsPanel.add(phantomJsCliArgsLabel); phantomJsCliArgs = new JTextField(); phantomJsCliArgsPanel.add(phantomJsCliArgs); browserPanel.add(phantomJsCliArgsPanel); final JPanel phantomJsGhostdriverCliArgsPanel = new VerticalPanel(); final JLabel phantomJsGhostdriverCliArgsLabel = new JLabel("value for phantomjs.ghostdriver.cli.args (comma separator)"); phantomJsGhostdriverCliArgsPanel.add(phantomJsGhostdriverCliArgsLabel); phantomJsGhostdriverCliArgs = new JTextField(); phantomJsGhostdriverCliArgsPanel.add(phantomJsGhostdriverCliArgs); browserPanel.add(phantomJsGhostdriverCliArgsPanel); return browserPanel; }
Example #20
Source File: InternetExplorerDriverConfigGui.java From jmeter-plugins-webdriver with Apache License 2.0 | 5 votes |
private JPanel createServicePanel() { final JPanel browserPanel = new VerticalPanel(); final JPanel ieServicePanel = new HorizontalPanel(); final JLabel ieDriverServiceLabel = new JLabel("Path to Internet Explorer Driver"); ieServicePanel.add(ieDriverServiceLabel); ieServicePath = new JTextField(); ieServicePanel.add(ieServicePath); browserPanel.add(ieServicePanel); return browserPanel; }
Example #21
Source File: WebDriverConfigGui.java From jmeter-plugins-webdriver with Apache License 2.0 | 5 votes |
private JPanel createProxyHostAndPortPanel(JTextField proxyHost, JTextField proxyPort, String label) { JPanel httpPanel = new HorizontalPanel(); JLabel httpProxyHostLabel = new JLabel(label); httpPanel.add(httpProxyHostLabel); httpPanel.add(proxyHost); proxyHost.setEnabled(false); JLabel httpProxyPortLabel = new JLabel("Port:"); httpPanel.add(httpProxyPortLabel); httpPanel.add(proxyPort); proxyPort.setEnabled(false); return httpPanel; }
Example #22
Source File: WebDriverConfigGui.java From jmeter-plugins-webdriver with Apache License 2.0 | 5 votes |
private void createPacUrlProxy(JPanel panel, ButtonGroup group) { pacUrlProxy = new JRadioButton("Automatic proxy configuration URL"); group.add(pacUrlProxy); panel.add(pacUrlProxy); pacUrlProxy.addItemListener(this); JPanel pacUrlPanel = new HorizontalPanel(); pacUrl = new JTextField(); pacUrl.setEnabled(false); pacUrlPanel.add(pacUrl, BorderLayout.CENTER); pacUrlPanel.setBorder(BorderFactory.createEmptyBorder(0, PROXY_FIELD_INDENT, 0, 0)); panel.add(pacUrlPanel); }
Example #23
Source File: DubboCommonPanel.java From jmeter-plugins-for-apache-dubbo with Apache License 2.0 | 5 votes |
public JPanel drawProtocolSettingsPanel() { //RPC Protocol Settings JPanel protocolSettings = new VerticalPanel(); protocolSettings.setBorder(BorderFactory.createTitledBorder("RPC Protocol")); //RPC Protocol JPanel rpcPh = new HorizontalPanel(); JLabel rpcProtocolLable = new JLabel("Protocol:", SwingConstants.RIGHT); rpcProtocolText = new JComboBox<String>(new String[]{"dubbo://", "rmi://", "hessian://", "webservice://", "memcached://", "redis://"}); rpcProtocolLable.setLabelFor(rpcProtocolText); rpcPh.add(rpcProtocolLable); rpcPh.add(rpcProtocolText); rpcPh.add(makeHelper("RPC protocol name.")); protocolSettings.add(rpcPh); return protocolSettings; }
Example #24
Source File: DubboCommonPanel.java From jmeter-plugins-for-apache-dubbo with Apache License 2.0 | 4 votes |
public JPanel drawConsumerSettingsPanel() { //Consumer Settings JPanel consumerSettings = new VerticalPanel(); consumerSettings.setBorder(BorderFactory.createTitledBorder("Consumer & Service")); JPanel h = new HorizontalPanel(); //Timeout JLabel timeoutLable = new JLabel(" Timeout:", SwingConstants.RIGHT); timeoutText = new JTextField(textColumns); timeoutText.setText(Constants.DEFAULT_TIMEOUT); timeoutLable.setLabelFor(timeoutText); h.add(timeoutLable); h.add(timeoutText); h.add(makeHelper("Invoking timeout(ms)")); //Version JLabel versionLable = new JLabel("Version:", SwingConstants.RIGHT); versionText = new JTextField(textColumns); versionText.setText(Constants.DEFAULT_VERSION); versionLable.setLabelFor(versionText); h.add(versionLable); h.add(versionText); h.add(makeHelper("Service version.")); //Retries JLabel retriesLable = new JLabel("Retries:", SwingConstants.RIGHT); retriesText = new JTextField(textColumns); retriesText.setText(Constants.DEFAULT_RETRIES); retriesLable.setLabelFor(retriesText); h.add(retriesLable); h.add(retriesText); h.add(makeHelper("The retry count for RPC, not including the first invoke. Please set it to 0 if don't need to retry.")); //Cluster JLabel clusterLable = new JLabel("Cluster:", SwingConstants.RIGHT); clusterText = new JTextField(textColumns); clusterText.setText(Constants.DEFAULT_CLUSTER); clusterLable.setLabelFor(clusterText); h.add(clusterLable); h.add(clusterText); h.add(makeHelper("failover/failfast/failsafe/failback/forking are available.")); //Group JLabel groupLable = new JLabel("Group:", SwingConstants.RIGHT); groupText = new JTextField(textColumns); groupLable.setLabelFor(groupText); h.add(groupLable); h.add(groupText); h.add(makeHelper("The group of the service providers. It can distinguish services when it has multiple implements.")); //Connections JLabel connectionsLable = new JLabel("Connections:", SwingConstants.RIGHT); connectionsText = new JTextField(textColumns); connectionsText.setText(Constants.DEFAULT_CONNECTIONS); connectionsLable.setLabelFor(connectionsText); h.add(connectionsLable); h.add(connectionsText); h.add(makeHelper("The maximum connections of every provider. For short connection such as rmi, http and hessian, it's connection limit, but for long connection such as dubbo, it's connection count.")); consumerSettings.add(h); JPanel hp1 = new HorizontalPanel(); //Async JLabel asyncLable = new JLabel(" Async:", SwingConstants.RIGHT); asyncText = new JComboBox<String>(new String[]{"sync", "async"}); asyncLable.setLabelFor(asyncText); hp1.add(asyncLable); hp1.add(asyncText); hp1.add(makeHelper("Asynchronous execution, not reliable. It does not block the execution thread just only ignores the return value.")); //Loadbalance JLabel loadbalanceLable = new JLabel("Loadbalance:", SwingConstants.RIGHT); loadbalanceText = new JComboBox<String>(new String[]{"random", "roundrobin", "leastactive", "consistenthash"}); loadbalanceLable.setLabelFor(loadbalanceText); hp1.add(loadbalanceLable); hp1.add(loadbalanceText); hp1.add(makeHelper("Strategy of load balance, random, roundrobin and leastactive are available.")); consumerSettings.add(hp1); return consumerSettings; }
Example #25
Source File: JSONPathExtractorGui.java From jmeter-plugins with Apache License 2.0 | 4 votes |
private void init() { setLayout(new BorderLayout()); setBorder(makeBorder()); add(JMeterPluginsUtils.addHelpLinkToPanel(makeTitlePanel(), WIKIPAGE), BorderLayout.NORTH); JPanel mainPanel = new JPanel(new GridBagLayout()); GridBagConstraints c = new GridBagConstraints(); c.gridwidth = 2; c.gridx = 0; c.gridy = 0; c.weightx = 1; c.anchor = GridBagConstraints.FIRST_LINE_START; c.fill = GridBagConstraints.HORIZONTAL; mainPanel.add(makeSourcePanel(), c); GridBagConstraints labelConstraints = new GridBagConstraints(); labelConstraints.anchor = GridBagConstraints.FIRST_LINE_END; GridBagConstraints editConstraints = new GridBagConstraints(); editConstraints.anchor = GridBagConstraints.FIRST_LINE_START; editConstraints.weightx = 1.0; editConstraints.fill = GridBagConstraints.HORIZONTAL; JPanel groupPanel = new HorizontalPanel(); inputJSON.setActionCommand(JSONPathExtractor.INPUT_JSON); inputYAML.setActionCommand(JSONPathExtractor.INPUT_YAML); inputFormatGroup.add(inputJSON); inputFormatGroup.add(inputYAML); groupPanel.add(inputJSON); groupPanel.add(inputYAML); int row = 1; addToPanel(mainPanel, labelConstraints, 0, row, new JLabel("Input Format: ", JLabel.RIGHT)); addToPanel(mainPanel, editConstraints, 1, row, groupPanel); row++; addToPanel(mainPanel, labelConstraints, 0, row, new JLabel("Destination Variable Name: ", JLabel.RIGHT)); addToPanel(mainPanel, editConstraints, 1, row, variableNameTextField = new JTextField(20)); row++; addToPanel(mainPanel, labelConstraints, 0, row, new JLabel("JSONPath Expression: ", JLabel.RIGHT)); addToPanel(mainPanel, editConstraints, 1, row, jsonPathTextField = new JTextField(20)); row++; addToPanel(mainPanel, labelConstraints, 0, row, new JLabel("Default Value: ", JLabel.RIGHT)); addToPanel(mainPanel, editConstraints, 1, row, defaultValTextField = new JTextField(20)); JPanel container = new JPanel(new BorderLayout()); container.add(mainPanel, BorderLayout.NORTH); add(container, BorderLayout.CENTER); }
Example #26
Source File: OAuthSamplerGui.java From jmeter-plugins with Apache License 2.0 | 4 votes |
private JPanel getResourceConfigPanel() { consumerKey = new JLabeledTextField("Consumer Key", 25); consumerSecret = new JLabeledTextField("Consumer Secret", 25); automaticRedirect = new JCheckBox(JMeterUtils.getResString("follow_redirects")); httpMethods = new JLabeledChoice("Method", new String[]{"GET", "POST", "PUT", "DELETE", "PATCH"}); httpMethods.addChangeListener(new ChangeListener() { @Override public void stateChanged(ChangeEvent e) { JLabeledChoice c = (JLabeledChoice) e.getSource(); String text = c.getText(); if ("PUT".equals(text) || "POST".equals(text) || "PATCH".equals(text)) { automaticRedirect.setSelected(false); automaticRedirect.setEnabled(false); } else { automaticRedirect.setEnabled(true); } } }); useKeepAlive = new JCheckBox(JMeterUtils.getResString("use_keepalive")); hostBaseUrl = new JLabeledTextField("Base Url", 25); resource = new JLabeledTextField("Resource", 20); port = new JLabeledTextField("Port", 10); VerticalPanel resourceConfigPanel = new VerticalPanel(); HorizontalPanel oAuthPanel = new HorizontalPanel(); oAuthPanel.add(consumerKey); oAuthPanel.add(consumerSecret); HorizontalPanel panel1 = new HorizontalPanel(); panel1.add(httpMethods); panel1.add(useKeepAlive); panel1.add(automaticRedirect); HorizontalPanel panel2 = new HorizontalPanel(); panel2.add(hostBaseUrl); panel2.add(port); HorizontalPanel panel3 = new HorizontalPanel(); panel3.add(resource); resourceConfigPanel.add(panel1); resourceConfigPanel.add(oAuthPanel); resourceConfigPanel.add(panel2); resourceConfigPanel.add(panel3); return resourceConfigPanel; }
Example #27
Source File: DubboCommonPanel.java From jmeter-plugins-for-apache-dubbo with Apache License 2.0 | 4 votes |
public JPanel drawConfigCenterSettingsPanel() { //Config Center Settings JPanel configCenterSettings = new VerticalPanel(); configCenterSettings.setBorder(BorderFactory.createTitledBorder("Config Center")); //Protocol JPanel ph = new HorizontalPanel(); JLabel protocolLable = new JLabel("Protocol:", SwingConstants.RIGHT); configCenterProtocolText = new JComboBox<String>(new String[]{"","zookeeper", "nacos", "apollo"}); protocolLable.setLabelFor(configCenterProtocolText); ph.add(protocolLable); ph.add(configCenterProtocolText); ph.add(makeHelper("Which configuration center to use: apollo, zookeeper, nacos, etc. 2.7.0+")); //Group JLabel configCenterGroupLable = new JLabel("Group:", SwingConstants.RIGHT); configCenterGroupText = new JTextField(); configCenterGroupLable.setLabelFor(configCenterGroupText); ph.add(configCenterGroupLable); ph.add(configCenterGroupText); ph.add(makeHelper("The meaning varies according to the configuration center selected. 2.7.0+")); //Namespace JLabel configCenterNamespaceLable = new JLabel("Namespace:", SwingConstants.RIGHT); configCenterNamespaceText = new JTextField(); configCenterNamespaceLable.setLabelFor(configCenterNamespaceText); ph.add(configCenterNamespaceLable); ph.add(configCenterNamespaceText); ph.add(makeHelper("Using for multi-tenant isolation generally, the actual meaning varies depending on the configuration center. 2.7.0+")); //UserName JLabel configCenterUserNameLable = new JLabel("UserName:", SwingConstants.RIGHT); configCenterUserNameText = new JTextField(); configCenterUserNameLable.setLabelFor(configCenterUserNameText); ph.add(configCenterUserNameLable); ph.add(configCenterUserNameText); ph.add(makeHelper("the username if the configuration center requires validation, Apollo is not yet enabled. 2.7.0+")); //Password JLabel configCenterPasswordLable = new JLabel("Password:", SwingConstants.RIGHT); configCenterPasswordText = new JTextField(); configCenterPasswordLable.setLabelFor(configCenterPasswordText); ph.add(configCenterPasswordLable); ph.add(configCenterPasswordText); ph.add(makeHelper("password if configuration center needs to do check, Apollo is not yet enabled. 2.7.0+")); configCenterSettings.add(ph); //Address JPanel ah = new HorizontalPanel(); JLabel configCenterAddressLable = new JLabel("Address:", SwingConstants.RIGHT); configCenterAddressText = new JTextField(textColumns); configCenterAddressLable.setLabelFor(configCenterAddressText); ah.add(configCenterAddressLable); ah.add(configCenterAddressText); ah.add(makeHelper("Configuration center address. 2.7.0+")); //Timeout JLabel configCenterTimeoutLable = new JLabel("Timeout:", SwingConstants.RIGHT); configCenterTimeoutText = new JTextField(); configCenterTimeoutLable.setLabelFor(configCenterTimeoutText); ah.add(configCenterTimeoutLable); ah.add(configCenterTimeoutText); ah.add(makeHelper("Gets the configured timeout. 2.7.0+ ")); configCenterSettings.add(ah); return configCenterSettings; }
Example #28
Source File: DubboCommonPanel.java From jmeter-plugins-for-apache-dubbo with Apache License 2.0 | 4 votes |
public JPanel drawRegistrySettingsPanel() { //Registry Settings JPanel registrySettings = new VerticalPanel(); registrySettings.setBorder(BorderFactory.createTitledBorder("Registry Center")); //Protocol JPanel ph = new HorizontalPanel(); JLabel protocolLable = new JLabel("Protocol:", SwingConstants.RIGHT); registryProtocolText = new JComboBox<String>(new String[]{"","none", "zookeeper", "nacos", "multicast", "redis", "simple"}); registryProtocolText.setToolTipText("\"none\" is direct connection"); protocolLable.setLabelFor(registryProtocolText); ph.add(protocolLable); ph.add(registryProtocolText); ph.add(makeHelper("Registry center address protocol, The 'none' is direct connection. ")); //Group JLabel registryGroupLable = new JLabel("Group:", SwingConstants.RIGHT); registryGroupText = new JTextField(); registryGroupLable.setLabelFor(registryGroupText); ph.add(registryGroupLable); ph.add(registryGroupText); ph.add(makeHelper("Service registration grouping, cross-group services will not affect each other, and can not be called each other, suitable for environmental isolation.")); //UserName JLabel registryUserNameLable = new JLabel("UserName:", SwingConstants.RIGHT); registryUserNameText = new JTextField(); registryUserNameLable.setLabelFor(registryUserNameText); ph.add(registryUserNameLable); ph.add(registryUserNameText); ph.add(makeHelper("The usename of the registry. Do not set it if the registry doesn't need validation.")); //Password JLabel registryPasswordLable = new JLabel("Password:", SwingConstants.RIGHT); registryPasswordText = new JTextField(); registryPasswordLable.setLabelFor(registryPasswordText); ph.add(registryPasswordLable); ph.add(registryPasswordText); ph.add(makeHelper("The password of the registry. Do not set it if the registry doesn't need validation.")); registrySettings.add(ph); //Address JPanel ah = new HorizontalPanel(); JLabel addressLable = new JLabel("Address:", SwingConstants.RIGHT); addressText = new JTextField(textColumns); addressLable.setLabelFor(addressText); ah.add(addressLable); ah.add(addressText); ah.add(makeHelper("Use the registry to allow multiple addresses, Use direct connection to allow only one address! Multiple address format: ip1:port1,ip2:port2 . Direct address format: ip:port . ")); //Timeout JLabel registryTimeoutLable = new JLabel("Timeout:", SwingConstants.RIGHT); registryTimeoutText = new JTextField(); registryTimeoutLable.setLabelFor(registryTimeoutText); ah.add(registryTimeoutLable); ah.add(registryTimeoutText); ah.add(makeHelper("The timeout(ms) of the request to registry.")); registrySettings.add(ah); return registrySettings; }