Changeset 9878 for extensions/jiwigo
- Timestamp:
- Mar 26, 2011, 5:47:02 PM (14 years ago)
- Location:
- extensions/jiwigo/trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/jiwigo/trunk/.classpath
r9393 r9878 23 23 <classpathentry kind="var" path="M2_REPO/org/swinglabs/swing-worker/1.1/swing-worker-1.1.jar"/> 24 24 <classpathentry kind="var" path="M2_REPO/org/swinglabs/swingx/1.6.1/swingx-1.6.1.jar"/> 25 <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER "/>25 <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/java-6-openjdk"/> 26 26 </classpath> -
extensions/jiwigo/trunk/pom.xml
r9431 r9878 3 3 <groupId>Jiwigo</groupId> 4 4 <artifactId>Jiwigo</artifactId> 5 <version>0.1 3</version>5 <version>0.14</version> 6 6 7 7 <repositories> -
extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/transverse/ImagesManagement.java
r9393 r9878 2 2 3 3 import java.awt.image.BufferedImage; 4 import java.io.IOException; 4 5 import java.net.URL; 5 6 import java.util.HashMap; … … 8 9 import javax.imageio.ImageIO; 9 10 11 import fr.mael.jiwigo.Main; 10 12 import fr.mael.jiwigo.om.Image; 13 import fr.mael.jiwigo.service.ImageService; 14 import fr.mael.jiwigo.transverse.exception.ProxyAuthenticationException; 11 15 import fr.mael.jiwigo.transverse.util.Tools; 12 16 … … 90 94 91 95 /** 96 * integer that contains the current category of the browser 97 * it allows to empty the list of images if the category changes 98 */ 99 private Integer currentCategory = -1; 100 101 /** 92 102 * singleton 93 103 */ … … 142 152 */ 143 153 public void setCurrentImage(Image image) { 154 if (!image.getIdCategory().equals(currentCategory)) { 155 try { 156 listImage = ImageService.getInstance(Main.sessionManager).listByCategory(image.getIdCategory(), true); 157 currentCategory = image.getIdCategory(); 158 } catch (IOException e) { 159 LOG.error(Tools.getStackTrace(e)); 160 } catch (ProxyAuthenticationException e) { 161 LOG.error(Tools.getStackTrace(e)); 162 } 163 } 144 164 currentImage = image; 145 165 int compteur = 0; 146 166 for (Image im : listImage) { 147 if (im. equals(image)) {167 if (im.getIdentifier().equals(image.getIdentifier())) { 148 168 currentImageIndex = compteur; 169 return; 149 170 } 150 171 compteur++; -
extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/MyCollapsiblePanel.java
r8830 r9878 1 1 package fr.mael.jiwigo.ui; 2 2 3 /* 4 * $Id: CollapsiblePaneDemo.java 1164 2009-11-03 04:22:00Z kschaefe $ 5 * 6 * Copyright 2009 Sun Microsystems, Inc., 4150 Network Circle, 7 * Santa Clara, California 95054, U.S.A. All rights reserved. 8 * 9 * This library is free software; you can redistribute it and/or 10 * modify it under the terms of the GNU Lesser General Public 11 * License as published by the Free Software Foundation; either 12 * version 2.1 of the License, or (at your option) any later version. 13 * 14 * This library is distributed in the hope that it will be useful, 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 * Lesser General Public License for more details. 18 * 19 * You should have received a copy of the GNU Lesser General Public 20 * License along with this library; if not, write to the Free Software 21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 3 /* 4 * $Id: CollapsiblePaneDemo.java 1164 2009-11-03 04:22:00Z kschaefe $ 5 * 6 * Copyright 2009 Sun Microsystems, Inc., 4150 Network Circle, 7 * Santa Clara, California 95054, U.S.A. All rights reserved. 8 * 9 * This library is free software; you can redistribute it and/or 10 * modify it under the terms of the GNU Lesser General Public 11 * License as published by the Free Software Foundation; either 12 * version 2.1 of the License, or (at your option) any later version. 13 * 14 * This library is distributed in the hope that it will be useful, 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 * Lesser General Public License for more details. 18 * 19 * You should have received a copy of the GNU Lesser General Public 20 * License along with this library; if not, write to the Free Software 21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 22 22 */ 23 23 … … 33 33 import fr.mael.jiwigo.ui.browser.BrowserPanel; 34 34 35 /** 35 /** 36 36 Copyright (c) 2010, Mael 37 37 All rights reserved. … … 58 58 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 59 59 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 60 * 61 * @author Karl George Schaefer 60 * 61 * @author Karl George Schaefer 62 62 */ 63 63 @SuppressWarnings("serial") … … 68 68 private JSplitPane splitPane; 69 69 70 // /** 71 // * main method allows us to run as a standalone demo. 70 // /** 71 // * main method allows us to run as a standalone demo. 72 72 // */ 73 73 // public static void main(String[] args) { … … 91 91 splitPane.setTopComponent(browserFrame); 92 92 splitPane.setBottomComponent(tabbedPane); 93 // splitPane.addPropertyChangeListener(new PropertyChangeListener() { 94 // 95 // @Override 96 // public void propertyChange(PropertyChangeEvent evt) { 97 // if (evt.getPropertyName().equals("dividerLocation")) { 98 // browserFrame.callRepaint(); 99 // } 100 // } 101 // }); 93 102 splitPane.setResizeWeight(0.5); 94 103 add(splitPane, BorderLayout.CENTER); … … 105 114 // public void changeSize(Dimension dimension) { 106 115 // Dimension dim = new Dimension(dimension.width, dimension.height - 400); 107 // 116 // 108 117 // } 109 118 -
extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/browser/BrowserImagePanel.java
r8831 r9878 53 53 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 54 54 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 55 55 56 56 * Panel qui affiche une image 57 57 * @author mael … … 61 61 MouseListener { 62 62 private BufferedImage image; 63 private double scale = 1.0; 63 //FIXME where I put scale = 1.0, there are display bugs (easy to reproduce : just have to move the horizontal 64 //splitpane where an image is loaded. 65 private double scale = 0.99; 64 66 boolean flipH = false; 65 67 boolean flipV = false; -
extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/browser/BrowserPanel.java
r9393 r9878 32 32 import fr.mael.jiwigo.transverse.util.Tools; 33 33 import fr.mael.jiwigo.ui.comments.CommentsDialog; 34 import fr.mael.jiwigo.ui.mainframe.MainFrame;35 34 36 35 /** … … 253 252 public void changeImage() { 254 253 imagePanel.changeImage(); 255 MainFrame.getInstance().getCollapsiblePanel().revalidate();256 MainFrame.getInstance().getCollapsiblePanel().repaint();254 // MainFrame.getInstance().getCollapsiblePanel().revalidate(); 255 // MainFrame.getInstance().getCollapsiblePanel().repaint(); 257 256 } 258 257 … … 316 315 } 317 316 317 public void callRepaint() { 318 if (menuBar != null) { 319 menuBar.repaint(); 320 menuBar.revalidate(); 321 } 322 if (panelBoutons != null) { 323 panelBoutons.repaint(); 324 panelBoutons.revalidate(); 325 } 326 if (imagePanel != null) { 327 imagePanel.repaint(); 328 imagePanel.revalidate(); 329 } 330 331 repaint(); 332 revalidate(); 333 } 334 318 335 // @Override 319 336 // public void dispose() { -
extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/mainframe/MainFrame.java
r9393 r9878 163 163 tabbedPane = new JTabbedPaneWithCloseIcons(); 164 164 collapsiblePanel = new MyCollapsiblePanel(tabbedPane); 165 // splitPane.setTopComponent(browserFrame); 166 // splitPane.setBottomComponent(tabbedPane); 165 167 splitPane.setRightComponent(collapsiblePanel); 166 168 … … 197 199 198 200 public void setBrowserVisible() { 201 splitPane.remove(imageSearchPanel); 202 splitPane.remove(collapsiblePanel); 199 203 splitPane.setRightComponent(collapsiblePanel); 200 204 splitPane.revalidate(); … … 205 209 206 210 public void setImageSearchPanelVisible() { 211 splitPane.remove(imageSearchPanel); 212 splitPane.remove(collapsiblePanel); 213 splitPane.setLeftComponent(categoriesTree); 207 214 splitPane.setRightComponent(imageSearchPanel); 208 215 splitPane.revalidate(); … … 317 324 } 318 325 319 / **320 * @return the collapsiblePanel321 */322 public MyCollapsiblePanel getCollapsiblePanel() {323 return collapsiblePanel;324 }326 // /** 327 // * @return the collapsiblePanel 328 // */ 329 // public MyCollapsiblePanel getCollapsiblePanel() { 330 // return collapsiblePanel; 331 // } 325 332 326 333 /** -
extensions/jiwigo/trunk/src/main/resources/log4j.xml
r8832 r9878 10 10 </layout> 11 11 </appender> 12 12 13 13 <appender name="fichier" class="org.apache.log4j.DailyRollingFileAppender"> 14 14 <param name="File" value="logs/jiwigo.log" /> … … 18 18 <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c] %m%n" /> 19 19 </layout> 20 </appender> 20 </appender> 21 21 22 22 23 23 <!-- Déclaration loggers --> 24 24 <logger name="fr.mael.jiwigo" additivity="false"> 25 <level value=" DEBUG" />25 <level value="INFO" /> 26 26 <appender-ref ref="console" /> 27 27 <appender-ref ref="fichier" /> 28 28 </logger> 29 29 30 30 31 31 -
extensions/jiwigo/trunk/src/test/java/fr/mael/jiwigo/service/ServicesTest.java
r9431 r9878 1 1 package fr.mael.jiwigo.service; 2 3 import java.util.List; 2 4 3 5 import org.junit.Test; … … 6 8 import fr.mael.jiwigo.TestBase; 7 9 import fr.mael.jiwigo.om.Category; 10 import fr.mael.jiwigo.om.Comment; 8 11 import fr.mael.jiwigo.om.Image; 9 12 … … 25 28 26 29 Image image = ImageService.getInstance(Main.sessionManager).listByCategory(cat.getIdentifier(), true).get(0); 27 int firstCount = CommentService.getInstance(Main.sessionManager).list(image.getIdentifier()).size(); 30 List<Comment> comments = CommentService.getInstance(Main.sessionManager).list(image.getIdentifier()); 31 // int firstCount = comments.size(); 28 32 CommentService.getInstance(Main.sessionManager).create("comment test", image.getIdentifier(), "none"); 29 int secondCount = CommentService.getInstance(Main.sessionManager).list(image.getIdentifier()).size();33 // int secondCount = CommentService.getInstance(Main.sessionManager).list(image.getIdentifier()).size(); 30 34 // Assert.assertSame(firstCount + 1, secondCount); 31 35 }
Note: See TracChangeset
for help on using the changeset viewer.