public static SensorIcon getSensorIcon(SensorInfo sensorInfo) {
        
        ImageIcon downIcon = null;
        ImageIcon offIcon = null;
        ImageIcon onIcon = null;
        ImageIcon hotIcon = null;
        AudioClip alertClip = null;

        switch (sensorInfo.getSensorType()) {
            case SensorProtocol.SENSOR_TYPE_FIRE:
                downIcon = getImageIcon("/sosafe/res/FireAlarmDown.gif");
                offIcon = getImageIcon("/sosafe/res/FireAlarmOff.gif");
                onIcon = getImageIcon("/sosafe/res/FireAlarmOn.gif");
                hotIcon = getImageIcon("/sosafe/res/FireAlarmAlert.gif");
                alertClip = getAudioClip("/sosafe/res/FireAlarm.wav");
                break;
            case SensorProtocol.SENSOR_TYPE_SECURITY:
                downIcon = getImageIcon("/sosafe/res/SecurityAlarmDown.gif");
                offIcon = getImageIcon("/sosafe/res/SecurityAlarmOff.gif");
                onIcon = getImageIcon("/sosafe/res/SecurityAlarmOn.gif");
                hotIcon = getImageIcon("/sosafe/res/SecurityAlarmAlert.gif");
                alertClip = getAudioClip("/sosafe/res/SecurityAlarm.wav");
                break;
            default:
                break;
        }
        
        SensorIcon sensorIcon = new SensorIcon(sensorInfo.getSensorId(), downIcon, offIcon, onIcon, hotIcon, alertClip);
                
        sensorIcon.setRolloverEnabled(false);
        sensorIcon.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
            @Override
            public void mouseDragged(java.awt.event.MouseEvent evt) {
                sensorIcon.sensorIconMouseDragged(evt);
            }
        });
        sensorIcon.addMouseListener(new java.awt.event.MouseAdapter() {
            @Override
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                sensorIcon.sensorIconMouseClicked(evt);
            }
            @Override
            public void mousePressed(java.awt.event.MouseEvent evt) {
                sensorIcon.sensorIconMousePressed(evt);
            }

            @Override
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                sensorIcon.sensorIconMouseReleased(evt);
            }
        });
        return sensorIcon;
    }