Examples of PaintingInfo


Examples of org.apache.cayenne.testdo.testmap.PaintingInfo

    public void testReadToOneRel2() throws Exception {
        // test chained calls to read relationships
        createArtistWithPaintingAndInfoDataSet();

        PaintingInfo pi1 = Cayenne.objectForPK(context, PaintingInfo.class, 6);
        Painting p1 = pi1.getPainting();
        p1.getPaintingTitle();

        Artist a1 = p1.getToArtist();

        assertNotNull(a1);
View Full Code Here

Examples of org.apache.cayenne.testdo.testmap.PaintingInfo

        // needed to save without errors
        p1.setToArtist(a1);
        context.commitChanges();

        PaintingInfo info = context.newObject(PaintingInfo.class);
        info.setTextReview("XXX");
        p1.setToPaintingInfo(info);

        assertSame(info, p1.getToPaintingInfo());

        context.rollbackChanges();
View Full Code Here

Examples of org.apache.cayenne.testdo.testmap.PaintingInfo

        assertNull(p2.getToPaintingInfo());
    }

    public void testNewAdd() throws Exception {
        Artist a1 = newArtist();
        PaintingInfo pi1 = newPaintingInfo();
        Painting p1 = newPainting();

        // needed to save without errors
        p1.setToArtist(a1);

        // *** TESTING THIS ***
        p1.setToPaintingInfo(pi1);

        // test before save
        assertSame(pi1, p1.getToPaintingInfo());
        assertSame(p1, pi1.getPainting());

        // do save
        context.commitChanges();
        context = context1;

        // test database data
        Painting p2 = fetchPainting();
        PaintingInfo pi2 = p2.getToPaintingInfo();
        assertNotNull(pi2);
        assertEquals(textReview, pi2.getTextReview());
    }
View Full Code Here

Examples of org.apache.cayenne.testdo.testmap.PaintingInfo

    }

    public void testTakeObjectSnapshotDependentFault() throws Exception {
        // prepare data
        Artist a1 = newArtist();
        PaintingInfo pi1 = newPaintingInfo();
        Painting p1 = newPainting();

        p1.setToArtist(a1);
        p1.setToPaintingInfo(pi1);
        context.commitChanges();
View Full Code Here

Examples of org.apache.cayenne.testdo.testmap.PaintingInfo

        p1.setPaintingTitle(paintingName);
        return p1;
    }

    protected PaintingInfo newPaintingInfo() {
        PaintingInfo p1 = context.newObject(PaintingInfo.class);
        p1.setTextReview(textReview);
        p1.setImageBlob(paintingImage);
        return p1;
    }
View Full Code Here

Examples of org.xhtmlrenderer.layout.PaintingInfo

        // If we moved out of the old block then unstyle it
        if (_previouslyHovered != null) {
            needRepaint = true;
            _previouslyHovered.restyle(c);

            PaintingInfo paintInfo = _previouslyHovered.getPaintingInfo();

            if (paintInfo == null) {
                targetedRepaint = false;
            } else {
                repaintRegion = new Rectangle(paintInfo.getAggregateBounds());
            }

            _previouslyHovered = null;
        }

        if (currentlyHovered != null) {
            needRepaint = true;
            Box target = box.getRestyleTarget();
            target.restyle(c);

            if (targetedRepaint) {
                PaintingInfo paintInfo = target.getPaintingInfo();

                if (paintInfo == null) {
                    targetedRepaint = false;
                } else {
                    if (repaintRegion == null) {
                        repaintRegion = new Rectangle(paintInfo.getAggregateBounds());
                    } else {
                        repaintRegion.add(paintInfo.getAggregateBounds());
                    }
                }
            }

            _previouslyHovered = target;
View Full Code Here

Examples of org.xhtmlrenderer.layout.PaintingInfo

      g.setColor(getBackground());
      g.fillRect(0, 0, getWidth(), getHeight());
    }
    AffineTransform current = g.getTransform();

    PaintingInfo pI = root.getMaster().getPaintingInfo();
    Dimension layoutSize = pI.getOuterMarginCorner();

    calculateScaleAccordingToPolicy(layoutSize);

    if (lastLayoutSize == null) {
      lastLayoutSize = layoutSize;
View Full Code Here

Examples of org.xhtmlrenderer.layout.PaintingInfo

            }
        }
    }   
   
    public Box find(CssContext cssCtx, int absX, int absY, boolean findAnonymous) {
        PaintingInfo pI = getPaintingInfo();
        if (pI !=null && ! pI.getAggregateBounds().contains(absX, absY)) {
            return null;
        }
       
        Box result = null;
        for (int i = 0; i < getChildCount(); i++) {
View Full Code Here

Examples of org.xhtmlrenderer.layout.PaintingInfo

        // If we moved out of the old block then unstyle it
        if (_previouslyHovered != null) {
            needRepaint = true;
            _previouslyHovered.restyle(c);

            PaintingInfo paintInfo = _previouslyHovered.getPaintingInfo();

            if (paintInfo == null) {
                targetedRepaint = false;
            } else {
                repaintRegion = new Rectangle(paintInfo.getAggregateBounds());
            }

            _previouslyHovered = null;
        }

        if (currentlyHovered != null) {
            needRepaint = true;
            Box target = box.getRestyleTarget();
            target.restyle(c);

            if (targetedRepaint) {
                PaintingInfo paintInfo = target.getPaintingInfo();

                if (paintInfo == null) {
                    targetedRepaint = false;
                } else {
                    if (repaintRegion == null) {
                        repaintRegion = new Rectangle(paintInfo.getAggregateBounds());
                    } else {
                        repaintRegion.add(paintInfo.getAggregateBounds());
                    }
                }
            }

            _previouslyHovered = target;
View Full Code Here

Examples of org.xhtmlrenderer.layout.PaintingInfo

            }
        }
    }   
   
    public Box find(CssContext cssCtx, int absX, int absY, boolean findAnonymous) {
        PaintingInfo pI = getPaintingInfo();
        if (pI !=null && ! pI.getAggregateBounds().contains(absX, absY)) {
            return null;
        }
       
        Box result = null;
        for (int i = 0; i < getChildCount(); i++) {
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.