Button: None of the buttons will saves its state

Saving a buttons state in simulation file is not required as its state
is much too volatile.
This commit is contained in:
Enrico Joerns 2014-10-31 00:49:43 +01:00
parent 82d30ef2e3
commit 378ca2629d
5 changed files with 12 additions and 39 deletions

View file

@ -30,9 +30,7 @@
package org.contikios.cooja.mspmote.interfaces;
import java.util.Collection;
import org.apache.log4j.Logger;
import org.jdom.Element;
import org.contikios.cooja.*;
import org.contikios.cooja.interfaces.Button;
@ -72,11 +70,4 @@ public class ESBButton extends Button {
return false;
}
public Collection<Element> getConfigXML() {
return null;
}
public void setConfigXML(Collection<Element> configXML, boolean visAvailable) {
}
}

View file

@ -28,8 +28,6 @@
*/
package org.contikios.cooja.mspmote.interfaces;
import java.util.Collection;
import org.jdom.Element;
import org.contikios.cooja.ClassDescription;
import org.contikios.cooja.Mote;
import org.contikios.cooja.Simulation;
@ -83,15 +81,6 @@ public class MspButton extends Button {
return button.isPressed();
}
@Override
public Collection<Element> getConfigXML() {
return null;
}
@Override
public void setConfigXML(Collection<Element> configXML, boolean visAvailable) {
}
private class ButtonClick extends TimeEvent implements Runnable {
public ButtonClick() {

View file

@ -30,7 +30,6 @@
package org.contikios.cooja.mspmote.interfaces;
import java.util.Collection;
import org.apache.log4j.Logger;
import org.contikios.cooja.ClassDescription;
import org.contikios.cooja.Mote;
@ -38,7 +37,6 @@ import org.contikios.cooja.MoteTimeEvent;
import org.contikios.cooja.Simulation;
import org.contikios.cooja.interfaces.Button;
import org.contikios.cooja.mspmote.SkyMote;
import org.jdom.Element;
@ClassDescription("Button")
public class SkyButton extends Button {
@ -104,12 +102,4 @@ public class SkyButton extends Button {
return false;
}
public Collection<Element> getConfigXML() {
return null;
}
public void setConfigXML(Collection<Element> configXML, boolean visAvailable) {
}
}

View file

@ -30,9 +30,7 @@
package org.contikios.cooja.contikimote.interfaces;
import java.util.Collection;
import org.apache.log4j.Logger;
import org.jdom.Element;
import org.contikios.cooja.*;
import org.contikios.cooja.contikimote.ContikiMote;
@ -162,11 +160,4 @@ public class ContikiButton extends Button implements ContikiMoteInterface {
return moteMem.getByteValueOf("simButtonIsDown") == 1;
}
public Collection<Element> getConfigXML() {
return null;
}
public void setConfigXML(Collection<Element> configXML, boolean visAvailable) {
}
}

View file

@ -32,9 +32,11 @@ package org.contikios.cooja.interfaces;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Collection;
import javax.swing.JButton;
import javax.swing.JPanel;
import org.contikios.cooja.*;
import org.jdom.Element;
/**
* A Button represents a mote button. An implementation should notify all
@ -85,4 +87,14 @@ public abstract class Button extends MoteInterface {
public void releaseInterfaceVisualizer(JPanel panel) {
}
@Override
public Collection<Element> getConfigXML() {
// The button state will not be saved!
return null;
}
@Override
public void setConfigXML(Collection<Element> configXML, boolean visAvailable) {
// The button state will not be saved!
}
}