setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
+ btnStop.addActionListener(new StopActionListener());
btnApply.addActionListener(new ApplyActionListener());
pnlMain.setBorder(BorderFactory.createEtchedBorder());
}
}
+ private class StopActionListener implements ActionListener {
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ // FIXME 待機中に停止しても「状態」の表示が変わらない。
+ final int row = tblDisplay.getSelectedRow();
+ final Target t = targetModel.getTarget(row);
+ final boolean res = taskManager.cancel(t.getRowId());
+ logger.log(Level.FINE, "停止: {0} {1}", new Object[]{t.getVideoId(), res});
+ }
+ }
+
private class ApplyActionListener implements ActionListener {
@Override
addTarget(list);
}
+ public Target getTarget(int rowIndex) {
+ return targets.get(rowIndex);
+ }
+
public void setStatus(int id, TaskKind taskKind, TaskStatus taskStatus, double percent, String status) {
int pos = -1;
for (int i = 0; i < targets.size(); i++) {