/* * BlueTheme.fx * * Created on Feb 8, 2008, 9:56:43 PM */ package themes; import javafx.scene.CustomNode; import javafx.scene.Group; import javafx.scene.Node; import javafx.scene.shape.Rectangle; import javafx.scene.paint.Color; import javafx.scene.paint.LinearGradient; import javafx.scene.paint.Stop; import javafx.scene.text.Text; import javafx.scene.text.Font; import javafx.scene.input.MouseEvent; /** * @author Vaibhav Choudhary */ var sceneWidth = bind Main.width; var sceneHeight = bind Main.height; public class BlueTheme extends CustomNode { public override function create(): Node { return Group { content: [ Rectangle { x: 0, y: 0 width: bind sceneWidth - 1 height: bind sceneHeight - 1 fill: Color.TRANSPARENT stroke: Color.BLACK strokeWidth: 2 }, Rectangle { x: 1, y: 1 width: bind sceneWidth - 1, height: 30 opacity: 0.8 fill: LinearGradient { startX: 0.0 startY: 0.0 endX: 0.0 endY: 1.0 stops: [ Stop { color: Color.BLUE offset: 0.0 }, Stop { color: Color.DARKBLUE offset: 0.7 }, Stop { color: Color.BLUE offset: 1.0 }, ] } }, Rectangle { x: bind sceneWidth - 25, y: 5 width: 20, height: 20 opacity: 0.3 onMouseClicked: function( e: MouseEvent ):Void { FX.exit(); } fill: LinearGradient { startX: 0.0 startY: 0.0 endX: 0.0 endY: 1.0 stops: [ Stop { color: Color.LIGHTBLUE offset: 0.0 }, Stop { color: Color.DARKBLUE offset: 0.5 }, Stop { color: Color.LIGHTBLUE offset: 1.0 }, ] } arcHeight: 5 arcWidth: 5 }, Text { font: Font { size: 20 } x: bind sceneWidth - 20, y: 20 content: "x" } ] }; } }