Package io.conducive.client.ui.model

Examples of io.conducive.client.ui.model.Dimension


        reattachHandlers();

        final String url = image.getUrl();
        // maybe we've seen it before and calculated it
        if (dimensionCache.get(url) != null) {
            Dimension dim = dimensionCache.get(url);
            calculateIdealSizeAndShow(image, caption, dim);
            // maybe it's already been loaded
        } else if (image.getOffsetHeight() > 0) {
            calculateIdealSizeAndShow(image, caption, null);
            // load offscreen
View Full Code Here


        int imgWidth = knownDimension == null ? image.getOffsetWidth() : knownDimension.getWidth();
        int imgHeight = knownDimension == null ? image.getOffsetHeight() : knownDimension.getHeight();

        if (knownDimension == null) {
            dimensionCache.put(image.getUrl(), new Dimension(imgWidth, imgHeight));
        }

        double ratioW = ((double) maxWidth / (double) imgWidth);
        double ratioH = ((double) maxHeight / (double) imgHeight);
View Full Code Here

TOP

Related Classes of io.conducive.client.ui.model.Dimension

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.