예제 #1
0
 public static void deleteGalleryAction(JButton jButton4) {
   PhotoList remove = UICtrlV2.loadedPhotoLists.remove(UICtrlV2.getCurrent());
   UICtrlV2.labels.remove(UICtrlV2.getCurrent());
   UICtrlV2.gui.getMp().getPll().remove(UICtrlV2.getCurrent());
   UICtrlV2.setCurrent(null);
   UICtrlV2.reopenNoPl();
   UICtrlV2.gui.repaint();
 }
예제 #2
0
 // GENERIC LISTENERS
 public static void addGalleryAction(JButton btn) {
   JFileChooser jfc = new JFileChooser();
   jfc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
   jfc.setMultiSelectionEnabled(false);
   if (jfc.showOpenDialog(btn) == JFileChooser.APPROVE_OPTION) {
     if (UICtrlV2.loadedPhotoLists.isEmpty()) UICtrlV2.gui.getMp().getPll().removeAll();
     UUID uid = ProcessingCtrl.acknowledge(jfc.getSelectedFile());
     UICtrlV2.closeNoPl();
     UICtrlV2.buildLabels(UICtrlV2.loadedPhotoLists.get(uid));
     UICtrlV2.setCurrent(uid);
     UICtrlV2.gui.getMp().getPll().add(UICtrlV2.loadedPhotoLists.get(uid));
     UICtrlV2.gui.repaint();
   }
 }
예제 #3
0
 /**
  * @author Anas Alaoui M'Darhri
  * @param toCurrent the new PhotoList you want to display on the main panel
  */
 public static void setCurrent(UUID toCurrent) {
   UICtrlV2.current = ProcessingCtrl.loadedPhotoLists.get(toCurrent);
   if (toCurrent != null) {
     System.out.println("curr " + current.toString());
     UICtrlV2.gui.getMp().getPlp().refresh(toCurrent);
     UICtrlV2.refreshDataDP();
     UICtrlV2.gui.repaint();
   }
 }