private void saveMCD(PrintStream out) throws IOException
{
/* D�claration */
File imageFile;
FileImageOutputStream outputStream;
BufferedImage img;
Graphics g;
Graphics2D g2d;
Rectangle2D r;
/* MCD */
mcd.enleverFocus();
mcd.repaint();
mcd.setSize(mcd.getPreferredSize());
imageFile = new File(tempDir + "MCD.png");
img = new BufferedImage(
(int) (mcd.getPreferredSize().getWidth()),
(int) (mcd.getPreferredSize().getHeight()),
BufferedImage.TYPE_INT_RGB);
g = img.getGraphics();
g2d = (Graphics2D) g;
g2d.setColor(new Color(255, 255, 255));
r = new Rectangle2D.Double(0, 0, img.getWidth(), img
.getHeight());
g2d.fill(r);
mcd.paintComponent(g2d);
PNGImageWriter writer = new PNGImageWriter(null);
writer.setOutput(outputStream = new FileImageOutputStream(
imageFile));
writer.write(img);
outputStream.close();
writer.dispose();
out.println("<br><br>");
out.println("<h3>Modèle Conceptuel de données</h3>");
out.println("<img border=\"0\" src=\"MCD.png\"");
/* MPD */
mcd.buildMPD(mpd, Constantes.HIDE_ALL);
imageFile = new File(tempDir + "MPD.png");
img = new BufferedImage(
(int) (mpd.getPreferredSize().getWidth()),
(int) (mpd.getPreferredSize().getHeight()),
BufferedImage.TYPE_INT_RGB);
g = img.getGraphics();
g2d = (Graphics2D) g;
g2d.setColor(new Color(255, 255, 255));
r = new Rectangle2D.Double(0, 0, img.getWidth(), img
.getHeight());
g2d.fill(r);
mpd.paintComponent(g2d);
writer = new PNGImageWriter(null);
writer.setOutput(outputStream = new FileImageOutputStream(imageFile));
writer.write(img);
outputStream.close();
writer.dispose();
out.println("<br><br>");
out.println("<h3>Modèle physique de données</h3>");
out.println("<img border=\"0\" src=\"Mpd.png\"");