pnlNgId.init(ngIds);
/*
+ * 検索
+ */
+ pnlSearchVideo.init(p.getSearchVideoDirs());
+ pnlSearchComment.init(p.getSearchCommentDirs());
+
+ /*
* システム
*/
fldSystemThreadDownload.setText(Integer.toString(p.getSystemDownloadThread()));
p.setNgIds(pnlNgId.getAllElements());
/*
+ * 検索
+ */
+ p.setSearchVideoDirs(pnlSearchVideo.getAllElements());
+ p.setSearchCommentDirs(pnlSearchComment.getAllElements());
+
+ /*
* システム
*/
p.setSystemDownloadThread(Integer.parseInt(fldSystemThreadDownload.getText()));
import java.awt.event.ActionListener;
import java.io.File;
import java.io.IOException;
+import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
private final JButton btnSearchVideoAdd = new JButton("追加...");
private final JButton btnSearchVideoDel = new JButton("削除");
+ List<String> getAllElements() {
+ List<String> res = new ArrayList<>(mdlSearchVideo.getSize());
+ for (int i = 0; i < mdlSearchVideo.getSize(); i++) {
+ res.add(mdlSearchVideo.get(i));
+ }
+ return res;
+ }
+
+ void init(List<String> dirs) {
+ mdlSearchVideo.clear();
+ for (String s : dirs) {
+ mdlSearchVideo.addElement(s);
+ }
+ }
+
DirectoryRegisterPanel() {
lstSearchVideo.setTransferHandler(new DirectoryTransferHandler(mdlSearchVideo));
btnSearchVideoAdd.addActionListener(new AddActionListener());