//
//  NextCell.m
//  TabBar
//
//  Created by Developer on 2/28/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import "Cell.h"

@implementation Cell


- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
        self.selectionStyle=UITableViewCellSelectionStyleNone;
       //backgroundImage
        backgroundImage=[[UIImageView alloc] initWithFrame:CGRectMake(3, 8, 320, 96)];
        [self.contentView addSubview:backgroundImage];
      //hourLabel
        hours=[[UILabel alloc] initWithFrame:CGRectMake(205, 14, 120, 20)];
        hours.textColor=[UIColor whiteColor];
        hours.backgroundColor=[UIColor clearColor];
        hours.font=[UIFont boldSystemFontOfSize:17];
        [backgroundImage addSubview:hours];
      //idLabel
        idLabel=[[UILabel alloc] initWithFrame:CGRectMake(20, 14, 160, 20)];
        idLabel.textColor=[UIColor blackColor];
        idLabel.backgroundColor=[UIColor clearColor];
        idLabel.font=[UIFont boldSystemFontOfSize:18];
        [backgroundImage addSubview:idLabel];
      //titleLabel
        titleLabel=[[UILabel alloc] initWithFrame:CGRectMake(20, 37, 265, 20)];
        titleLabel.textColor=[UIColor blackColor];
        titleLabel.backgroundColor=[UIColor clearColor];
        titleLabel.font=[UIFont boldSystemFontOfSize:17];
        [backgroundImage addSubview:titleLabel];
      //teacher
        teacherLabel=[[UILabel alloc] initWithFrame:CGRectMake(20, 59, 300, 20)];
        teacherLabel.textColor=[UIColor darkGrayColor];
        teacherLabel.backgroundColor=[UIColor clearColor];
        teacherLabel.font=[UIFont boldSystemFontOfSize:14];
        [backgroundImage addSubview:teacherLabel];
    }
    return self;
}


-(void) setFields:(CGRect) frame withImage:(NSString*) imageName withId:(NSString*) idC withTitle:(NSString*) titleC withTeacher:(NSString*) teacherC withHours:(NSString*) hoursC 
{
    backgroundImage.frame=frame;
    backgroundImage.image=[UIImage imageNamed:imageName];
    idLabel.text=idC;
    titleLabel.text=titleC;
    teacherLabel.text=teacherC;
    hours.text=hoursC;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
