Clear node positions when clearing node data
This commit is contained in:
parent
3426eae031
commit
02965e25f6
|
@ -26,7 +26,7 @@
|
||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id: CollectServer.java,v 1.1 2010/11/03 14:53:05 adamdunkels Exp $
|
* $Id: CollectServer.java,v 1.2 2010/11/12 00:12:55 nifi Exp $
|
||||||
*
|
*
|
||||||
* -----------------------------------------------------------------
|
* -----------------------------------------------------------------
|
||||||
*
|
*
|
||||||
|
@ -34,8 +34,8 @@
|
||||||
*
|
*
|
||||||
* Authors : Joakim Eriksson, Niclas Finne
|
* Authors : Joakim Eriksson, Niclas Finne
|
||||||
* Created : 3 jul 2008
|
* Created : 3 jul 2008
|
||||||
* Updated : $Date: 2010/11/03 14:53:05 $
|
* Updated : $Date: 2010/11/12 00:12:55 $
|
||||||
* $Revision: 1.1 $
|
* $Revision: 1.2 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package se.sics.contiki.collect;
|
package se.sics.contiki.collect;
|
||||||
|
@ -810,6 +810,10 @@ public class CollectServer implements SerialConnectionListener {
|
||||||
window.setVisible(false);
|
window.setVisible(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setUseSensorDataLog(boolean useSensorLog) {
|
||||||
|
this.isSensorLogUsed = useSensorLog;
|
||||||
|
}
|
||||||
|
|
||||||
public void setExitOnRequest(boolean doExit) {
|
public void setExitOnRequest(boolean doExit) {
|
||||||
this.doExitOnRequest = doExit;
|
this.doExitOnRequest = doExit;
|
||||||
if (exitItem != null) {
|
if (exitItem != null) {
|
||||||
|
@ -888,6 +892,10 @@ public class CollectServer implements SerialConnectionListener {
|
||||||
return configTable.getProperty(property, config.getProperty(property, defaultValue));
|
return configTable.getProperty(property, config.getProperty(property, defaultValue));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void removeConfig(String property) {
|
||||||
|
configTable.remove(property);
|
||||||
|
}
|
||||||
|
|
||||||
public int getDefaultMaxItemCount() {
|
public int getDefaultMaxItemCount() {
|
||||||
return defaultMaxItemCount;
|
return defaultMaxItemCount;
|
||||||
}
|
}
|
||||||
|
@ -1231,6 +1239,13 @@ public class CollectServer implements SerialConnectionListener {
|
||||||
v.clearNodeData();
|
v.clearNodeData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Remove any saved node positions
|
||||||
|
for(String key: configTable.keySet().toArray(new String[0])) {
|
||||||
|
String property = key.toString();
|
||||||
|
if (!property.startsWith("collect")) {
|
||||||
|
configTable.remove(property);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void clearSensorDataLog() {
|
private void clearSensorDataLog() {
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id: MapPanel.java,v 1.1 2010/11/03 14:53:05 adamdunkels Exp $
|
* $Id: MapPanel.java,v 1.2 2010/11/12 00:12:56 nifi Exp $
|
||||||
*
|
*
|
||||||
* -----------------------------------------------------------------
|
* -----------------------------------------------------------------
|
||||||
*
|
*
|
||||||
|
@ -34,8 +34,8 @@
|
||||||
*
|
*
|
||||||
* Authors : Joakim Eriksson, Niclas Finne
|
* Authors : Joakim Eriksson, Niclas Finne
|
||||||
* Created : 3 jul 2008
|
* Created : 3 jul 2008
|
||||||
* Updated : $Date: 2010/11/03 14:53:05 $
|
* Updated : $Date: 2010/11/12 00:12:56 $
|
||||||
* $Revision: 1.1 $
|
* $Revision: 1.2 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package se.sics.contiki.collect.gui;
|
package se.sics.contiki.collect.gui;
|
||||||
|
@ -563,7 +563,11 @@ public class MapPanel extends JPanel implements Configurable, Visualizer, Action
|
||||||
|
|
||||||
} else if (!isMap && source == lockedItem) {
|
} else if (!isMap && source == lockedItem) {
|
||||||
if (popupNode != null) {
|
if (popupNode != null) {
|
||||||
|
boolean wasFixed = popupNode.hasFixedLocation;
|
||||||
popupNode.hasFixedLocation = lockedItem.isSelected();
|
popupNode.hasFixedLocation = lockedItem.isSelected();
|
||||||
|
if (wasFixed && !popupNode.hasFixedLocation) {
|
||||||
|
server.removeConfig("collect.map." + popupNode.node.getID());
|
||||||
|
}
|
||||||
repaint();
|
repaint();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue