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)); } }