/*
 * CarContextCourse.fx
 *
 * Created on Mar 23, 2010, 9:54:41 PM
 */

package vismobile;
import javafx.scene.Scene;
import javafx.scene.Group;
import javafx.scene.image.ImageView;
import javafx.scene.layout.HBox;
import javafx.scene.layout.VBox;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;
import java.lang.Math;

/**
 * @author Student
 */

public class CarContextFine extends Scene{

       override var content = [
        Group{

    content:[
            VBox{
                content:[


           HBox{
                   content:[
                           rectLocation24,
                           for(x in [1..3])
                           {
                                   Rectangle{
                                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    fill: Color.BLACK}

                           }
                           rectLocation17,
                           for(x in [1..3])
                           {
                                   Rectangle{
                                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    fill: Color.BLACK}

                           },
                           rectLocation18
                           ]

                   }
                    HBox{
                   content:[
                           Rectangle{
                                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    fill: Color.BLACK},
                           rectLocation16,
                           for(x in [1..2])
                           {
                                   Rectangle{
                                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    fill: Color.BLACK}

                           }
                           rectLocation9,
                           for(x in [1..2])
                           {
                                   Rectangle{
                                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    fill: Color.BLACK}

                           },
                           rectLocation10,
                           Rectangle{
                                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    fill: Color.BLACK}
                           ]

                   }

                    HBox{
                   content:[


                           for(x in [1..2])
                           {
                                   Rectangle{
                                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    fill: Color.BLACK}

                           }
                           rectLocation8,
                            Rectangle{
                                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    fill: Color.BLACK},
                            rectLocation1,
                             Rectangle{
                                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    fill: Color.BLACK},
                            rectLocation2,

                           for(x in [1..2])
                           {
                                   Rectangle{
                                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    fill: Color.BLACK}

                           }
                           ]

                   }
                    HBox{
                   content:[


                           for(x in [1..9])
                           {
                                   Rectangle{
                                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    fill: Color.BLACK}

                           }

                           ]

                   }
                   HBox{
                   content:[

                            rectLocation23,
                            rectLocation15,
                            rectLocation7,
                           for(x in [1..3])
                           {
                                   Rectangle{
                                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    fill: Color.BLACK}

                           }
                           rectLocation3,
                            rectLocation11,
                            rectLocation19,

                           ]

                   }
                   HBox{
                   content:[


                           for(x in [1..9])
                           {
                                   Rectangle{
                                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    fill: Color.BLACK}

                           }

                           ]

                   }

                     HBox{
                   content:[


                           for(x in [1..2])
                           {
                                   Rectangle{
                                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    fill: Color.BLACK}

                           }
                           rectLocation6,
                            Rectangle{
                                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    fill: Color.BLACK},
                            rectLocation5,
                             Rectangle{
                                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    fill: Color.BLACK},
                            rectLocation4,

                           for(x in [1..2])
                           {
                                   Rectangle{
                                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    fill: Color.BLACK}

                           }
                           ]

                   }

                   HBox{
                   content:[
                           Rectangle{
                                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    fill: Color.BLACK},
                           rectLocation14,
                           for(x in [1..2])
                           {
                                   Rectangle{
                                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    fill: Color.BLACK}

                           }
                           rectLocation13,
                           for(x in [1..2])
                           {
                                   Rectangle{
                                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    fill: Color.BLACK}

                           },
                           rectLocation12,
                           Rectangle{
                                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    fill: Color.BLACK}
                           ]

                   }

                    HBox{
                   content:[
                           rectLocation22,
                           for(x in [1..3])
                           {
                                   Rectangle{
                                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    fill: Color.BLACK}

                           }
                           rectLocation21,
                           for(x in [1..3])
                           {
                                   Rectangle{
                                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                                    fill: Color.BLACK}

                           },
                           rectLocation20
                           ]

                   }


                   ]
                   }

                     Group {
                    translateX: Main.stage.width - Math.ceil(Main.stage.width / 4.25) - 3

                    content: [
                        VBox {
                            spacing: 1

                            content: [

                                AlertImage{
                                        displayimage: bind Main.alertImage1;
                                        }
                                        AlertImage{
                                        displayimage: bind Main.alertImage2;
                                        }
                                        AlertImage{
                                        displayimage: bind Main.alertImage3;
                                        }
                                        AlertImage{
                                        displayimage: bind Main.alertImage4;
                                        }


                            ]
                        }
                    ]
                }
                    Group {
                            var homeButton: HomeButton =
                                    HomeButton {
                                        desc: "HOME"
                                    }
                            translateX: 1
                            translateY: Main.stage.height - homeButton.boundsInLocal.height;
                            content: [
                                homeButton]
                        }

                          Group {
                    var carImage = ImageView {
                                image: CommonFunctionsFX.getImage("car_lg")
                                fitWidth: Math.ceil(Main.stage.width / 4.25)
                                preserveRatio: true
                                smooth: true
                                cache: true }
                    translateX: (Math.ceil(Main.stage.width / 4.25) * 3) / 2 - carImage.boundsInParent.width / 2
                    translateY: (Math.ceil(Main.stage.width / 4.25) * 3) / 2 - carImage.boundsInParent.height / 2
                    content: [
                        carImage
                    ]
                }

            ]
        }

]
}



def rectLocation1 = Rectangle{
                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3)
                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3)
                    fill:  bind Main.fineRect1.color}

def rectLocation2 = Rectangle{
                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    fill:  bind Main.fineRect2.color}

def rectLocation3 = Rectangle{
                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    fill:  bind Main.fineRect3.color}

def rectLocation4 = Rectangle{
                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    fill:  bind Main.fineRect4.color}

def rectLocation5 = Rectangle{
                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    fill: bind Main.fineRect5.color}

def rectLocation6 = Rectangle{
                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    fill: bind Main.fineRect6.color}

def rectLocation7 = Rectangle{
                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    fill: bind Main.fineRect7.color}

def rectLocation8 = Rectangle{
                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    fill: bind Main.fineRect8.color}

def rectLocation9 = Rectangle{
                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    fill: bind Main.fineRect9.color}

def rectLocation10 = Rectangle{
                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    fill: bind Main.fineRect10.color}

def rectLocation11 = Rectangle{
                   width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    fill: bind Main.fineRect11.color}

def rectLocation12 = Rectangle{
                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    fill: bind Main.fineRect12.color}

def rectLocation13 = Rectangle{
                   width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    fill: bind Main.fineRect13.color}

def rectLocation14 = Rectangle{
                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    fill: bind Main.fineRect14.color}

def rectLocation15 = Rectangle{
                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    fill: bind Main.fineRect15.color}

def rectLocation16 = Rectangle{
                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    fill: bind Main.fineRect16.color}

def rectLocation17 = Rectangle{
                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    fill: bind Main.fineRect17.color}

def rectLocation18 = Rectangle{
                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    fill: bind Main.fineRect18.color}

def rectLocation19 = Rectangle{
                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    fill: bind Main.fineRect19.color}

def rectLocation20 = Rectangle{
                   width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    fill: bind Main.fineRect20.color}

def rectLocation21 = Rectangle{
                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    fill: bind Main.fineRect21.color}

def rectLocation22 = Rectangle{
                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    fill: bind Main.fineRect22.color}

def rectLocation23 = Rectangle{
                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    fill: bind Main.fineRect23.color}

def rectLocation24 = Rectangle{
                    width: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    height: Math.ceil(Math.ceil(Main.stage.width / 4.25)/3);
                    fill: bind Main.fineRect24.color}




