当前位置: 首页>>代码示例>>Java>>正文


Java JLabeledChoice类代码示例

本文整理汇总了Java中org.apache.jorphan.gui.JLabeledChoice的典型用法代码示例。如果您正苦于以下问题:Java JLabeledChoice类的具体用法?Java JLabeledChoice怎么用?Java JLabeledChoice使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


JLabeledChoice类属于org.apache.jorphan.gui包,在下文中一共展示了JLabeledChoice类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createPayload

import org.apache.jorphan.gui.JLabeledChoice; //导入依赖的package包/类
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;
}
 
开发者ID:emqtt,项目名称:mqtt-jmeter,代码行数:22,代码来源:PubSamplerUI.java

示例2: getConsumerSecretPanel

import org.apache.jorphan.gui.JLabeledChoice; //导入依赖的package包/类
/**
 * Secret panel contains
 * 
 *    Signature method
 *    Consumer secret or key
 *    
 * @return
 */
protected JPanel getConsumerSecretPanel() {

      	signatureMethod = new JLabeledChoice(OAuthSamplerGui.getResString("oauth_signature_method"), //$NON-NLS-1$
               OAuthSampler.METHODS);
      	signatureMethod.addChangeListener(this);

	secret = new JTextField(20);
	secret.setName(OAuthSampler.SECRET);
	
	secretLabel = new JLabel(OAuthSamplerGui.getResString("oauth_consumer_secret")); //$NON-NLS-1$
	secretLabel.setLabelFor(secret);
  
       JPanel panel = new JPanel(new GridBagLayout());
       
       panel.add(secretLabel, fixedConstraints);
	panel.add(secret, stretchyConstraints);
	panel.add(signatureMethod, fixedConstraints);
	
	return panel;
}
 
开发者ID:groovenauts,项目名称:jmeter_oauth_plugin,代码行数:29,代码来源:OAuthConfigGui.java

示例3: createPubOption

import org.apache.jorphan.gui.JLabeledChoice; //导入依赖的package包/类
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(topicName);
	optsPanel.add(timestamp);
	optsPanelCon.add(optsPanel);

	return optsPanelCon;
}
 
开发者ID:emqtt,项目名称:mqtt-jmeter,代码行数:16,代码来源:PubSamplerUI.java

示例4: createSubOption

import org.apache.jorphan.gui.JLabeledChoice; //导入依赖的package包/类
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(topicName);
	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;
}
 
开发者ID:emqtt,项目名称:mqtt-jmeter,代码行数:28,代码来源:SubSamplerUI.java

示例5: init

import org.apache.jorphan.gui.JLabeledChoice; //导入依赖的package包/类
/**
 * Shows the main cookie configuration panel.
 */
private void init() {
    tableModel = new PowerTableModel(COLUMN_RESOURCE_NAMES, columnClasses);
    clearEachIteration = 
        new JCheckBox(JMeterUtils.getResString("clear_cookies_per_iter"), false); //$NON-NLS-1$
    policy = new JLabeledChoice(
            JMeterUtils.getResString("cookie_manager_policy"), //$NON-NLS-1$
            policies);
    policy.setText(CookieManager.DEFAULT_POLICY);
    setLayout(new BorderLayout());
    setBorder(makeBorder());
    JPanel northPanel = new JPanel();
    northPanel.setLayout(new VerticalLayout(5, VerticalLayout.BOTH));
    northPanel.add(makeTitlePanel());
    JPanel optionsPane = new JPanel();
    optionsPane.setBorder(BorderFactory.createTitledBorder(
            BorderFactory.createEtchedBorder(),
            JMeterUtils.getResString("cookie_options"))); // $NON-NLS-1$
    optionsPane.setLayout(new VerticalLayout(5, VerticalLayout.BOTH));
    optionsPane.add(clearEachIteration);
    JPanel policyTypePane = new JPanel();
    policyTypePane.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
    policyTypePane.add(policy);
    policyTypePane.add(GuiUtils.createLabelCombo(
            JMeterUtils.getResString("cookie_implementation_choose"), createComboHandler())); // $NON-NLS-1$
    optionsPane.add(policyTypePane);
    northPanel.add(optionsPane);
    add(northPanel, BorderLayout.NORTH);
    add(createCookieTablePanel(), BorderLayout.CENTER);
}
 
开发者ID:botelhojp,项目名称:apache-jmeter-2.10,代码行数:33,代码来源:CookiePanel.java

