-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgui.pde
107 lines (89 loc) · 3.99 KB
/
gui.pde
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
/* =========================================================
* ==== WARNING ===
* =========================================================
* The code in this tab has been generated from the GUI form
* designer and care should be taken when editing this file.
* Only add/edit code inside the event handlers i.e. only
* use lines between the matching comment tags. e.g.
void myBtnEvents(GButton button) { //_CODE_:button1:12356:
// It is safe to enter your event code here
} //_CODE_:button1:12356:
* Do not rename this tab!
* =========================================================
*/
public void variablesChange(GTextField source, GEvent event) { //_CODE_:variables:674997:
println("variables - GTextField event occured " + System.currentTimeMillis()%10000000 );
} //_CODE_:variables:674997:
public void condicionesChange(GTextField source, GEvent event) { //_CODE_:condiciones:808061:
println("condiciones - GTextField event occured " + System.currentTimeMillis()%10000000 );
} //_CODE_:condiciones:808061:
public void dropList1_click1(GDropList source, GEvent event) { //_CODE_:tipoSimplex:852103:
println("tipoSimplex - GDropList event occured " + System.currentTimeMillis()%10000000 );
} //_CODE_:tipoSimplex:852103:
public void botonCalcular(GButton source, GEvent event) { //_CODE_:boton:820723:
println("button1 - GButton event occured " + System.currentTimeMillis()%10000000 );
valorCondiciones=int(condiciones.getText());
valorVariables=int(variables.getText());
if(valorCondiciones == 0 || valorVariables == 0)
G4P.showMessage(this, "SETEAR VARIABLES Y CONDICIONES","SETEAR VARIABLES Y CONDICIONES", G4P.WARNING);
else {
numeroPaso=1;
}
} //_CODE_:boton:820723:
synchronized public void win_draw1(GWinApplet appc, GWinData data) { //_CODE_:paso:468338:
appc.background(230);
} //_CODE_:paso:468338:
// Create all the GUI controls.
// autogenerated do not edit
public void createGUI(){
G4P.messagesEnabled(false);
G4P.setGlobalColorScheme(GCScheme.BLUE_SCHEME);
G4P.setCursor(ARROW);
if(frame != null)
frame.setTitle("Ingreso de datos");
condiciones = new GTextField(this,72 , 8, 50, 20, G4P.SCROLLBARS_NONE);
condiciones.setDefaultText("0");
condiciones.setOpaque(true);
condiciones.addEventHandler(this, "condicionesChange");
condicionesLabel = new GLabel(this, 137, 7, 86, 20);
condicionesLabel.setText("condiciones:");
condicionesLabel.setOpaque(false);
variables = new GTextField(this, 227, 8, 50, 20, G4P.SCROLLBARS_NONE);
variables.setDefaultText("0");
variables.setOpaque(true);
variables.addEventHandler(this, "condicionesChange");
varLabel = new GLabel(this, -14, 9, 80, 20);
varLabel.setText("Var:");
varLabel.setOpaque(false);
tipoSimplex = new GDropList(this, 332, 6, 90, 44, 2);
tipoSimplex.setItems(loadStrings("list_852103"), 0);
tipoSimplex.addEventHandler(this, "dropList1_click1");
botonCalcular = new GButton(this, 2, 600, 100, 20);
botonCalcular.setText("Calcular");
botonCalcular.addEventHandler(this, "botonCalcular");
botonNext = new GButton(this, 112, 600, 100, 20, "Next");
botonPrev = new GButton(this, 212, 600, 100, 20, "Prev");
botonCancela = new GButton(this, 312, 600, 90, 20, "Cancela");
tt = new GTabManager();
tt.addControls(condiciones,variables);
}
void ventanaPaso(){
paso = new GWindow(this, "paso N"+numeroPaso, 0, 0, 1024, 768, false, JAVA2D);
paso.setActionOnClose(G4P.CLOSE_WINDOW);
paso.addDrawHandler(this, "win_draw1");
botonCancelaVentana=new GButton(paso.papplet, 312, 600, 90, 20, "Cancela");
// label1 = new GLabel(paso.papplet, 472, 374, 80, 20);
// label1.setText("Aca");
// label1.setOpaque(false);
// System.out.println("Next");
}
// Variable declarations
// autogenerated do not edit
GTextField variables;
GLabel varLabel;
GTextField condiciones;
GLabel condicionesLabel;
GDropList tipoSimplex;
GButton botonCalcular,botonNext,botonPrev,botonCancela,botonCancelaVentana;
GLabel label1;
GTabManager tt;