minor fixes: integer wrap in repaint method + check watchpoint cast
This commit is contained in:
parent
e8ca6d4a4e
commit
3c7d0329ef
1 changed files with 3 additions and 3 deletions
|
@ -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: TimeLine.java,v 1.7 2009/06/11 10:02:53 fros4943 Exp $
|
* $Id: TimeLine.java,v 1.8 2009/06/15 09:47:05 fros4943 Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package se.sics.cooja.plugins;
|
package se.sics.cooja.plugins;
|
||||||
|
@ -992,7 +992,7 @@ public class TimeLine extends VisPlugin {
|
||||||
String tooltip = "<html>Mote: " + allMoteEvents.get(mote).mote + "<br>";
|
String tooltip = "<html>Mote: " + allMoteEvents.get(mote).mote + "<br>";
|
||||||
|
|
||||||
/* Time */
|
/* Time */
|
||||||
long time = event.getPoint().x*currentPixelDivisor;
|
long time = event.getPoint().x*(long)currentPixelDivisor;
|
||||||
tooltip += "Time (ms): " + (double)(time/Simulation.MILLISECOND) + "<br>";
|
tooltip += "Time (ms): " + (double)(time/Simulation.MILLISECOND) + "<br>";
|
||||||
|
|
||||||
/* Event */
|
/* Event */
|
||||||
|
@ -1383,7 +1383,7 @@ public class TimeLine extends VisPlugin {
|
||||||
public void addWatchpoint(WatchpointEvent ev) {
|
public void addWatchpoint(WatchpointEvent ev) {
|
||||||
/* Automatically toggle colors */
|
/* Automatically toggle colors */
|
||||||
/* TODO Move color decision to watchpoint interface? */
|
/* TODO Move color decision to watchpoint interface? */
|
||||||
if (lastWatchpointEvent != null) {
|
if (lastWatchpointEvent != null && lastWatchpointEvent instanceof WatchpointEvent) {
|
||||||
if (((WatchpointEvent)lastWatchpointEvent).color == Color.RED) {
|
if (((WatchpointEvent)lastWatchpointEvent).color == Color.RED) {
|
||||||
((WatchpointEvent)ev).color = Color.GREEN;
|
((WatchpointEvent)ev).color = Color.GREEN;
|
||||||
} else if (((WatchpointEvent)lastWatchpointEvent).color == Color.GREEN) {
|
} else if (((WatchpointEvent)lastWatchpointEvent).color == Color.GREEN) {
|
||||||
|
|
Loading…
Reference in a new issue