button removed

apim420
GDLMadushanka 8 years ago
parent c1ee9f2263
commit ebe19b959d

@ -159,7 +159,6 @@ public class AgentConfiguration {
public void setXmppServerName(String xmppServerName) {
this.xmppServerName = xmppServerName;
}
}

@ -44,7 +44,6 @@ public class AgentManager {
private boolean deviceReady = false;
private boolean isAlarmOn = false;
private String deviceMgtControlUrl, deviceMgtAnalyticUrl;
private String deviceName, agentStatus;
private int pushInterval; // seconds
@ -231,14 +230,6 @@ public class AgentManager {
this.deviceReady = deviceReady;
}
public String getDeviceMgtControlUrl() {
return deviceMgtControlUrl;
}
public String getDeviceMgtAnalyticUrl() {
return deviceMgtAnalyticUrl;
}
public AgentConfiguration getAgentConfigs() {
return agentConfigs;
}

@ -37,8 +37,6 @@ public class AgentUI extends JFrame {
private JLabel picLabelBulbOn, picLabelBulbOff;
// Variables declaration - do not modify
private JButton btnControl;
private JButton btnView;
private JCheckBox chkbxEmulate;
private JCheckBox chkbxHumidityRandom;
private JCheckBox chkbxHumiditySmooth;
@ -158,8 +156,6 @@ public class AgentUI extends JFrame {
chkbxTemperatureSmooth = new JCheckBox();
jPanel6 = new JPanel();
jLabel20 = new JLabel();
btnView = new JButton();
btnControl = new JButton();
lblStatus = new JLabel();
jPanel8 = new JPanel();
jLabel23 = new JLabel();
@ -387,20 +383,6 @@ public class AgentUI extends JFrame {
jLabel20.setText("Connection Status:");
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.setText("Not Connected");
@ -414,9 +396,6 @@ public class AgentUI extends JFrame {
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addComponent(lblStatus, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btnControl)
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btnView)
.addContainerGap())
);
jPanel6Layout.setVerticalGroup(
@ -426,8 +405,6 @@ public class AgentUI extends JFrame {
.addGroup(jPanel6Layout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
.addComponent(jLabel20, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(jPanel6Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
.addComponent(btnView, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(btnControl)
.addComponent(lblStatus)))
.addContainerGap())
);
@ -763,29 +740,6 @@ public class AgentUI extends JFrame {
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) {
isTemperatureRandomized = chkbxTemperatureRandom.isSelected();

@ -4,7 +4,6 @@
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<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/ui/AgentUI.java</file>
</group>
</open-files>
</project-private>

Loading…
Cancel
Save