Java Code Examples for org.apache.jorphan.gui.JLabeledChoice#setToolTipText()

The following examples show how to use org.apache.jorphan.gui.JLabeledChoice#setToolTipText() . 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: SubSamplerUI.java    From mqtt-jmeter with Apache License 2.0 5 votes vote down vote up
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 2
Source File: HonoReceiverSamplerUI.java    From hono with Eclipse Public License 2.0 5 votes vote down vote up
/**
 * Creates a new UI that provides means to configure
 * the northbound Telemetry & Event API endpoint to connect to
 * for receiving messages.
 */
public HonoReceiverSamplerUI() {

    honoServerOptions = new ServerOptionsPanel("Telemetry & Event Endpoint");
    tenant = new JLabeledTextField("Tenant");
    container = new JLabeledTextField("Name");
    endpoint = new JLabeledChoice("Endpoint",
            Stream.of(HonoSampler.Endpoint.values()).map(HonoSampler.Endpoint::name).toArray(String[]::new));
    endpoint.setToolTipText("<html>The name of the endpoint to send the AMQP message to.</html>");
    useSenderTime = new JCheckBox("Use sender time");
    senderTimeInProperty = new JRadioButton("Sender time in property");
    senderTimeInProperty.setToolTipText("<html>If set, the sending time is retrieved from the message's application property <em>timeStamp</em>.</html>");
    senderTimeInPayload = new JRadioButton("Sender time in JSON payload");
    final ButtonGroup group = new ButtonGroup();
    group.add(senderTimeInProperty);
    group.add(senderTimeInPayload);
    senderTimeInProperty.setSelected(true);
    senderTimeVariableName = new JLabeledTextField("JSON value key");
    senderTimeVariableName.setEnabled(false);
    prefetch = new JLabeledTextField("Prefetch");
    reconnectAttempts = new JLabeledTextField("Max reconnect attempts");

    addOption(honoServerOptions);
    addOption(tenant);
    addOption(container);
    addOption(getWrapperPanelToFixAlignment(endpoint));
    addOption(prefetch);
    addOption(reconnectAttempts);
    addOption(createTimeStampPanel());
}
 
Example 3
Source File: HonoSenderSamplerUI.java    From hono with Eclipse Public License 2.0 4 votes vote down vote up
/**
 * Creates a new UI that provides means to configure
 * the southbound Telemetry &amp; Event API endpoint to connect to
 * for sending messages and an (optional) Device Registration service
 * endpoint for retrieving registration assertions.
 */
public HonoSenderSamplerUI() {

    honoServerOptions = new ServerOptionsPanel("Telemetry & Event Endpoint");
    tenant = new JLabeledTextField("Tenant");
    container = new JLabeledTextField("Name");
    endpoint = new JLabeledChoice("Endpoint",
            Stream.of(HonoSampler.Endpoint.values()).map(HonoSampler.Endpoint::name).toArray(String[]::new));
    endpoint.setToolTipText("<html>The name of the endpoint to send the AMQP message to.</html>");
    deviceId = new JLabeledTextField("Device ID");
    deviceId.setToolTipText("<html>The device identifier to put into the <em>device_id</em> application property of the AMQP message to send.</html>");
    contentType = new JLabeledTextField("Content type");
    data = new JLabeledTextArea("Message data");
    waitForDeliveryResult = new JCheckBox("Wait for delivery result");
    waitForDeliveryResult.setToolTipText("<html>Deselecting this option increases sender throughput, especially of <em>event</em> messages, " +
            "at the expense of not finding out about rejected messages. <br>For this, the number of messages at the receiver end has to be checked.</html>");
    setSenderTime = new JCheckBox("Set sender time in property");
    setSenderTime.setToolTipText(new StringBuilder()
            .append("<html>")
            .append("When checked, the messages being sent will contain a timestamp (millis since epoch start) ")
            .append("in the <em>timeStamp</em> application property.")
            .append("</html>")
            .toString());
    waitForReceivers = new JLabeledTextField(
            "Number of receivers to wait for (e.g. from other threads)");
    waitForReceiversTimeout = new JLabeledTextField(
            "Max time (millis) to wait for receivers");
    sampleSendTimeout = new JLabeledTextField("Max time (millis) for sending a message");
    msgCountPerSamplerRun = new JLabeledTextField("Number of messages per sampler run");

    addOption(honoServerOptions);
    addOption(tenant);
    addOption(container);
    addOption(getWrapperPanelToFixAlignment(endpoint));
    addOption(deviceId);
    addOption(contentType);
    addOption(data);
    addOption(waitForDeliveryResult);
    addOption(setSenderTime);
    addOption(waitForReceivers);
    addOption(waitForReceiversTimeout);
    addOption(sampleSendTimeout);
    addOption(msgCountPerSamplerRun);
}