slider.setSelection(sendData);
sliderText.setText(Integer.toString(sendData));
sendMessage(sendData, sensorOn);
- if(sendData == 100 && radioButton[0].getSelection() == true)
- {
- radioButton[0].setSelection(false);
- radioButton[1].setSelection(true);
- sensorOn = 0;
- sendMessage(sendData, sensorOn);
- }
}
});
radioButton[0].addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
- if(sendData == 100)
- {
- DialogUtil.openMessageDialog("This is device message.\nBattery level is full.\nIf you want connect charger, please make changes to the battery level.");
- radioButton[0].setSelection(false);
- radioButton[1].setSelection(true);
- }
-
for( int i = 0 ; i < radioButton.length ; i++ )
{
if(radioButton[i].getSelection()) {