mote types are returned as array now
This commit is contained in:
parent
230d580aae
commit
fc57a7acc8
2 changed files with 7 additions and 7 deletions
|
@ -26,7 +26,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: SimInformation.java,v 1.4 2007/11/23 06:21:24 fros4943 Exp $
|
||||
* $Id: SimInformation.java,v 1.5 2009/03/10 21:20:30 fros4943 Exp $
|
||||
*/
|
||||
|
||||
package se.sics.cooja.plugins;
|
||||
|
@ -155,7 +155,7 @@ public class SimInformation extends VisPlugin {
|
|||
smallPane.add(Box.createHorizontalGlue());
|
||||
|
||||
label = new JLabel();
|
||||
label.setText("" + simulation.getMoteTypes().size());
|
||||
label.setText("" + simulation.getMoteTypes().length);
|
||||
|
||||
labelNrMoteTypes = label;
|
||||
smallPane.add(label);
|
||||
|
@ -203,7 +203,7 @@ public class SimInformation extends VisPlugin {
|
|||
labelStatus.setText("STOPPED");
|
||||
}
|
||||
labelNrMotes.setText("" + simulation.getMotesCount());
|
||||
labelNrMoteTypes.setText("" + simulation.getMoteTypes().size());
|
||||
labelNrMoteTypes.setText("" + simulation.getMoteTypes().length);
|
||||
|
||||
}
|
||||
});
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: VisState.java,v 1.5 2008/10/03 14:30:51 fros4943 Exp $
|
||||
* $Id: VisState.java,v 1.6 2009/03/10 21:20:39 fros4943 Exp $
|
||||
*/
|
||||
|
||||
package se.sics.cooja.plugins;
|
||||
|
@ -119,11 +119,11 @@ public class VisState extends Visualizer2D {
|
|||
|
||||
|
||||
// Associate different colors with different mote types
|
||||
Vector<MoteType> allTypes = simulation.getMoteTypes();
|
||||
int numberOfTypes = allTypes.size();
|
||||
MoteType[] allTypes = simulation.getMoteTypes();
|
||||
int numberOfTypes = allTypes.length;
|
||||
|
||||
for (int colCounter=0; colCounter < numberOfTypes && colCounter < moteTypeColors.length; colCounter++) {
|
||||
if (mote.getType() == allTypes.get(colCounter)) {
|
||||
if (mote.getType() == allTypes[colCounter]) {
|
||||
returnColors[0] = moteTypeColors[colCounter];
|
||||
return returnColors;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue