| 
ChartCat 1.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectli.netcat.chart.util.AbstractPart
li.netcat.chart.util.TextPart
li.netcat.chart.util.LegendPart
li.netcat.chart.util.AreaLegendPart
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.
| 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 | 
public AreaLegendPart(GraphPart graphPart)
AreaLegendPart that refers to the given GraphPart.
graphPart - The graph part to which this legend refers to.
public AreaLegendPart(GraphPart graphPart,
                      int orientation)
AreaLegendPart that refers to the given GraphPart and uses
 the given orientation.
graphPart - The graph part to which this legend refers to.orientation - The orientation, specify either HORIZONTAL or VERTICAL.| Method Detail | 
public float getSquareSize()
public void setSquareSize(float size)
size - The size of the square in pixel.protected float getItemWidth(GraphLook graphLook)
LegendPart
getItemWidth in class LegendPartgraphLook - The current graph look.
protected float getItemHeight(GraphLook graphLook)
LegendPart
getItemHeight in class LegendPartgraphLook - The current graph look.
protected void layoutItem(java.awt.Graphics g,
                          DefaultLayout layout,
                          java.awt.geom.Rectangle2D.Float itemBounds,
                          GraphLook graphLook,
                          int rowIndex,
                          int columnIndex)
LegendPart
layoutItem in class LegendPartg - 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 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||