mirror of
https://repository.entgra.net/community/device-mgt-plugins.git
synced 2025-09-16 23:42:15 +00:00
button removed
This commit is contained in:
parent
c1ee9f2263
commit
ebe19b959d
@ -159,7 +159,6 @@ public class AgentConfiguration {
|
|||||||
public void setXmppServerName(String xmppServerName) {
|
public void setXmppServerName(String xmppServerName) {
|
||||||
this.xmppServerName = xmppServerName;
|
this.xmppServerName = xmppServerName;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -44,7 +44,6 @@ public class AgentManager {
|
|||||||
private boolean deviceReady = false;
|
private boolean deviceReady = false;
|
||||||
private boolean isAlarmOn = false;
|
private boolean isAlarmOn = false;
|
||||||
|
|
||||||
private String deviceMgtControlUrl, deviceMgtAnalyticUrl;
|
|
||||||
private String deviceName, agentStatus;
|
private String deviceName, agentStatus;
|
||||||
|
|
||||||
private int pushInterval; // seconds
|
private int pushInterval; // seconds
|
||||||
@ -231,14 +230,6 @@ public class AgentManager {
|
|||||||
this.deviceReady = deviceReady;
|
this.deviceReady = deviceReady;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDeviceMgtControlUrl() {
|
|
||||||
return deviceMgtControlUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDeviceMgtAnalyticUrl() {
|
|
||||||
return deviceMgtAnalyticUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public AgentConfiguration getAgentConfigs() {
|
public AgentConfiguration getAgentConfigs() {
|
||||||
return agentConfigs;
|
return agentConfigs;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -37,8 +37,6 @@ public class AgentUI extends JFrame {
|
|||||||
private JLabel picLabelBulbOn, picLabelBulbOff;
|
private JLabel picLabelBulbOn, picLabelBulbOff;
|
||||||
|
|
||||||
// Variables declaration - do not modify
|
// Variables declaration - do not modify
|
||||||
private JButton btnControl;
|
|
||||||
private JButton btnView;
|
|
||||||
private JCheckBox chkbxEmulate;
|
private JCheckBox chkbxEmulate;
|
||||||
private JCheckBox chkbxHumidityRandom;
|
private JCheckBox chkbxHumidityRandom;
|
||||||
private JCheckBox chkbxHumiditySmooth;
|
private JCheckBox chkbxHumiditySmooth;
|
||||||
@ -158,8 +156,6 @@ public class AgentUI extends JFrame {
|
|||||||
chkbxTemperatureSmooth = new JCheckBox();
|
chkbxTemperatureSmooth = new JCheckBox();
|
||||||
jPanel6 = new JPanel();
|
jPanel6 = new JPanel();
|
||||||
jLabel20 = new JLabel();
|
jLabel20 = new JLabel();
|
||||||
btnView = new JButton();
|
|
||||||
btnControl = new JButton();
|
|
||||||
lblStatus = new JLabel();
|
lblStatus = new JLabel();
|
||||||
jPanel8 = new JPanel();
|
jPanel8 = new JPanel();
|
||||||
jLabel23 = new JLabel();
|
jLabel23 = new JLabel();
|
||||||
@ -387,20 +383,6 @@ public class AgentUI extends JFrame {
|
|||||||
jLabel20.setText("Connection Status:");
|
jLabel20.setText("Connection Status:");
|
||||||
jLabel20.setVerticalTextPosition(SwingConstants.TOP);
|
jLabel20.setVerticalTextPosition(SwingConstants.TOP);
|
||||||
|
|
||||||
btnView.setText("View Device Data");
|
|
||||||
btnView.addMouseListener(new java.awt.event.MouseAdapter() {
|
|
||||||
public void mouseClicked(java.awt.event.MouseEvent evt) {
|
|
||||||
btnViewMouseClicked(evt);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
btnControl.setText("Control Device");
|
|
||||||
btnControl.addMouseListener(new java.awt.event.MouseAdapter() {
|
|
||||||
public void mouseClicked(java.awt.event.MouseEvent evt) {
|
|
||||||
btnControlMouseClicked(evt);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
lblStatus.setFont(new Font("Cantarell", 1, 15)); // NOI18N
|
lblStatus.setFont(new Font("Cantarell", 1, 15)); // NOI18N
|
||||||
lblStatus.setText("Not Connected");
|
lblStatus.setText("Not Connected");
|
||||||
|
|
||||||
@ -414,9 +396,6 @@ public class AgentUI extends JFrame {
|
|||||||
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(lblStatus, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
.addComponent(lblStatus, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(btnControl)
|
|
||||||
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
|
|
||||||
.addComponent(btnView)
|
|
||||||
.addContainerGap())
|
.addContainerGap())
|
||||||
);
|
);
|
||||||
jPanel6Layout.setVerticalGroup(
|
jPanel6Layout.setVerticalGroup(
|
||||||
@ -426,8 +405,6 @@ public class AgentUI extends JFrame {
|
|||||||
.addGroup(jPanel6Layout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
|
.addGroup(jPanel6Layout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
|
||||||
.addComponent(jLabel20, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
.addComponent(jLabel20, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
.addGroup(jPanel6Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
|
.addGroup(jPanel6Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
|
||||||
.addComponent(btnView, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
||||||
.addComponent(btnControl)
|
|
||||||
.addComponent(lblStatus)))
|
.addComponent(lblStatus)))
|
||||||
.addContainerGap())
|
.addContainerGap())
|
||||||
);
|
);
|
||||||
@ -763,29 +740,6 @@ public class AgentUI extends JFrame {
|
|||||||
AgentManager.getInstance().setDeviceReady(true);
|
AgentManager.getInstance().setDeviceReady(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnControlMouseClicked(java.awt.event.MouseEvent evt) {
|
|
||||||
Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null;
|
|
||||||
if (desktop != null && desktop.isSupported(Desktop.Action.BROWSE)) {
|
|
||||||
try {
|
|
||||||
URI uri = new URI(AgentManager.getInstance().getDeviceMgtControlUrl());
|
|
||||||
desktop.browse(uri);
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void btnViewMouseClicked(java.awt.event.MouseEvent evt) {
|
|
||||||
Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null;
|
|
||||||
if (desktop != null && desktop.isSupported(Desktop.Action.BROWSE)) {
|
|
||||||
try {
|
|
||||||
URI uri = new URI(AgentManager.getInstance().getDeviceMgtAnalyticUrl());
|
|
||||||
desktop.browse(uri);
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void chkbxTemperatureRandomActionPerformed(java.awt.event.ActionEvent evt) {
|
private void chkbxTemperatureRandomActionPerformed(java.awt.event.ActionEvent evt) {
|
||||||
isTemperatureRandomized = chkbxTemperatureRandom.isSelected();
|
isTemperatureRandomized = chkbxTemperatureRandom.isSelected();
|
||||||
|
|||||||
@ -4,7 +4,6 @@
|
|||||||
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
|
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
|
||||||
<group>
|
<group>
|
||||||
<file>file:/home/lahiru/WSO2IOT/carbon-device-mgt-plugins/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/VirtualAgentUI.java</file>
|
<file>file:/home/lahiru/WSO2IOT/carbon-device-mgt-plugins/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/VirtualAgentUI.java</file>
|
||||||
<file>file:/home/lahiru/WSO2IOT/carbon-device-mgt-plugins/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/ui/AgentUI.java</file>
|
|
||||||
</group>
|
</group>
|
||||||
</open-files>
|
</open-files>
|
||||||
</project-private>
|
</project-private>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user