예제 #1
0
 public void setVolumeDown(Config params) {
   boolean executed =
       executeCommand(
           "set volume down",
           params); // executes the developer level command associated with 'set channel' action
   if (executed) {
     if (volume.getValue() != volume.getMin()) {
       volume.setValue(volume.getValue() - 1);
       // TODO: set the TV graphical representation
       // setView(1); //points to the second element in the XML views array (light on image)
       setChanged(true);
     }
   }
 }
예제 #2
0
 public void setChannelDown(Config params) {
   boolean executed =
       executeCommand(
           "set channel down",
           params); // executes the developer level command associated with 'set channel' action
   if (executed) {
     if (channel.getValue() != channel.getMin()) {
       channel.setValue(channel.getValue() - 1);
       powered.setValue(
           true); // select a channel turn on the tv automatically. This is for coherence.
       // TODO: set the TV graphical representation
       // setView(1); //points to the second element in the XML views array (light on image)
       setChanged(true);
     }
   }
 }
예제 #3
0
 public void setChannel(int rangeValue) {
   if (channel.getValue() != rangeValue) {
     channel.setValue(rangeValue);
     setChanged(true);
   }
 }
예제 #4
0
 public void setVolume(int rangeValue) {
   if (volume.getValue() != rangeValue) {
     volume.setValue(rangeValue);
     setChanged(true);
   }
 }