blob: 006823de7d6269c0f860a25d0f01bc8681256222 (
plain) (
blame)
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
107
108
109
110
111
112
|
/* */ package NET.worlds.scape;
/* */
/* */ import NET.worlds.console.Console;
/* */ import NET.worlds.console.DialogReceiver;
/* */ import NET.worlds.console.PolledDialog;
/* */ import java.awt.Button;
/* */ import java.awt.Checkbox;
/* */ import java.awt.Event;
/* */ import java.awt.FlowLayout;
/* */ import java.awt.Font;
/* */ import java.awt.GridLayout;
/* */ import java.awt.Label;
/* */ import java.awt.Panel;
/* */ import java.awt.Window;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class CDControl
/* */ extends PolledDialog
/* */ {
/* */ private static final long serialVersionUID = 1L;
/* */ private Label display;
/* 30 */ private Button stopButton = new Button("[]");
/* 31 */ private Button pauseButton = new Button("||");
/* 32 */ private Button playButton = new Button(">");
/* 33 */ private Button prevButton = new Button("|<<");
/* 34 */ private Button nextButton = new Button(">>|");
/* */
/* 36 */ private Panel top = new Panel();
/* 37 */ private Panel bottom = new Panel();
/* 38 */ private Checkbox cdBox = new Checkbox(
/* 39 */ Console.message("Autoplay-CD"),
/* 40 */ CDAudio.useAutoCDFlag);
/* 41 */ private Checkbox midiBox = new Checkbox(
/* 42 */ Console.message("Autoplay-MIDI"),
/* 43 */ CDAudio.useMidiFlag);
/* */ private String time;
/* 45 */ private static Font font = new Font(
/* 46 */ Console.message("MenuFont"), 0, 12);
/* */
/* */ public CDControl(Window parent, DialogReceiver receiver)
/* */ {
/* 50 */ super(parent, receiver, Console.message("Music"), false);
/* 51 */ this.display = new Label(this.time = CDAudio.get().getTimeReadout());
/* 52 */ setAlignment(1);
/* 53 */ ready();
/* */ }
/* */
/* */ protected void build()
/* */ {
/* 58 */ setLayout(new GridLayout(2, 1));
/* */
/* 60 */ this.top.setLayout(new FlowLayout());
/* 61 */ this.top.add(this.display);
/* 62 */ this.top.add(this.stopButton);
/* 63 */ this.top.add(this.pauseButton);
/* 64 */ this.top.add(this.playButton);
/* 65 */ this.top.add(this.prevButton);
/* 66 */ this.top.add(this.nextButton);
/* */
/* 68 */ this.bottom.setLayout(new GridLayout(2, 1));
/* 69 */ this.cdBox.setFont(font);
/* 70 */ this.midiBox.setFont(font);
/* 71 */ this.bottom.add(this.cdBox);
/* 72 */ this.bottom.add(this.midiBox);
/* */
/* 74 */ add(this.top);
/* 75 */ add(this.bottom);
/* */ }
/* */
/* */ protected void activeCallback()
/* */ {
/* 80 */ String tmp = CDAudio.get().getTimeReadout();
/* 81 */ if (!tmp.equals(this.time)) {
/* 82 */ this.display.setText(this.time = tmp);
/* */ }
/* */ }
/* */
/* */ public boolean action(Event event, Object what) {
/* 87 */ Object target = event.target;
/* 88 */ if (target == this.stopButton) {
/* 89 */ CDAudio.get().stop();
/* 90 */ } else if (target == this.pauseButton) {
/* 91 */ CDAudio.get().pause();
/* 92 */ } else if (target == this.playButton) {
/* 93 */ CDAudio.get().play();
/* 94 */ } else if (target == this.prevButton) {
/* 95 */ CDAudio.get().prev();
/* 96 */ } else if (target == this.nextButton) {
/* 97 */ CDAudio.get().next();
/* 98 */ } else if (target == this.cdBox) {
/* 99 */ CDAudio.get().useAutoCD(this.cdBox.getState());
/* 100 */ } else if (target == this.midiBox) {
/* 101 */ CDAudio.get().setMidiFlag(this.midiBox.getState());
/* */ } else
/* 103 */ return false;
/* 104 */ return true;
/* */ }
/* */ }
/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\CDControl.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|