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


Java JLabeledChoice.addChangeListener方法代码示例

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


在下文中一共展示了JLabeledChoice.addChangeListener方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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

示例6: 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


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