Code Search for Developers
 
 
  

EmptyUpdateNotifier.java from BIRT at Krugle


Show EmptyUpdateNotifier.java syntax highlighted

/*******************************************************************************
 * 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.chart.device;

import java.util.HashMap;
import java.util.Map;

import org.eclipse.birt.chart.model.Chart;

/**
 * A convenient empty update notifier doing nothing.
 */
public class EmptyUpdateNotifier implements IUpdateNotifier
{

	private Chart designModel = null;
	private Chart runtimeModel = null;
	private Map contextMap;

	/**
	 * The constructor.
	 * 
	 * @param designModel
	 * @param runtimeModel
	 */
	public EmptyUpdateNotifier( Chart designModel, Chart runtimeModel )
	{
		this.designModel = designModel;
		this.runtimeModel = runtimeModel;

		contextMap = new HashMap( );
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.eclipse.birt.chart.device.IUpdateNotifier#regenerateChart()
	 */
	public void regenerateChart( )
	{
		// DOING NOTHING.
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.eclipse.birt.chart.device.IUpdateNotifier#repaintChart()
	 */
	public void repaintChart( )
	{
		// DOING NOTHING.
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.eclipse.birt.chart.device.IUpdateNotifier#peerInstance()
	 */
	public Object peerInstance( )
	{
		return null;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.eclipse.birt.chart.device.IUpdateNotifier#getDesignTimeModel()
	 */
	public Chart getDesignTimeModel( )
	{
		return designModel;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.eclipse.birt.chart.device.IUpdateNotifier#getRunTimeModel()
	 */
	public Chart getRunTimeModel( )
	{
		return runtimeModel;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.eclipse.birt.chart.device.IUpdateNotifier#getContext(java.lang.Object)
	 */
	public Object getContext( Object key )
	{
		return contextMap.get( key );
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.eclipse.birt.chart.device.IUpdateNotifier#putContext(java.lang.Object,
	 *      java.lang.Object)
	 */
	public Object putContext( Object key, Object value )
	{
		return contextMap.put( key, value );
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.eclipse.birt.chart.device.IUpdateNotifier#removeContext(java.lang.Object)
	 */
	public Object removeContext( Object key )
	{
		return contextMap.remove( key );
	}
}




See more files for this project here

BIRT

BIRT is an open source, Eclipse-based reporting system that integrates with your application to produce compelling reports for both web and PDF.

Project homepage: http://www.eclipse.org/birt/phoenix/
Programming language(s): Java,XML
License: gpl2

  DeviceAdapter.java
  DisplayAdapter.java
  EmptyUpdateNotifier.java
  ICallBackNotifier.java
  IDeviceRenderer.java
  IDisplayServer.java
  IImageMapEmitter.java
  IPrimitiveRenderer.java
  IStructureDefinitionListener.java
  ITextMetrics.java
  IUpdateNotifier.java
  TextAdapter.java
  package.html