Search in sources :

Example 1 with BufferedDynamicImageResource

use of org.apache.wicket.markup.html.image.resource.BufferedDynamicImageResource in project wicket by apache.

the class Home method getImage5Resource.

/**
 * @return Gets shared image component
 */
public ResourceReference getImage5Resource() {
    return new ResourceReference(Home.class, "image5") {

        @Override
        public IResource getResource() {
            final BufferedDynamicImageResource resource = new BufferedDynamicImageResource();
            final BufferedImage image = new BufferedImage(100, 100, BufferedImage.TYPE_INT_RGB);
            drawCircle((Graphics2D) image.getGraphics());
            resource.setImage(image);
            return resource;
        }
    };
}
Also used : SharedResourceReference(org.apache.wicket.request.resource.SharedResourceReference) PackageResourceReference(org.apache.wicket.request.resource.PackageResourceReference) ResourceReference(org.apache.wicket.request.resource.ResourceReference) BufferedDynamicImageResource(org.apache.wicket.markup.html.image.resource.BufferedDynamicImageResource) BufferedImage(java.awt.image.BufferedImage)

Aggregations

BufferedImage (java.awt.image.BufferedImage)1 BufferedDynamicImageResource (org.apache.wicket.markup.html.image.resource.BufferedDynamicImageResource)1 PackageResourceReference (org.apache.wicket.request.resource.PackageResourceReference)1 ResourceReference (org.apache.wicket.request.resource.ResourceReference)1 SharedResourceReference (org.apache.wicket.request.resource.SharedResourceReference)1