blob: 1fe545354b43afa1a2d827be6fbc257487c85cfa (
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
|
package NET.worlds.scape;
import NET.worlds.console.Console;
import NET.worlds.console.PolledDialog;
import java.io.IOException;
import java.text.MessageFormat;
import java.util.Vector;
public class CDPositionPropertyEditor extends PropEditor {
private boolean ending;
private CDPositionPropertyEditor(Property property, boolean ending) {
super(property);
this.ending = ending;
}
@Override
public PolledDialog edit(EditTile parent, String title) {
CDTrackInfo trackInfo = null;
try {
trackInfo = CDPlayerAction.getTrackList(0);
} catch (IOException var9) {
}
Vector trackList = new Vector();
if (trackInfo != null) {
for (int i = 0; i < trackInfo.getNumTracks(); i++) {
int frames = this.ending ? trackInfo.getEndFrames(i) : trackInfo.getStartFrames(i);
String type = this.ending ? Console.message("End") : Console.message("Start");
Object[] arguments = new Object[]{new String("" + frames), new String(type), new String("" + (i + 1))};
trackList.addElement(MessageFormat.format(Console.message("of-track"), arguments));
}
}
return new CDPositionEditorDialog(parent, title, this.property, trackList);
}
public static Property make(Property property, boolean ending) {
return property.setEditor(new CDPositionPropertyEditor(property, ending));
}
}
|