/*
 * GenericAppButton.fx
 *
 * Created on Dec 5, 2009, 2:50:34 PM
 */

package vismobile;

import javafx.scene.Group;
import javafx.scene.Node;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.input.MouseEvent;

/**
 * @author student
 */

public class GenericAppButton extends GenericButton{


    public var displayimage: Image;
    public var onclickAction: function(e:MouseEvent):Void;

    public override function create(): Node {
        Group{
            blocksMouse: true;
                content:[

                    ImageView {
                        fitWidth: Main.stage.width/5
                        preserveRatio: true
                        smooth: true
                        cache: true
                        image: displayimage
                    }
                ]

            onMousePressed: onclickAction;
        }
    }
}
