List of usage examples for javax.swing BorderFactory createEtchedBorder
public static Border createEtchedBorder()
From source file:org.apache.jmeter.protocol.http.config.gui.UrlConfigGuiClassifier.java
private void init() {// called from ctor, so must not be overridable this.setLayout(new BorderLayout()); // WEB REQUEST PANEL JPanel webRequestPanel = new JPanel(); webRequestPanel.setLayout(new BorderLayout()); webRequestPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils.getResString("web_request"))); // $NON-NLS-1$ JPanel northPanel = new JPanel(); northPanel.setLayout(new BoxLayout(northPanel, BoxLayout.Y_AXIS)); northPanel.add(getProtocolAndMethodPanel()); northPanel.add(getPathPanel());// w ww.j av a2s .c o m northPanel.add(getClassifierPanel()); webRequestPanel.add(northPanel, BorderLayout.NORTH); webRequestPanel.add(getParameterPanel(), BorderLayout.CENTER); this.add(getWebServerTimeoutPanel(), BorderLayout.NORTH); this.add(webRequestPanel, BorderLayout.CENTER); this.add(getProxyServerPanel(), BorderLayout.SOUTH); }
From source file:org.apache.jmeter.protocol.http.config.gui.UrlConfigGuiClassifier.java
/** * Create a panel containing the proxy server details * * @return the panel//from w w w . j a va2 s . co m */ protected final JPanel getProxyServerPanel() { JPanel proxyServer = new HorizontalPanel(); proxyServer.add(getProxyHostPanel(), BorderLayout.CENTER); proxyServer.add(getProxyPortPanel(), BorderLayout.EAST); JPanel proxyLogin = new HorizontalPanel(); proxyLogin.add(getProxyUserPanel()); proxyLogin.add(getProxyPassPanel()); JPanel proxyServerPanel = new HorizontalPanel(); proxyServerPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils.getResString("web_proxy_server_title"))); // $NON-NLS-1$ proxyServerPanel.add(proxyServer, BorderLayout.CENTER); proxyServerPanel.add(proxyLogin, BorderLayout.EAST); return proxyServerPanel; }
From source file:org.apache.jmeter.protocol.http.control.gui.WebServiceSamplerGui.java
private final JPanel createTopPanel() { JPanel topPanel = new JPanel(); topPanel.setLayout(new VerticalLayout(5, VerticalLayout.BOTH)); JPanel wsdlHelper = new JPanel(); wsdlHelper.setLayout(new BoxLayout(wsdlHelper, BoxLayout.Y_AXIS)); wsdlHelper.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils.getResString("webservice_configuration_wizard"))); // $NON-NLS-1$ // Button for browsing webservice wsdl JPanel wsdlEntry = new JPanel(); wsdlEntry.setLayout(new BoxLayout(wsdlEntry, BoxLayout.X_AXIS)); Border margin = new EmptyBorder(0, 5, 0, 5); wsdlEntry.setBorder(margin);//from ww w . j ava2s.co m wsdlHelper.add(wsdlEntry); wsdlEntry.add(wsdlField); wsdlEntry.add(wsdlButton); wsdlButton.addActionListener(this); // Web Methods JPanel listPanel = new JPanel(); listPanel.setLayout(new FlowLayout(FlowLayout.LEFT)); JLabel selectLabel = new JLabel(JMeterUtils.getResString("webservice_methods")); // $NON-NLS-1$ wsdlMethods = new JLabeledChoice(); wsdlHelper.add(listPanel); listPanel.add(selectLabel); listPanel.add(wsdlMethods); listPanel.add(selectButton); selectButton.addActionListener(this); topPanel.add(wsdlHelper); JPanel urlPane = new JPanel(); urlPane.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); urlPane.add(protocol); urlPane.add(Box.createRigidArea(new Dimension(5, 0))); urlPane.add(domain); urlPane.add(Box.createRigidArea(new Dimension(5, 0))); urlPane.add(port); urlPane.add(Box.createRigidArea(new Dimension(5, 0))); urlPane.add(connectTimeout); topPanel.add(urlPane); topPanel.add(createParametersPanel()); return topPanel; }
From source file:org.apache.jmeter.protocol.http.control.gui.WebServiceSamplerGui.java
private final JPanel createMessagePanel() { JPanel msgPanel = new JPanel(); msgPanel.setLayout(new BorderLayout(5, 0)); msgPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils.getResString("webservice_message_soap"))); // $NON-NLS-1$ JPanel soapXmlPane = new JPanel(); soapXmlPane.setLayout(new BorderLayout(5, 0)); soapXmlPane.setBorder(BorderFactory.createTitledBorder(JMeterUtils.getResString("soap_data_title"))); // $NON-NLS-1$ soapXmlPane.setPreferredSize(new Dimension(4, 4)); // Permit dynamic resize of TextArea soapXml = new JTextArea(); soapXml.setLineWrap(true);/*from w ww. j a v a 2 s. c o m*/ soapXml.setWrapStyleWord(true); soapXml.setTabSize(4); // improve xml display soapXmlPane.add(new JScrollPane(soapXml), BorderLayout.CENTER); msgPanel.add(soapXmlPane, BorderLayout.CENTER); JPanel southPane = new JPanel(); southPane.setLayout(new BoxLayout(southPane, BoxLayout.Y_AXIS)); southPane.add(soapXmlFile); JPanel randomXmlPane = new JPanel(); randomXmlPane.setLayout(new BorderLayout(5, 0)); randomXmlPane.setBorder( BorderFactory.createTitledBorder(JMeterUtils.getResString("webservice_get_xml_from_random_title"))); // $NON-NLS-1$ randomXmlPane.add(randomXmlFile, BorderLayout.CENTER); southPane.add(randomXmlPane); msgPanel.add(southPane, BorderLayout.SOUTH); return msgPanel; }
From source file:org.apache.jmeter.protocol.http.control.gui.WebServiceSamplerGui.java
private final JPanel createBottomPanel() { JPanel optionPane = new JPanel(); optionPane.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils.getResString("option"))); // $NON-NLS-1$ optionPane.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); JPanel ckboxPane = new HorizontalPanel(); ckboxPane.add(memCache, BorderLayout.WEST); ckboxPane.add(readResponse, BorderLayout.CENTER); readResponse.setToolTipText(readToolTip); optionPane.add(ckboxPane);//from ww w .j a v a2s . c o m // add the proxy elements optionPane.add(getProxyServerPanel()); return optionPane; }
From source file:org.apache.jmeter.protocol.http.gui.CookiePanel.java
public JPanel createCookieTablePanel() { // create the JTable that holds one cookie per row cookieTable = new JTable(tableModel); cookieTable.getTableHeader().setDefaultRenderer(new HeaderAsPropertyRenderer()); cookieTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); cookieTable.setPreferredScrollableViewportSize(new Dimension(100, 70)); JPanel buttonPanel = createButtonPanel(); JPanel panel = new JPanel(new BorderLayout(0, 5)); panel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils.getResString("cookies_stored"))); //$NON-NLS-1$ panel.add(new JScrollPane(cookieTable), BorderLayout.CENTER); panel.add(buttonPanel, BorderLayout.SOUTH); return panel; }
From source file:org.apache.jmeter.protocol.system.gui.SystemSamplerGui.java
/** * @return JPanel return code config//from w ww .j a va2 s .c om */ private JPanel makeReturnCodePanel() { JPanel panel = new JPanel(); panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS)); panel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils.getResString("return_code_config_box_title"))); // $NON-NLS-1$ checkReturnCode = new JCheckBox(JMeterUtils.getResString("check_return_code_title")); // $NON-NLS-1$ checkReturnCode.addItemListener(this); desiredReturnCode = new JLabeledTextField(JMeterUtils.getResString("expected_return_code_title")); // $NON-NLS-1$ desiredReturnCode.setSize(desiredReturnCode.getSize().height, 30); panel.add(checkReturnCode); panel.add(Box.createHorizontalStrut(5)); panel.add(desiredReturnCode); checkReturnCode.setSelected(true); return panel; }
From source file:org.apache.jmeter.protocol.system.gui.SystemSamplerGui.java
/** * @return JPanel timeout config//from ww w . j a v a 2 s .com */ private JPanel makeTimeoutPanel() { JPanel panel = new JPanel(); panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS)); panel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils.getResString("timeout_config_box_title"))); // $NON-NLS-1$ timeout = new JLabeledTextField(JMeterUtils.getResString("timeout_title")); // $NON-NLS-1$ timeout.setSize(timeout.getSize().height, 30); panel.add(timeout); return panel; }
From source file:org.apache.jmeter.protocol.system.gui.SystemSamplerGui.java
/** * @return JPanel Command + directory//from w ww . jav a2 s . co m */ private JPanel makeCommandPanel() { JPanel cmdPanel = new JPanel(); cmdPanel.setLayout(new BoxLayout(cmdPanel, BoxLayout.X_AXIS)); JPanel cmdWkDirPane = new JPanel(new BorderLayout()); command = new JLabeledTextField(JMeterUtils.getResString("command_field_title")); // $NON-NLS-1$ cmdWkDirPane.add(command, BorderLayout.CENTER); directory = new JLabeledTextField(JMeterUtils.getResString("directory_field_title")); // $NON-NLS-1$ cmdWkDirPane.add(directory, BorderLayout.EAST); cmdPanel.add(cmdWkDirPane); JPanel panel = new VerticalPanel(); panel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils.getResString("command_config_box_title"))); // $NON-NLS-1$ panel.add(cmdPanel, BorderLayout.NORTH); panel.add(makeArgumentsPanel(), BorderLayout.CENTER); panel.add(makeEnvironmentPanel(), BorderLayout.SOUTH); return panel; }
From source file:org.apache.jmeter.protocol.system.gui.SystemSamplerGui.java
/** * @return JPanel Streams Panel/*w w w .ja v a 2 s . c om*/ */ private JPanel makeStreamsPanel() { JPanel stdPane = new JPanel(new BorderLayout()); stdPane.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils.getResString("command_config_std_streams_title"))); // $NON-NLS-1$ stdPane.add(stdin, BorderLayout.NORTH); stdPane.add(stdout, BorderLayout.CENTER); stdPane.add(stderr, BorderLayout.SOUTH); return stdPane; }