public class SubPanel extends Object implements ActionListener
Constructor and Description |
---|
SubPanel(JPanel theSubPanel,
MQTTFrame aMqttMgr)
The constructor for the subscription panel
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent e)
ActionListener interface
Listen out for the Subscribe button, Unsubscribe button, Save button or the Hex/Text button being pressed Subscribing / Unsubscribing for data involves: Updating the drop down boxes with the topic if necessary Subscribing / Unsubscribing for the data Processing the Save button involves poping up a file dialog, opening the file, writing the data and closing the file. |
void |
enableButtons(boolean b)
This enables or disables the subscribe and unsubscribe buttons depending on the value of the boolean.
|
void |
init()
The init method builds all the required components and adds them to the
subscription panel.
|
void |
updateReceivedData(String topic,
byte[] data,
int QoS,
boolean retained)
This method is passed a received publication.
|
boolean |
updateTopicList(String topicName)
For any requests to add a topic to the publish drop down box
use the updateComboBoxList method in class MQIsdpFrame to do the job.
|
public void init()
public boolean updateTopicList(String topicName)
public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
public void updateReceivedData(String topic, byte[] data, int QoS, boolean retained)
public void enableButtons(boolean b)
b
- Button enabled if true, otherwise disabled.Copyright © 2018 Eclipse Paho. All rights reserved.