Examples of ImageDataModel


Examples of org.openfaces.renderkit.ImageDataModel

     */
    public static ImageDataModel getDataModel(Object data) {
        if (data == null)
            return null;

        ImageDataModel model = null;

        if (data instanceof byte[])
            model = getDataModel((byte[]) data);
        else if (data instanceof RenderedImage)
            model = getDataModel((RenderedImage) data);
View Full Code Here

Examples of org.openfaces.renderkit.ImageDataModel

    }

    private String getStoredObjectId(DefaultImageDataModel model) {
        if (pool.values().contains(model)) {
            for (Map.Entry<String, ImageDataModel> stringImageDataModelEntry : pool.entrySet()) {
                ImageDataModel storedModel = stringImageDataModelEntry.getValue();
                if (storedModel.equals(model)) {
                    return stringImageDataModelEntry.getKey();
                }
            }
        }
View Full Code Here

Examples of org.openfaces.renderkit.ImageDataModel

    public byte[] getImage(String sid) {
        if (sid == null) {
            throw new IllegalArgumentException("sid shouldn't be null");
        }
        ImageDataModel model = pool.get(sid);
        if (model == null) {
            return null;
        }
        return model.getData();
    }
View Full Code Here

Examples of org.openfaces.renderkit.ImageDataModel

        Object data = dataExpression.getValue(elContext);

        if (data == null)
            return;

        ImageDataModel model = Rendering.getDataModel(data);

        String extension = DIMG_EXTENSION;
        if (dynamicImage.getImageType() != null)
            extension = dynamicImage.getImageType().getExtension();
View Full Code Here

Examples of org.openfaces.renderkit.ImageDataModel

        int ordinate = calculateOrdinate(image);

        BufferedImage croppedImage = image.getSubimage(absciss - 1, ordinate - 1, (int) textWidth + 2, (int) textHeight + 2);
        graphics.dispose();

        ImageDataModel model = Rendering.getDataModel(croppedImage);

        ResponseWriter writer = context.getResponseWriter();

        int imageWidth = croppedImage.getWidth();
        int imageHeight = croppedImage.getHeight();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.