Changeset 10717 for extensions
- Timestamp:
- May 1, 2011, 12:46:18 PM (14 years ago)
- Location:
- extensions/jiwigo/trunk/src/main
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/mainframe/IThumbnailPanel.java
r8829 r10717 51 51 */ 52 52 public void setCategory(Category category); 53 54 public void refresh(); 53 55 } -
extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/mainframe/ThumbnailCategoryPanel.java
r10697 r10717 96 96 this.setLayout(new VerticalLayout()); 97 97 if (categoryId != null) { 98 r afraichir(categoryId, false);98 refresh(categoryId, false); 99 99 } 100 100 //gestion du drag'n drop … … 136 136 * @param categoryId the id of the category 137 137 */ 138 public void r afraichir(Integer categoryId, boolean rafraichir) {138 public void refresh(Integer categoryId, boolean rafraichir) { 139 139 this.categoryId = categoryId; 140 140 try { … … 154 154 } 155 155 156 public void refresh() { 157 refresh(categoryId, true); 158 } 159 156 160 /** 157 161 * Adds the thumbnails to the panel … … 179 183 // panelh.add(panel); 180 184 } 181 ThumbnailPanel panel = new ThumbnailPanel(image );185 ThumbnailPanel panel = new ThumbnailPanel(image, this); 182 186 panelh.add(panel); 183 187 nb++; … … 263 267 //refresh 264 268 MainFrame.getInstance().setAdditionalMessage(""); 265 r afraichir(categoryId, true);269 refresh(categoryId, true); 266 270 MainFrame.getInstance().getProgressBar().setValue(0); 267 271 imagesManagement.setSendingFiles(true); -
extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/mainframe/ThumbnailPanel.java
r10697 r10717 83 83 84 84 /** 85 * Popup menu to edit images info 86 */ 87 private JMenuItem menuDeleteImage; 88 89 /** 85 90 * Button to add tags 86 91 */ … … 96 101 */ 97 102 private JDialog dialogChoixTags; 103 /** 104 * The parent 105 */ 106 private IThumbnailPanel parent; 98 107 99 108 /** … … 102 111 * @param imagesPanel the panel 103 112 */ 104 public ThumbnailPanel(Image image ) {113 public ThumbnailPanel(Image image, IThumbnailPanel parent) { 105 114 this.image = image; 115 this.parent = parent; 106 116 setToolTipText("<html><center>" + image.getName() + "<br/>" + image.getSeen() + " " 107 117 + Messages.getMessage("hits") + "</center></html>"); … … 139 149 menuAjouterTag.addActionListener(this); 140 150 popup.add(menuAjouterTag); 151 menuDeleteImage = new JMenuItem(Messages.getMessage("thumbviewer_deleteImage")); 152 menuDeleteImage.addActionListener(this); 153 popup.add(menuDeleteImage); 141 154 popup.show(this, paramMouseEvent.getX(), paramMouseEvent.getY()); 142 155 } … … 233 246 } 234 247 248 } else if (arg0.getSource().equals(menuDeleteImage)) { 249 try { 250 if (SpringUtils.getImageService().delete(image)) { 251 parent.refresh(); 252 } else { 253 JOptionPane.showMessageDialog(this, Messages.getMessage("deletingImageError"), 254 Messages.getMessage("error"), JOptionPane.ERROR_MESSAGE); 255 } 256 } catch (JiwigoException e) { 257 LOG.error(Tools.getStackTrace(e)); 258 JOptionPane.showMessageDialog(this, Messages.getMessage("deletingImageError"), 259 Messages.getMessage("error"), JOptionPane.ERROR_MESSAGE); 260 } 235 261 } 236 262 } 263 237 264 } -
extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/mainframe/ThumbnailSearchPanel.java
r9921 r10717 98 98 nb = 0; 99 99 } else { 100 ThumbnailPanel panel = new ThumbnailPanel(image );100 ThumbnailPanel panel = new ThumbnailPanel(image, this); 101 101 panelh.add(panel); 102 102 } … … 156 156 } 157 157 158 @Override 159 public void refresh() { 160 // TODO Auto-generated method stub 161 162 } 163 158 164 } -
extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/mainframe/thread/ThreadPhotoSending.java
r9921 r10717 88 88 MainFrame.getInstance().setAdditionalMessage(""); 89 89 //refresh 90 thumbPanel.r afraichir(thumbPanel.getCategoryId(), true);90 thumbPanel.refresh(thumbPanel.getCategoryId(), true); 91 91 MainFrame.getInstance().getProgressBar().setValue(0); 92 92 } -
extensions/jiwigo/trunk/src/main/resources/fr/mael/jiwigo/trad/messages.properties
r10715 r10717 48 48 thumbviewer_addTag=Add tags 49 49 thumbviewer_selectTag=Select tags : 50 thumbviewer_deleteImage=Delete image 50 51 51 52 ##################################################### … … 72 73 fileAlreadyExistsError=<html><center>Some of the selected files exist on the server. They will not be created.<br/>Affected images are :</center><ul>%s</ul></html> 73 74 deletingCategoryError=Unexpected error while deleting the category 75 deletingImageError=Unexpected error while deleting the image 74 76 75 77 ##################################################### -
extensions/jiwigo/trunk/src/main/resources/fr/mael/jiwigo/trad/messages_en.properties
r10715 r10717 48 48 thumbviewer_addTag=Add tags 49 49 thumbviewer_selectTag=Select tags : 50 thumbviewer_deleteImage=Delete image 50 51 51 52 ##################################################### … … 72 73 fileAlreadyExistsError=<html><center>Some of the selected files exist on the server. They will not be created.<br/>Affected images are :</center><ul>%s</ul></html> 73 74 deletingCategoryError=Unexpected error while deleting the category 75 deletingImageError=Unexpected error while deleting the image 74 76 75 77 ##################################################### -
extensions/jiwigo/trunk/src/main/resources/fr/mael/jiwigo/trad/messages_fr.properties
r10715 r10717 48 48 thumbviewer_addTag=Ajouter des tags 49 49 thumbviewer_selectTag=Veuillez sélectionner un (des) tag(s) : 50 thumbviewer_deleteImage=Supprimer l'image 50 51 51 52 ##################################################### … … 72 73 fileAlreadyExistsError=<html><center>Certains des fichiers envoyés existent sur le serveur. Les images ne seront pas créées.<br/>Les images concernées sont : </center><ul>%s</ul></html> 73 74 deletingCategoryError=Erreur inattendue lors de la suppression de la catégorie 75 deletingImageError=Erreur inattendue lors de la suppression de l'image 74 76 75 77 #####################################################
Note: See TracChangeset
for help on using the changeset viewer.