StaticImage Component
This Echo3 component is a simple component used to visualize a static image. Although an Echo3 Label component can be used by specifying an Image as part of the label, this component specializes in Image loaded by supplying four public static methods for loading images from File, URL string, resource paths and an AwtImageReference created from Java 2D BufferedImage.
This component serves as a superclass for the component ReflectedImage which was sole purpose in its creation.
Potential enhancements to this component include specifying width, height, size as percentage of original, background color, when insets are specified and adding a CSS border.
Demonstration
This image was loaded from the server side file located at ../images/Fern.jpg the next
image was loaded from the URL http://echo.nextapp.com/site/files/farland_logo.png
StaticImage - Summary API
package org.informagen.echo.app;
// Echo - Components
import nextapp.echo.app.Component;
import nextapp.echo.app.ImageReference;
// Java AWT
import java.awt.Image;
// Java IO
import java.io.File;
public class StaticImage extends Component {
public StaticImage()
public StaticImage(final ImageReference imageReference)
public ImageReference getImageReference()
public void setImageReference(final ImageReference imageReference )
public static ImageReference fromFile(File file)
public static ImageReference fFromURL(String urlString)
public static ImageReference fromResource(String resourceLocation)
public static ImageReference fromImage(Image image)
}