Esempio n. 1
0
 @Override
 public void actionPerformed(ActionEvent e) {
   if (e.getSource() == ouvrir)
     try {
       BufferedImage i = chargeImage();
       image.setImage(i);
       notifyImageListener(i);
       validate();
       repaint();
     } catch (AnnulationException err) {
     } catch (Exception e1) {
       Outil.erreur("Impossible d'utiliser cette image");
       e1.printStackTrace();
     }
 }
Esempio n. 2
0
 public void setImage(BufferedImage img) {
   image.setImage(img);
   validate();
   repaint();
 }
Esempio n. 3
0
 public BufferedImage getImage() throws AnnulationException {
   if (image.getImage() == null) throw new AnnulationException("Choisir une image");
   return image.getImage();
 }