Package org.jboss.seam.ui.graphicImage.GraphicImageStore

Examples of org.jboss.seam.ui.graphicImage.GraphicImageStore.ImageWrapper


   private void doWork(HttpServletRequest request, HttpServletResponse response)
      throws IOException
   {
      String pathInfo = request.getPathInfo().substring(getResourcePath().length() + 1,
               request.getPathInfo().lastIndexOf("."));
      ImageWrapper image = GraphicImageStore.instance().remove(pathInfo);
      if (image != null)
      {
         response.setContentType(image.getContentType().getMimeType());
         response.setStatus(HttpServletResponse.SC_OK);
         response.setContentLength(image.getImage().length);
         ServletOutputStream os = response.getOutputStream();
         os.write(image.getImage());
         os.flush();
      }
      else
      {
         response.sendError(HttpServletResponse.SC_NOT_FOUND);
View Full Code Here


   private void doWork(HttpServletRequest request, HttpServletResponse response)
      throws IOException
   {
      String pathInfo = request.getPathInfo().substring(getResourcePath().length() + 1,
               request.getPathInfo().lastIndexOf("."));
      ImageWrapper image = GraphicImageStore.instance().remove(pathInfo);
      if (image != null && image.getImage() != null)
      {
         response.setContentType(image.getContentType().getMimeType());
         response.setStatus(HttpServletResponse.SC_OK);
         response.setContentLength(image.getImage().length);
         ServletOutputStream os = response.getOutputStream();
         os.write(image.getImage());
         os.flush();
      }
      else
      {
         response.sendError(HttpServletResponse.SC_NOT_FOUND);
View Full Code Here

            ImageTransform imageTransform = (ImageTransform) cmp;
            imageTransform.applyTransform(image);
         }
      }

      key = GraphicImageStore.instance().put(new ImageWrapper(image.getImage(), image.getContentType()),
               key);
      extension = image.getContentType().getExtension();

      writer.startElement(HTML.IMG_ELEM, graphicImage);
      if (graphicImage.getId() != null)
View Full Code Here

            if (bars == null) {
                bars = Color.BLACK;
            }
            try {
                 byte[] imageData = imageToByteArray(barcode.createAwtImage(bars, Color.WHITE));
                 itextObject = new ImageWrapper(imageData, Type.IMAGE_JPEG);
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
    }
View Full Code Here

   private void doWork(HttpServletRequest request, HttpServletResponse response)
      throws IOException
   {
      String pathInfo = request.getPathInfo().substring(getResourcePath().length() + 1,
               request.getPathInfo().lastIndexOf("."));
      ImageWrapper image = GraphicImageStore.instance().remove(pathInfo);
      if (image != null)
      {
         response.setContentType(image.getContentType().getMimeType());
         response.setStatus(HttpServletResponse.SC_OK);
         response.setContentLength(image.getImage().length);
         ServletOutputStream os = response.getOutputStream();
         os.write(image.getImage());
         os.flush();
      }
      else
      {
         response.sendError(HttpServletResponse.SC_NOT_FOUND);
View Full Code Here

            ImageTransform imageTransform = (ImageTransform) cmp;
            imageTransform.applyTransform(image);
         }
      }

      key = GraphicImageStore.instance().put(new ImageWrapper(image.getImage(), image.getContentType()),
               key);
      extension = image.getContentType().getExtension();

      writer.startElement(HTML.IMG_ELEM, graphicImage);
      String url = context.getExternalContext().getRequestContextPath()
View Full Code Here

        if (imageData != null) {
            ResponseWriter response = context.getResponseWriter();
            response.startElement("img", null);                  
            GraphicImageStore store = GraphicImageStore.instance();
            String key = store.put(new ImageWrapper(imageData, Type.IMAGE_JPEG));
            String url = context.getExternalContext().getRequestContextPath() +
                         GraphicImageResource.GRAPHIC_IMAGE_RESOURCE_PATH + "/" + key + Type.IMAGE_JPEG.getExtension();

            response.writeAttribute("src", url, null);
           
View Full Code Here

        if (imageData != null) {
            ResponseWriter response = context.getResponseWriter();
            response.startElement("img", null);
            GraphicImageStore store = GraphicImageStore.instance();
            String key = store.put(new ImageWrapper(imageData, Type.IMAGE_JPEG));
            String url = context.getExternalContext().getRequestContextPath()
                    + GraphicImageResource.GRAPHIC_IMAGE_RESOURCE_PATH + "/"
                    + key + Type.IMAGE_JPEG.getExtension();

            response.writeAttribute("src", url, null);
View Full Code Here

         if (bars == null)
         {
            bars = Color.BLACK;
         }
         byte[] imageData = imageToByteArray(barcode.createAwtImage(bars, Color.WHITE));
         itextObject = new ImageWrapper(imageData, Type.IMAGE_JPEG);
      }
   }
View Full Code Here

      if (imageData != null)
      {
         ResponseWriter response = context.getResponseWriter();
         response.startElement("img", null);
         GraphicImageStore store = GraphicImageStore.instance();
         String key = store.put(new ImageWrapper(imageData, Type.IMAGE_JPEG));
         String url = context.getExternalContext().getRequestContextPath() + GraphicImageResource.GRAPHIC_IMAGE_RESOURCE_PATH + "/" + key + Type.IMAGE_JPEG.getExtension();

         response.writeAttribute("src", url, null);

         response.writeAttribute("height", getHeight(), null);
View Full Code Here

TOP

Related Classes of org.jboss.seam.ui.graphicImage.GraphicImageStore.ImageWrapper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.