Package org.apache.isis.core.runtime.imageloader

Examples of org.apache.isis.core.runtime.imageloader.TemplateImage


    public SplashWindow(final TemplateImageLoader loader) {
        super(new Frame());
        parent = (Frame) getParent();
        final String imageName = AboutIsis.getImageName();
        final TemplateImage templateImage = loader.getTemplateImage(imageName);
        if (templateImage == null) {
            throw new IsisException("Failed to find splash image " + imageName);
        }
        logo = templateImage.getImage();

        textFont = new Font("SansSerif", Font.PLAIN, 10);
        titleFont = new Font("SansSerif", Font.BOLD, 11);
        logoFont = new Font("Serif", Font.PLAIN, 36);
        textLineHeight = (int) (getFontMetrics(textFont).getHeight() * 0.85);
 
View Full Code Here


    /**
     * Load an image with the given name.
     */
    @Override
    public Image loadImage(final String path) {
        final TemplateImage template = templateImage(path);
        if (template == null) {
            return null;
        }
        return new AwtImage(template.getImage());
    }
View Full Code Here

        return new AwtImage(template.getImage());
    }

    @Override
    protected Image loadImage(final String name, final int height, final Color tint) {
        final TemplateImage template = templateImage(name);
        if (template == null) {
            return null;
        }
        final java.awt.Image iconImage = template.getIcon(height);
        if (tint != null) {
            Toolkit.getDefaultToolkit().createImage(new FilteredImageSource(iconImage.getSource(), new Filter()));
        }
        final Image icon = new AwtImage(iconImage);
        return icon;
View Full Code Here

    // ////////////////////////////////////////////////////////////////////
    // Helpers
    // ////////////////////////////////////////////////////////////////////

    private TemplateImage templateImage(final String name) {
        final TemplateImage template = loader.getTemplateImage(name);
        return template;
    }
View Full Code Here

    public SplashWindow(final TemplateImageLoader loader) {
        super(new Frame());
        parent = (Frame) getParent();
        final String imageName = AboutIsis.getImageName();
        final TemplateImage templateImage = loader.getTemplateImage(imageName);
        if (templateImage == null) {
            throw new IsisException("Failed to find splash image " + imageName);
        }
        logo = templateImage.getImage();

        textFont = new Font("SansSerif", Font.PLAIN, 10);
        titleFont = new Font("SansSerif", Font.BOLD, 11);
        logoFont = new Font("Serif", Font.PLAIN, 36);
        textLineHeight = (int) (getFontMetrics(textFont).getHeight() * 0.85);
 
View Full Code Here

    public SplashWindow(final TemplateImageLoader loader) {
        super(new Frame());
        parent = (Frame) getParent();
        final String imageName = AboutIsis.getImageName();
        final TemplateImage templateImage = loader.getTemplateImage(imageName);
        if (templateImage == null) {
            throw new IsisException("Failed to find splash image " + imageName);
        }
        logo = templateImage.getImage();

        textFont = new Font("SansSerif", Font.PLAIN, 10);
        titleFont = new Font("SansSerif", Font.BOLD, 11);
        logoFont = new Font("Serif", Font.PLAIN, 36);
        textLineHeight = (int) (getFontMetrics(textFont).getHeight() * 0.85);
 
View Full Code Here

TOP

Related Classes of org.apache.isis.core.runtime.imageloader.TemplateImage

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.