blob: b88d586350f87e96e1d4c0337a1a6700902b85c8 [file] [log] [blame]
adminbae64d82013-08-01 10:50:15 -07001/*
2 * To change this template, choose Tools | Templates
3 * and open the template in the editor.
4 */
5package tai_ofa;
6
7import javafx.application.Application;
8import javafx.event.ActionEvent;
9import javafx.event.EventHandler;
10import javafx.geometry.Insets;
11import javafx.geometry.Pos;
12import javafx.scene.Group;
13import javafx.scene.Scene;
14import javafx.scene.control.Button;
15import javafx.scene.control.Label;
16import javafx.scene.control.Tab;
17import javafx.scene.control.TabPane;
18import javafx.scene.control.TextField;
19import javafx.scene.control.TextFieldBuilder;
20import javafx.scene.image.Image;
21import javafx.scene.image.ImageView;
22import javafx.scene.layout.GridPane;
23import javafx.scene.layout.HBox;
24import javafx.scene.layout.StackPane;
25import javafx.scene.layout.VBox;
26import javafx.stage.Stage;
27
28/**
29 *
30 * @author Raghav Kashyap raghavkashyap@paxterrasolutions.com
31
32 * TestON is free software: you can redistribute it and/or modify
33 * it under the terms of the GNU General Public License as published by
34 * the Free Software Foundation, either version 2 of the License, or
35 * (at your option) any later version.
36
37 * TestON is distributed in the hope that it will be useful,
38 * but WITHOUT ANY WARRANTY; without even the implied warranty of
39 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
40 * GNU General Public License for more details.
41
42 * You should have received a copy of the GNU General Public License
43 * along with TestON. If not, see <http://www.gnu.org/licenses/>.
44
45 */
46public class ExecutionConsole extends Application {
47
48 Stage copyStage;
49 Scene scene;
50 TextField value ;
51 String Title,enteredValue ;
52 Button submit ;
53 ExecutionConsole(String Title,Button enter, TextField value) {
54 this.Title = Title;
55 this.submit = enter;
56 this.value = value;
57 }
58
59 @Override public void start(final Stage primaryStage) throws Exception {
60 copyStage = primaryStage;
61
62 Group root = new Group();
63 GridPane basePane = new GridPane();
64 basePane.setPadding(new Insets(2, 0, 2, 0));
65 basePane.setVgap(5);
66 basePane.setHgap(2);
67 value.setEditable(true);
68 value.clear();
69 enteredValue = "";
70 Label info = new Label("Please pass the appropriate value");
71
72
73 basePane.add(value, 0, 1);
74 basePane.add(submit, 1, 1);
75 basePane.add(info, 0, 0);
76 scene = new Scene(root, 550, 60);
77
78 root.getChildren().addAll(basePane);
79 primaryStage.setTitle(Title);
80 primaryStage.setScene(scene);
81 primaryStage.show();
82 }
83
84 public void closeWindow(){
85 copyStage.close();
86 }
87 public void setValue(String value){
88 enteredValue = value;
89 }
90 public String getValue(){
91 return enteredValue;
92 }
93
94 public void setTitles(String title){
95 copyStage.setTitle(title);
96 }
97
98}