Package com.sun.dtv.lwuit.geom

Examples of com.sun.dtv.lwuit.geom.Dimension


        }
        if(frame == frames.length){
            frame = 0;
        }
        int [] modified = frames[frame].modifiedRowOffsets;
        Rectangle rect = new Rectangle(0, frames[frame].smallestChangedRow, new Dimension(getWidth(), frames[frame].highestChangedRow -frames[frame].smallestChangedRow));
        return rect;
    }
View Full Code Here


    private Dimension adjustSize(int width, int height) {
        int insetLeft = host.getStyle().getMargin(Component.LEFT);
        int insetTop = host.getStyle().getMargin(Component.TOP);
        int insetRight = host.getStyle().getMargin(Component.RIGHT);
        int insetBottom = host.getStyle().getMargin(Component.BOTTOM);
        return new Dimension(width + insetLeft + insetRight,
                height + insetTop + insetBottom);
    }
View Full Code Here

    /**
     * @inheritDoc
     */
    public Dimension getPreferredSize(Container parent) {
        Dimension retVal = new Dimension();
        int numOfcomponents = parent.getComponentCount();
        for(int i=0; i< numOfcomponents; i++){
            Component cmp = parent.getComponentAt(i);
            retVal.setWidth(Math.max(retVal.getWidth(), cmp.getX() + cmp.getPreferredSize().getWidth()));
            retVal.setHeight(Math.max(retVal.getHeight(), cmp.getY() + cmp.getPreferredSize().getHeight()));
        }
       
        return retVal;
    }
View Full Code Here

            }else{
                height = height*rows;
            }
        }
       
        return new Dimension(width + parent.getStyle().getPadding(Component.LEFT)+ parent.getStyle().getPadding(Component.RIGHT),
        height + parent.getStyle().getPadding(Component.TOP)+ parent.getStyle().getPadding(Component.BOTTOM));
    }
View Full Code Here

     * Presente no JAVADTV 1.1
     * @param d the component dimension
     * @see #setPreferredSize
     */
    public void setSize(Dimension d) {
        Dimension d2 = bounds.getSize();
        d2.setWidth(d.getWidth());
        d2.setHeight(d.getHeight());
    }
View Full Code Here

     * Nao Presente no JAVADTV 1.1 - Se alguem for estender essa classe pode encontrar problemas de compatibilidade.
     * OK - NAO DA PRA ESTENDER MAIS
     * @return the calculated preferred size based on component content
     */
    Dimension calcPreferredSize() {
        Dimension d = new Dimension(0, 0);
        return d;
    }
View Full Code Here

     */
    public void repaint(int x, int y, int w, int h) {
        if (dirtyRegion == null) {
            dirtyRegion = new Rectangle(x, y, w, h);
        } else {
            Dimension size = dirtyRegion.getSize();

            int x1 = Math.min(dirtyRegion.getX(), x);
            int y1 = Math.min(dirtyRegion.getY(), y);

            int x2 = Math.max(x + w, dirtyRegion.getX() + size.getWidth());
            int y2 = Math.max(y + h, dirtyRegion.getY() + size.getHeight());

            dirtyRegion.setX(x1);
            dirtyRegion.setY(y1);
            size.setWidth(x2 - x1);
            size.setHeight(y2 - y1);

        }
        repaint(this);
    }
View Full Code Here

        public void paint(Graphics g, Rectangle rect) {
            if (painter != null) {
                if (previousTint != null) {
                    previousTint.paint(g);
                }
                Dimension d = rect.getSize();
                int width = d.getWidth();
                int height = d.getHeight();
                int x = rect.getX();
                int y = rect.getY();

                if (ignorCoordinates) {
                    // this is a special case for dialogs since they are "pushed" to
View Full Code Here

        for(int i=0; i< numOfcomponents; i++){
            Component cmp = parent.getComponentAt(i);
            height = Math.max(height, cmp.getPreferredSize().getHeight() + cmp.getStyle().getMargin(Component.TOP)+ cmp.getStyle().getMargin(Component.BOTTOM));
            width += cmp.getPreferredSize().getWidth()+ cmp.getStyle().getMargin(Component.RIGHT)+ cmp.getStyle().getMargin(Component.LEFT);
        }
        return new Dimension(width + parent.getStyle().getPadding(Component.LEFT)+ parent.getStyle().getPadding(Component.RIGHT),
        height + parent.getStyle().getPadding(Component.TOP)+ parent.getStyle().getPadding(Component.BOTTOM));
       
    }
View Full Code Here

     */
    public Image scaled(int width, int height) {
        if (width == image.getWidth() && height == image.getHeight()) {
            return this;
        }
        Dimension d = new Dimension(width, height);
        Image i = getCachedImage(d);
        if (i != null) {
            return i;
        }
        i = new Image(this.image);
View Full Code Here

TOP

Related Classes of com.sun.dtv.lwuit.geom.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.