ChartCat 1.2

li.netcat.chart.util
Class AreaLegendPart

java.lang.Object
  extended byli.netcat.chart.util.AbstractPart
      extended byli.netcat.chart.util.TextPart
          extended byli.netcat.chart.util.LegendPart
              extended byli.netcat.chart.util.AreaLegendPart
All Implemented Interfaces:
Part

public class AreaLegendPart
extends LegendPart

Represents a legend that refers to areas in a chart and looks for example like this:

It uses small, filled rectangles to refer to the area with the same paint.

The size of the square and the pen of the square border can be specified in this class, the orientation and all other properties in the super class.

Author:
Arthur Marxer

Field Summary
 
Fields inherited from class li.netcat.chart.util.LegendPart
HORIZONTAL, VERTICAL
 
Fields inherited from class li.netcat.chart.util.AbstractPart
BACKGROUND, FOREGROUND, PERSPECTIVE
 
Constructor Summary
AreaLegendPart(GraphPart graphPart)
          Constructs a new AreaLegendPart that refers to the given GraphPart.
AreaLegendPart(GraphPart graphPart, int orientation)
          Constructs a new AreaLegendPart that refers to the given GraphPart and uses the given orientation.
 
Method Summary
protected  float getItemHeight(GraphLook graphLook)
          Subclasses must implement this method to report the item height.
protected  float getItemWidth(GraphLook graphLook)
          Subclasses must implement this method to report the item width.
 float getSquareSize()
          Returns the size of the square.
protected  void layoutItem(java.awt.Graphics g, DefaultLayout layout, java.awt.geom.Rectangle2D.Float itemBounds, GraphLook graphLook, int rowIndex, int columnIndex)
          Subclasses must implement this method to layout an item.
 void setSquareSize(float size)
          Sets the size of the square.
 
Methods inherited from class li.netcat.chart.util.LegendPart
getGraphPart, getHGap, getItemTextGap, getLayout, getMaxHeight, getMaxWidth, getOrientation, getVGap, isMovable, setGraphPart, setHGap, setItemTextGap, setMaxHeight, setMaxWidth, setOrientation, setVGap
 
Methods inherited from class li.netcat.chart.util.TextPart
getTextLook, setTextLook
 
Methods inherited from class li.netcat.chart.util.AbstractPart
getChart, getPerspective, invalidate, setChart, setPerspective
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AreaLegendPart

public AreaLegendPart(GraphPart graphPart)
Constructs a new AreaLegendPart that refers to the given GraphPart.

Parameters:
graphPart - The graph part to which this legend refers to.

AreaLegendPart

public AreaLegendPart(GraphPart graphPart,
                      int orientation)
Constructs a new AreaLegendPart that refers to the given GraphPart and uses the given orientation.

Parameters:
graphPart - The graph part to which this legend refers to.
orientation - The orientation, specify either HORIZONTAL or VERTICAL.
Method Detail

getSquareSize

public float getSquareSize()
Returns the size of the square.

Returns:
The size of the square in pixel.

setSquareSize

public void setSquareSize(float size)
Sets the size of the square.

Parameters:
size - The size of the square in pixel.

getItemWidth

protected float getItemWidth(GraphLook graphLook)
Description copied from class: LegendPart
Subclasses must implement this method to report the item width.

Specified by:
getItemWidth in class LegendPart
Parameters:
graphLook - The current graph look.
Returns:
The width of the item.

getItemHeight

protected float getItemHeight(GraphLook graphLook)
Description copied from class: LegendPart
Subclasses must implement this method to report the item height.

Specified by:
getItemHeight in class LegendPart
Parameters:
graphLook - The current graph look.
Returns:
The height of the item.

layoutItem

protected void layoutItem(java.awt.Graphics g,
                          DefaultLayout layout,
                          java.awt.geom.Rectangle2D.Float itemBounds,
                          GraphLook graphLook,
                          int rowIndex,
                          int columnIndex)
Description copied from class: LegendPart
Subclasses must implement this method to layout an item.

Specified by:
layoutItem in class LegendPart
Parameters:
g - The current graphics context.
layout - The resulting layout.
itemBounds - The bounds of the current item.
rowIndex - The index of the row.
columnIndex - The index of the column.

ChartCat 1.2

Copyright © 2003 - 2005 NetCat Inc.. All rights reserved. Feedback

Chart,Charting,Charts,Java,Java Chart,Java Charting,Java Charts,Chart Java,Charts Java,3D,3D Chart,3Dchart,Graph,Graphs,Chart Graph,Java Graph,Diagram,Diagrams,Java Diagram,Java Diagrams,Curve,Curves,Bar Chart,Pie Chart,Line Chart,Area Chart,Bar Graph,Pie Graph,Line Graph,Java Diagram,Chart Diagram,Package,Library,Chart Library,Chart Engine,Chart Package,Graph Package,Paint,Support,Graphic,Graphics,Print, Chart,Charting,Charts,Java,Java Chart,Java Charting,Java Charts,Chart Java,Charts Java,3D,3D Chart,3Dchart,Graph,Graphs,Chart Graph,Java Graph,Diagram,Diagrams,Java Diagram,Java Diagrams,Curve,Curves,Bar Chart,Pie Chart,Line Chart,Area Chart,Bar Graph,Pie Graph,Line Graph,Java Diagram,Chart Diagram,Package,Library,Chart Library,Chart Engine,Chart Package,Graph Package,Paint,Support,Graphic,Graphics,Print, Chart,Charting,Charts,Java,Java Chart,Java Charting,Java Charts,Chart Java,Charts Java,3D,3D Chart,3Dchart,Graph,Graphs,Chart Graph,Java Graph,Diagram,Diagrams,Java Diagram,Java Diagrams,Curve,Curves,Bar Chart,Pie Chart,Line Chart,Area Chart,Bar Graph,Pie Graph,Line Graph,Java Diagram,Chart Diagram,Package,Library,Chart Library,Chart Engine,Chart Package,Graph Package,Paint,Support,Graphic,Graphics,Print