-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgui.pde
59 lines (51 loc) · 2.16 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
/* ========================================================= //<>//
* ==== 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 input_change1(GTextField source, GEvent event) { //_CODE_:input:201393:
println("input - GTextField >> GEvent." + event + " @ " + millis());
} //_CODE_:input:201393:
public void button1_click1(GButton source, GEvent event) { //_CODE_:button1:688492:
println("button1 - GButton >> GEvent." + event + " @ " + millis());
morseTranslate(input.getText());
} //_CODE_:button1:688492:
// Create all the GUI controls.
// autogenerated do not edit
public void createGUI(){
G4P.messagesEnabled(false);
G4P.setGlobalColorScheme(GCScheme.BLUE_SCHEME);
G4P.setMouseOverEnabled(false);
surface.setTitle("Sketch Window");
input = new GTextField(this, 20, 10, 560, 40, G4P.SCROLLBARS_NONE);
input.setText("[ Text Eingabe ]");
input.setLocalColorScheme(GCScheme.CYAN_SCHEME);
input.setOpaque(true);
input.addEventHandler(this, "input_change1");
button1 = new GButton(this, 460, 200, 120, 60);
button1.setText("Übersetzen");
button1.setLocalColorScheme(GCScheme.CYAN_SCHEME);
button1.addEventHandler(this, "button1_click1");
morse = new GTextArea(this, 20, 70, 560, 110, G4P.SCROLLBARS_NONE);
morse.setText("[ Morse Übersetzung]");
morse.setLocalColorScheme(GCScheme.CYAN_SCHEME);
morse.setOpaque(true);
result = new GLabel(this, 20, 190, 250, 70);
result.setTextAlign(GAlign.CENTER, GAlign.MIDDLE);
result.setLocalColorScheme(GCScheme.CYAN_SCHEME);
result.setOpaque(false);
}
// Variable declarations
// autogenerated do not edit
GTextField input;
GButton button1;
GTextArea morse;
GLabel result;