package com.smartgwt.client.types;


/*
 * Smart GWT (GWT for SmartClient)
 * Copyright 2008 and beyond, Isomorphic Software, Inc.
 *
 * Smart GWT is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License version 3
 * as published by the Free Software Foundation.  Smart GWT is also
 * available under typical commercial license terms - see
 * http://smartclient.com/license
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 */
/* sgwtgen */
 
/**
 * Controls how framework-generated icons (group expand/collapse, tree openers, folder icons, value icons, boolean
 * checkboxes) are handled in the canvas {@link com.smartgwt.client.widgets.grid.ListGrid#getPreRender ListGrid.preRender}
 * preview. <P> Icons in the HTML grid are rendered as <code>&lt;img&gt;</code> or CSS-styled <code>&lt;span&gt;</code>
 * elements.  The canvas preview approximates these using Canvas 2D drawing or reserves the correct amount of space. <P>
 * Regardless of this setting, icon space is always reserved so that text positioning matches the final HTML grid layout.
 */
public enum PreRenderImageMode implements ValueEnum {
    /**
     * All detectable framework icons are cached via Image objects and drawn via <code>ctx.drawImage()</code>. Icons with
     * resolvable URLs (group openers, raster value icons) are rendered; sprite and CSS-class icons fall back to space
     * reservation. First render for any given icon URL shows space only (async image loading); subsequent renders show the
     * actual icon.
     * <P>
     * If this enumerated value is used in a {@link com.smartgwt.client.docs.ComponentXML Component XML}
     * file or server-side DataSource descriptor (.ds.xml file), use the value "all".
     */
    ALL("all"),
    /**
     * Icon positions are detected and the correct horizontal space is reserved, but no images are drawn. Text is offset to
     * match the HTML grid layout.
     * <P>
     * If this enumerated value is used in a {@link com.smartgwt.client.docs.ComponentXML Component XML}
     * file or server-side DataSource descriptor (.ds.xml file), use the value "space".
     */
    SPACE("space");
    private String value;

    PreRenderImageMode(String value) {
        this.value = value;
    }

    public String getValue() {
        return this.value;
    }
}
