Examples of Painter


Examples of main.ch.morrolan.gibb.snake.Painter

    public Graphics gMock() {
        return mock(Graphics.class);
    }

    public Painter painter1(Graphics g) {
        return new Painter(g, 10);
    }
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.image.painter.Painter

        if (!isRenderable(imageContext, requestedProperties))
        {
          return null;
        }

        Painter painter = getPainter(imageContext, requestedProperties);

        // First we measure the preferred size using a dummy image of
        // size 1x1 - we need this image to get the Graphics obejct
        // for measuring.
        BufferedImage measureImage = createImage(1, 1);

        // Create a PaintContext to use for measuring
        PaintContext measureContext = createPaintContext(imageContext,
                                                         measureImage,
                                                         requestedProperties,
                                                         responseProperties);

        // Get a measurement for the requested image
        Dimension d = painter.getPreferredSize(measureContext);

        int width = d.width;
        int height = d.height;

        // We're done with the measure image and context - free them up
        measureImage.flush();
        disposePaintContext(measureContext);

        // Now that we know how big the image should be, create the image
        // that we'll use for painting
        BufferedImage paintImage = createImage(width, height);

        // Create a PaintContext to use for drawing
        PaintContext paintContext = createPaintContext(imageContext,
                                                       paintImage,
                                                       requestedProperties,
                                                       responseProperties);

        // Fill in the image with the surrounding color
        Graphics g = paintContext.getPaintGraphics();
        Color oldColor = g.getColor();
        g.setColor(paintContext.getSurroundingColor());
        g.fillRect(0, 0, width, height);
        g.setColor(oldColor);

        // Paint the image
        painter.paint(paintContext, g, 0, 0, width, height);

        // Now that we are done painting, dispose the PaintContext
        disposePaintContext(paintContext);

        // Store width/height for client
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.image.painter.Painter

    Dimension bottomSize = _getImageSize(context,
                                         _BOTTOM_BACKGROUND_IMAGE_KEY);

    // Need to get height of wrapped contents in order to figure out
    // top/bottom insets.
    Painter wrappedPainter = getWrappedPainter(context);
    Dimension innerSize = wrappedPainter.getPreferredSize(context);

    int topInset = topSize.height;
    int bottomInset = bottomSize.height;

    int innerHeight = innerSize.height + topInset + bottomInset;
View Full Code Here

Examples of org.flexdock.plaf.resources.paint.Painter

    public Object getResource(String stringValue) {
        PropertySet propertySet = Configurator.getProperties(stringValue, PAINTER_RESOURCE_KEY);
        PainterResource pr = createResource( propertySet);

        Painter p = createPainter( pr.getImplClass());
        p.setPainterResource( pr);
        return p;
    }
View Full Code Here

Examples of org.jdesktop.swingx.painter.Painter

        return (Painter)super.getValue();
    }
   
    @Override
    public String getJavaInitializationString() {
        Painter painter = getValue();
        //TODO!!!
        return painter == null ? "null" :
            "new org.jdesktop.swingx.painter.CheckerboardPainter()";
    }
View Full Code Here

Examples of org.jdesktop.swingx.painter.Painter

    /**
     * {@inheritDoc}
     */
    public void setPainter(Painter painter) {
        Painter old = getPainter();
        this.painter = painter;
        if (painter != null) {
            // ui maps to !opaque
            // Note: this is incomplete - need to keep track of the
            // "real" contentfilled property
View Full Code Here

Examples of org.jdesktop.swingx.painter.Painter

     * an appropriate look
     *
     * @param p The Painter to use. May be null
     */
    public void setTitlePainter(Painter p) {
        Painter old = getTitlePainter();
        this.titlePainter = p;
        firePropertyChange("titlePainter", old, getTitlePainter());
    }
View Full Code Here

Examples of org.jdesktop.swingx.painter.Painter

     * being used, because Painters may paint transparent pixels or not
     * paint certain pixels, such as around the border insets.
     */
    public void setBackgroundPainter(Painter p)
    {
        Painter old = getBackgroundPainter();
        this.backgroundPainter = p;
       
        if (p != null) {
            setOpaque(false);
        }
View Full Code Here

Examples of org.jdesktop.swingx.painter.Painter

    /**
     * {@inheritDoc}
     */
    public void setPainter(Painter painter) {
        Painter old = getPainter();
        this.painter = painter;
        firePropertyChange("painter", old, getPainter());
    }
View Full Code Here

Examples of org.jdesktop.swingx.painter.Painter

    /**
     * {@inheritDoc}
     */
    public void setPainter(Painter painter) {
        Painter old = getPainter();
        this.painter = painter;
        if (painter != null) {
            // ui maps to !opaque
            // Note: this is incomplete - need to keep track of the
            // "real" contentfilled property
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.