public SongInfoDialog(Dialog parent, boolean modal, File file) {
this(parent, modal);
this.file = file;
init();
}
/**
* 初始化
*/
private void init() {
try {
fileName.setText(file.toString());
RandomAccessFile ra = new RandomAccessFile(file, "r");
byte[] buffer = new byte[128];
ra.seek(ra.length() - 128);
ra.read(buffer);
info = new SongInfo(buffer);
valid = info.isValid();
title.setText(info.getSongName());
artist.setText(info.getArtist());
album.setText(info.getAlbum());
year.setText(info.getYear());
comment.setText(info.getComment());
r2.setText("" + info.getR2());
r3.setText("" + info.getR3());
ra.close();
} catch (Exception ex) {
Logger.getLogger(SongInfoDialog.class.getName()).log(Level.SEVERE, null, ex);
}
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
// <editor-fold defaultstate="collapsed" desc="Generated Code">
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] ... 下一页 >>
责任编辑:小草