Changeset 8831 for extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/browser/BrowserImagePanel.java
- Timestamp:
- Jan 21, 2011, 7:20:55 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/browser/BrowserImagePanel.java
r6980 r8831 24 24 import javax.swing.event.ChangeListener; 25 25 26 import fr.mael.jiwigo.transverse.ImagesManagement; 26 27 import fr.mael.jiwigo.transverse.util.ImagesUtil; 27 28 import fr.mael.jiwigo.transverse.util.Messages; … … 70 71 private int yDragPosition; 71 72 private boolean drawSelection = false; 73 private ImagesManagement imagesManagement = ImagesManagement.getInstance(); 72 74 73 75 /** … … 75 77 * @param image the image 76 78 */ 77 public BrowserImagePanel( BufferedImage image) {78 this.image = image ;79 public BrowserImagePanel() { 80 this.image = imagesManagement.getCurrentBufferedImage(); 79 81 this.addMouseWheelListener(this); 80 82 this.addMouseMotionListener(this); … … 106 108 g2.drawRenderedImage(image, at); 107 109 if (drawSelection) { 108 g2.drawRect(xTopPosition, yTopPosition, xDragPosition - xTopPosition, yDragPosition - yTopPosition);110 // g2.drawRect(xTopPosition, yTopPosition, xDragPosition - xTopPosition, yDragPosition - yTopPosition); 109 111 } 110 112 … … 242 244 */ 243 245 public void rotationDroite() { 244 setImage(ImagesUtil.rotate(image, Math.PI / 2)); 246 image = (ImagesUtil.rotate(image, Math.PI / 2)); 247 revalidate(); 248 repaint(); 245 249 } 246 250 … … 249 253 */ 250 254 public void rotationGauche() { 251 setImage(ImagesUtil.rotate(image, -Math.PI / 2)); 255 image = (ImagesUtil.rotate(image, -Math.PI / 2)); 256 revalidate(); 257 repaint(); 252 258 } 253 259 … … 262 268 * @param image the image to set 263 269 */ 264 public void setImage(BufferedImage image) {265 this.image = image ;270 public void changeImage() { 271 this.image = imagesManagement.getCurrentBufferedImage(); 266 272 revalidate(); 267 273 repaint();
Note: See TracChangeset
for help on using the changeset viewer.