Code Search for Developers
 
 
  

LegendItemHints.java from BIRT at Krugle


Show LegendItemHints.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.computation;

/**
 * LegendItemHints
 */
public class LegendItemHints implements IConstants
{

	private final Point location;
	private final double width;
	private final double height;
	private final String text;
	private final String extraText;
	private final double extraHeight;
	private final int type;
	private final int categoryIndex;

	public LegendItemHints( int type, Point loc, double width, double height,
			String text, int categoryIndex )
	{
		this( type, loc, width, height, text, 0, null, categoryIndex );
	}

	public LegendItemHints( int type, Point loc, double width, double height,
			String text, double extraHeight, String extraText )
	{
		// not using the category index when color by series.
		this( type, loc, width, height, text, extraHeight, extraText, 0 );
	}

	public LegendItemHints( int type, Point loc, double width, double height,
			String text, double extraHeight, String extraText, int categoryIndex )
	{
		this.type = type;
		this.location = loc;
		this.width = width;
		this.height = height;
		this.text = text;
		this.extraText = extraText;
		this.extraHeight = extraHeight;
		this.categoryIndex = categoryIndex;
	}

	public int getType( )
	{
		return type;
	}

	/**
	 * This location is relative to the legend bound area (not include the
	 * legend title).
	 * 
	 * @return
	 */
	public Point getLocation( )
	{
		return location;
	}

	public double getWidth( )
	{
		return width;
	}

	public double getHeight( )
	{
		return height;
	}

	public double getLeft( )
	{
		if ( location != null )
		{
			return location.getX( );
		}

		return 0;
	}

	public double getTop( )
	{
		if ( location != null )
		{
			return location.getY( );
		}

		return 0;
	}

	public String getText( )
	{
		return text;
	}

	public String getExtraText( )
	{
		return extraText;
	}

	public double getExtraHeight( )
	{
		return extraHeight;
	}

	public int getCategoryIndex( )
	{
		return categoryIndex;
	}
}




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

  withaxes/
    AllAxes.java
    AutoScale.java
    AxisSubUnit.java
    Grid.java
    IntersectionValue.java
    OneAxis.java
    PlotWith2DAxes.java
    PlotWith3DAxes.java
    PlotWithAxes.java
    SeriesRenderingHints.java
    SeriesRenderingHints3D.java
    StackGroup.java
    StackedSeriesLookup.java
    package.html
  withoutaxes/
    Coordinates.java
    PlotWithoutAxes.java
    SeriesRenderingHints.java
    package.html
  BoundingBox.java
  DataPointHints.java
  DataSetIterator.java
  Engine3D.java
  IConstants.java
  LegendBuilder.java
  LegendEntryRenderingHints.java
  LegendItemHints.java
  LegendItemRenderingHints.java
  LegendLayoutHints.java
  Methods.java
  Object3D.java
  Point.java
  Rectangle.java
  RotatedRectangle.java
  UserDataSetHints.java
  ValueFormatter.java
  Vector.java
  package.html