|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.approximatrix.charting.render.AbstractRenderer
com.approximatrix.charting.Legend
public class Legend
This class implements a Chart's Legend. The Strings and the colors can be set manually or eventually through some kind of data model.
| Field Summary | |
|---|---|
protected int |
color_text_spacing
|
protected java.awt.Rectangle |
colorbox
|
protected java.awt.Font |
font
|
protected int |
inner_margin
|
protected RowColorModel |
rcm
|
| Constructor Summary | |
|---|---|
Legend()
Creates a default Legend. |
|
Legend(RowColorModel rcm)
Creates a Legend with the given Strings and Colors. |
|
| Method Summary | |
|---|---|
java.awt.Rectangle |
getColorBox()
Returns the size of the color boxes. |
java.awt.Font |
getFont()
Returns this Legend's Font. |
java.awt.Dimension |
getPreferredSize()
Returns the preferred size needed for the renderer. |
RowColorModel |
getRowColorModel()
Returns the RowColorModel of the DataModel. |
void |
paintDefault(java.awt.Graphics2D g)
This method is called by the paint method to do the actual painting. |
void |
setColorBox(java.awt.Rectangle r)
Sets the size of the color boxes. |
void |
setFont(java.awt.Font f)
Sets the Font that is used to render the Legend. |
void |
setRowColorModel(RowColorModel rcm)
Defines the RowColorModel of the DataModel. |
| Methods inherited from class com.approximatrix.charting.render.AbstractRenderer |
|---|
getBounds, getDirectRender, render, setBounds, setDirectRender |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int inner_margin
protected int color_text_spacing
protected java.awt.Font font
protected java.awt.Rectangle colorbox
protected RowColorModel rcm
| Constructor Detail |
|---|
public Legend()
public Legend(RowColorModel rcm)
rcm - the RowColorModel containing the row titles and their colors.| Method Detail |
|---|
public void setRowColorModel(RowColorModel rcm)
rcm - the RowColorModelpublic RowColorModel getRowColorModel()
public void setColorBox(java.awt.Rectangle r)
r - the Rectangle defining the colored box rendered left to every Legend entry.public java.awt.Rectangle getColorBox()
public void setFont(java.awt.Font f)
f - the font objectpublic java.awt.Font getFont()
public java.awt.Dimension getPreferredSize()
public void paintDefault(java.awt.Graphics2D g)
paintDefault in class AbstractRendererg - the Graphics2D object to paint in
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||