示例6: initializeFunctionList

import org.apache.jorphan.gui.JLabeledChoice; //导入依赖的package包/类
private void initializeFunctionList() {
    String[] functionNames = CompoundVariable.getFunctionNames();
    Arrays.sort(functionNames, new Comparator<String>() {
        @Override
        public int compare(String o1, String o2) {
            return o1.compareToIgnoreCase(o2);
        }
    });
    functionList = new JLabeledChoice(JMeterUtils.getResString("choose_function"), functionNames); //$NON-NLS-1$
    functionList.addChangeListener(this);
}
 
开发者ID:botelhojp,项目名称:apache-jmeter-2.10,代码行数:12,代码来源:FunctionHelper.java

示例7: createProtocolPanel

import org.apache.jorphan.gui.JLabeledChoice; //导入依赖的package包/类
public JPanel createProtocolPanel() {
	JPanel protocolPanel = new VerticalPanel();
	protocolPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Protocols"));
	
	JPanel pPanel = new HorizontalPanel();
	//pPanel.setLayout(new GridLayout(1, 2));

	protocols = new JLabeledChoice("Protocols:", new String[] { "TCP", "SSL" }, true, false);
	//JComboBox<String> component = (JComboBox) protocols.getComponentList().get(1);
	//component.setSize(new Dimension(40, component.getHeight()));
	protocols.addChangeListener(this);
	pPanel.add(protocols, BorderLayout.WEST);

	dualAuth.setSelected(false);
	dualAuth.setFont(null);
	dualAuth.setVisible(false);
	dualAuth.addChangeListener(this);
	pPanel.add(dualAuth, BorderLayout.CENTER);

	JPanel panel = new JPanel(new GridBagLayout());
	GridBagConstraints c = new GridBagConstraints();
	c.anchor = GridBagConstraints.SOUTHWEST;
	
	c.gridx = 0;
	c.gridy = 0;
	c.gridwidth = 2;
	panel.add(certificationFilePath1, c);
	certificationFilePath1.setVisible(false);

	browse1 = new JButton(JMeterUtils.getResString("browse"));
	browse1.setActionCommand(BROWSE1);
	browse1.addActionListener(this);
	browse1.setVisible(false);
	
	c.gridx = 2;
	c.gridy = 0;
	c.gridwidth = 1;
	panel.add(browse1, c);
	
	c.gridx = 3;
	c.gridy = 0;
	c.gridwidth = 2;
	panel.add(tksPassword, c);
	tksPassword.setVisible(false);
	
	certificationFilePath2.setVisible(false);

	//c.weightx = 0.0;
	c.gridx = 0;
	c.gridy = 1;
	c.gridwidth = 2;
	panel.add(certificationFilePath2, c);

	browse2 = new JButton(JMeterUtils.getResString("browse"));
	browse2.setActionCommand(BROWSE2);
	browse2.addActionListener(this);
	browse2.setVisible(false);
	
	c.gridx = 2;
	c.gridy = 1;
	c.gridwidth = 1;
	panel.add(browse2, c);
	
	c.gridx = 3;
	c.gridy = 1;
	panel.add(cksPassword, c);
	cksPassword.setVisible(false);
	
	protocolPanel.add(pPanel);
	protocolPanel.add(panel);
	
	return protocolPanel;
}
 
开发者ID:emqtt,项目名称:mqtt-jmeter,代码行数:74,代码来源:CommonConnUI.java

示例8: createTopPanel

import org.apache.jorphan.gui.JLabeledChoice; //导入依赖的package包/类
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);
    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;
}
 
开发者ID:botelhojp,项目名称:apache-jmeter-2.10,代码行数:48,代码来源:WebServiceSamplerGui.java

示例9: getProtocolAndMethodPanel

