Package br.com.caelum.tubaina.resources

Examples of br.com.caelum.tubaina.resources.ImageResource


    } catch (IOException e) {
      throw new TubainaException("Image not existant", e);
    } catch (NullPointerException e) {
      throw new TubainaException(path + " is not a valid image");
    }
    resources.add(new ImageResource(image, matcher.group(2)));
    return new ImageChunk(path, matcher.group(2), width);
  }
View Full Code Here


        this.introductionChunk = introductionChunk;
        this.illustrationPath = FilenameUtils.getName(illustrationPath);
        this.resources = resources;
        if (!this.illustrationPath.isEmpty()) {
            File imageFile = ResourceLocator.getInstance().getFile(illustrationPath);
            resources.add(new ImageResource(imageFile, "100"));
        }
        this.chapters = new ArrayList<Chapter>();
        this.title = title;
    }
View Full Code Here

    int dpi = image.getDpiX();
    if(dpi == 0)
      dpi = 72;
    width = image.getPlainWidth();
   
    resources.add(new ImageResource(imageFile, matcher.group(2)));
    return new ImageChunk(path, matcher.group(2), width, dpi, sectionsManager);
  }
View Full Code Here

TOP

Related Classes of br.com.caelum.tubaina.resources.ImageResource

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.