/*******************************************************************************
 * Copyright (c) 2004 Actuate Corporation.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *  Actuate Corporation  - initial API and implementation
 *******************************************************************************/

package org.eclipse.birt.report.engine.api;

/**
 * Defines the context for rendering report in HTML emitter. Objects stored in the
 * context object is mainly used for image and action handling, but can be used for
 * other purposes too. 
 */
public class HTMLRenderContext {
		
	/**
	 * base URL used for action handler
	 */
	protected String baseURL;

    /**
     * base URL used for image
     */
    protected String baseImageURL;
    
    /**
	 * the image formats supported by the browser
	 */
    protected String supportedImageFormats;
	
	/**
	 * directory to store image
	 */
	protected String imageDirectory;
	
	/**
	 * dummy constrictor 
	 */
	public HTMLRenderContext()
	{
	}
	
	/**
	 * Returns the base URL for creating an Action URL
	 * 
	 * @return the baseURL.
	 */
	public String getBaseURL() {
		return baseURL;
	}
	
	/**
	 * sets the base url for action handling
	 * 
	 * @param baseURL sets the base URL used for action handling
	 */
	public void setBaseURL(String baseURL) {
		this.baseURL = baseURL;
	}
	
	/**
	 * returns the image directory that engine stores images and charts into
	 * 
	 * @return the image directory.
	 */
	public String getImageDirectory() {
		return imageDirectory;
	}
	
	/**
	 * sets the image directory that engine stores images and charts into
	 * 
	 * @param imageDirectory the image directory that engine stores images and charts into
	 */
	public void setImageDirectory(String imageDirectory) {
		this.imageDirectory = imageDirectory;
	}

    /**
     * returns the base url for creating image URL
     * 
     * @return Rreturn the abse image url
     */
    public String getBaseImageURL() {
        return baseImageURL;
    }

    /**
     * sets the base image URL for image handling 
     * 
     * @param baseImageURL the base image URL
     */
    public void setBaseImageURL(String baseImageURL) {
        this.baseImageURL = baseImageURL;
    }
    
    /**
     * @param formats - the image format supported by the browser
     */
	public void setSupportedImageFormats(String formats) {
		supportedImageFormats = formats;
	}

	/**
	 * @return the image format supported by the browser
	 */
	public String getSupportedImageFormats() {
		return supportedImageFormats;
	}
	
}

@@ -1148,24 +1148,98 @@
 ory;%0A%09%0A%09/**%0A
+%09 * HTML render option%0A%09 */%0A%09protected IRenderOption renderOption;%0A%09%0A%09/**%0A
 %09 * dummy co
@@ -2832,10 +2832,242 @@
 s;%0A%09%7D%0A%09%0A
+%09/**%0A%09 * @return render options%0A%09 */%0A%09public void SetRenderOption( IRenderOption option )%0A%09%7B%0A%09%09renderOption = option;%0A%09%7D%0A%09%0A%09/**%0A%09 * @return render options%0A%09 */%0A%09public IRenderOption getRenderOption( )%0A%09%7B%0A%09%09return renderOption;%0A%09%7D%0A%09%0A
 %7D%0A

add render option to render context for chart