import org.apache.jorphan.gui.JLabeledChoice; //导入依赖的package包/类
protected JPanel getProtocolAndMethodPanel() {

        // Implementation
        
        if (showImplementation) {
            httpImplementation = new JLabeledChoice(JMeterUtils.getResString("http_implementation"), // $NON-NLS-1$
                    HTTPSamplerFactory.getImplementations());
            httpImplementation.addValue("");
        }
        // PROTOCOL
        protocol = new JTextField(4);
        JLabel protocolLabel = new JLabel(JMeterUtils.getResString("protocol")); // $NON-NLS-1$
        protocolLabel.setLabelFor(protocol);        
        
        // CONTENT_ENCODING
        contentEncoding = new JTextField(10);
        JLabel contentEncodingLabel = new JLabel(JMeterUtils.getResString("content_encoding")); // $NON-NLS-1$
        contentEncodingLabel.setLabelFor(contentEncoding);

        if (notConfigOnly){
            method = new JLabeledChoice(JMeterUtils.getResString("method"), // $NON-NLS-1$
                    HTTPSamplerBase.getValidMethodsAsArray());
        }

        JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT));

        if (showImplementation) {
            panel.add(httpImplementation);
        }
        panel.add(protocolLabel);
        panel.add(protocol);
        panel.add(Box.createHorizontalStrut(5));

        if (notConfigOnly){
            panel.add(method);
        }
        panel.setMinimumSize(panel.getPreferredSize());
        panel.add(Box.createHorizontalStrut(5));

        panel.add(contentEncodingLabel);
        panel.add(contentEncoding);
        panel.setMinimumSize(panel.getPreferredSize());
        return panel;
    }
 
开发者ID:botelhojp,项目名称:apache-jmeter-2.10,代码行数:45,代码来源:UrlConfigGui.java

示例10: createCssJqueryTasksPanel

import org.apache.jorphan.gui.JLabeledChoice; //导入依赖的package包/类
/**
 * Create the CssJquery task pane
 *
 * @return CssJquery task pane
 */
private JPanel createCssJqueryTasksPanel() {
    GridBagLayout g = new GridBagLayout();
    GridBagConstraints c = new GridBagConstraints();
    
    JPanel cssJqueryActionPanel = new JPanel();
    cssJqueryActionPanel.setLayout(g);
    Border margin = new EmptyBorder(5, 5, 0, 5);
    cssJqueryActionPanel.setBorder(margin);
    cssJqueryField = new JLabeledTextField(JMeterUtils.getResString("cssjquery_tester_field")); // $NON-NLS-1$
    cssJqueryField.setPreferredSize(new Dimension(300, 30));
    c.fill = GridBagConstraints.HORIZONTAL;
    c.gridx=0;
    c.gridy=0;
    cssJqueryActionPanel.add(cssJqueryField, c);
    
    cssJqueryLabeledChoice = new JLabeledChoice(
            JMeterUtils.getResString("cssjquery_impl"), // $NON-NLS-1$
            getImplementations()); 
    cssJqueryLabeledChoice.setPreferredSize(new Dimension(300, 30));
    c.fill = GridBagConstraints.HORIZONTAL;
    c.gridx=1;
    c.gridy=0;
    cssJqueryActionPanel.add(cssJqueryLabeledChoice, c);
            
    attributeField = new JLabeledTextField(JMeterUtils.getResString("cssjquery_attribute")); // $NON-NLS-1$
    attributeField.setPreferredSize(new Dimension(300, 30));
    c.fill = GridBagConstraints.HORIZONTAL;
    c.gridx=0;
    c.gridy=1;
    cssJqueryActionPanel.add(attributeField, c);

    JButton cssJqueryTester = new JButton(JMeterUtils.getResString("cssjquery_tester_button_test")); // $NON-NLS-1$
    cssJqueryTester.setPreferredSize(new Dimension(100, 30));
    cssJqueryTester.setActionCommand(CSSJQUEY_TESTER_COMMAND);
    cssJqueryTester.addActionListener(this);
    c.fill = GridBagConstraints.HORIZONTAL;
    c.gridx=1;
    c.gridy=1;
    cssJqueryActionPanel.add(cssJqueryTester, c);

    
    cssJqueryResultField = new JTextArea();
    cssJqueryResultField.setEditable(false);
    cssJqueryResultField.setLineWrap(true);
    cssJqueryResultField.setWrapStyleWord(true);

    JPanel cssJqueryTasksPanel = new JPanel(new BorderLayout(0, 5));
    cssJqueryTasksPanel.add(cssJqueryActionPanel, BorderLayout.NORTH);
    cssJqueryTasksPanel.add(GuiUtils.makeScrollPane(cssJqueryResultField), BorderLayout.CENTER);

    return cssJqueryTasksPanel;
}
 
开发者ID:botelhojp,项目名称:apache-jmeter-2.10,代码行数:58,代码来源:RenderAsCssJQuery.java


注:本文中的org.apache.jorphan.gui.JLabeledChoice类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。