| Prev Class | Next Class | Frames | No Frames |
| Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Objectorg.jfree.chart.block.AbstractBlockorg.jfree.chart.title.Titleorg.jfree.chart.title.PaintScaleLegendPaintScale implementation.
Field Summary |
Fields inherited from class org.jfree.chart.title.Title | |
DEFAULT_HORIZONTAL_ALIGNMENT, DEFAULT_PADDING, DEFAULT_POSITION, DEFAULT_VERTICAL_ALIGNMENT | |
Constructor Summary | |
| |
Method Summary | |
Size2D |
|
protected Size2D | |
void |
|
Object |
|
boolean |
|
ValueAxis |
|
AxisLocation |
|
double |
|
Paint |
|
PaintScale |
|
Paint |
|
Stroke |
|
double |
|
boolean |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
Methods inherited from class org.jfree.chart.title.Title | |
addChangeListener, clone, draw, equals, getHorizontalAlignment, getNotify, getPosition, getVerticalAlignment, hashCode, notifyListeners, removeChangeListener, setHorizontalAlignment, setNotify, setPosition, setVerticalAlignment | |
Methods inherited from class org.jfree.chart.block.AbstractBlock | |
arrange, arrange, calculateTotalHeight, calculateTotalWidth, clone, drawBorder, equals, getBorder, getBounds, getContentXOffset, getContentYOffset, getFrame, getHeight, getID, getMargin, getPadding, getWidth, setBorder, setBorder, setBounds, setFrame, setHeight, setID, setMargin, setMargin, setPadding, setPadding, setWidth, toContentConstraint, trimBorder, trimMargin, trimPadding, trimToContentHeight, trimToContentWidth | |
public PaintScaleLegend(PaintScale scale, ValueAxis axis)
Creates a new instance.
- Parameters:
scale- the scale (nullnot permitted).axis- the axis (nullnot permitted).
public Size2D arrange(Graphics2D g2, RectangleConstraint constraint)
Arranges the contents of the block, within the given constraints, and returns the block size.
- Overrides:
- arrange in interface AbstractBlock
- Parameters:
g2- the graphics device.constraint- the constraint (nullnot permitted).
- Returns:
- The block size (in Java2D units, never
null).
protected Size2D arrangeRR(Graphics2D g2, Range widthRange, Range heightRange)
Returns the content size for the title. This will reflect the fact that a text title positioned on the left or right of a chart will be rotated 90 degrees.
- Parameters:
g2- the graphics device.widthRange- the width range.heightRange- the height range.
- Returns:
- The content size.
public void draw(Graphics2D g2, Rectangle2D area)
Draws the legend within the specified area.
- Parameters:
g2- the graphics target (nullnot permitted).area- the drawing area (nullnot permitted).
public Object draw(Graphics2D g2, Rectangle2D area, Object params)
Draws the legend within the specified area.
- Parameters:
g2- the graphics target (nullnot permitted).area- the drawing area (nullnot permitted).params- drawing parameters (ignored here).
- Returns:
null.
public boolean equals(Object obj)
Tests this legend for equality with an arbitrary object.
- Parameters:
obj- the object (nullpermitted).
- Returns:
- A boolean.
public ValueAxis getAxis()
Returns the axis for the paint scale.
- Returns:
- The axis (never
null).
- See Also:
setAxis(ValueAxis)
public AxisLocation getAxisLocation()
Returns the axis location.
- Returns:
- The axis location (never
null).
- See Also:
setAxisLocation(AxisLocation)
public double getAxisOffset()
Returns the offset between the axis and the paint strip.
- Returns:
- The offset between the axis and the paint strip.
- See Also:
setAxisOffset(double)
public Paint getBackgroundPaint()
Returns the background paint.
- Returns:
- The background paint.
public PaintScale getScale()
Returns the scale used to convert values to colors.
- Returns:
- The scale (never
null).
- See Also:
setScale(PaintScale)
public Paint getStripOutlinePaint()
Returns the paint used to draw the outline of the paint strip.
- Returns:
- The paint (never
null).
- See Also:
setStripOutlinePaint(Paint)
public Stroke getStripOutlineStroke()
Returns the stroke used to draw the outline around the paint strip.
- Returns:
- The stroke (never
null).
- See Also:
setStripOutlineStroke(Stroke)
public double getStripWidth()
Returns the width of the paint strip, in Java2D units.
- Returns:
- The width of the paint strip.
- See Also:
setStripWidth(double)
public boolean isStripOutlineVisible()
Returns the flag that controls whether or not an outline is drawn around the paint strip.
- Returns:
- A boolean.
- See Also:
setStripOutlineVisible(boolean)
public void setAxis(ValueAxis axis)
Sets the axis for the paint scale and sends aTitleChangeEventto all registered listeners.
- Parameters:
axis- the axis (nullnot permitted).
- See Also:
getAxis()
public void setAxisLocation(AxisLocation location)
Sets the axis location and sends aTitleChangeEventto all registered listeners.
- Parameters:
location- the location (nullnot permitted).
- See Also:
getAxisLocation()
public void setAxisOffset(double offset)
Sets the offset between the axis and the paint strip and sends aTitleChangeEventto all registered listeners.
- Parameters:
offset- the offset.
public void setBackgroundPaint(Paint paint)
Sets the background paint and sends aTitleChangeEventto all registered listeners.
- Parameters:
paint- the paint (nullpermitted).
public void setScale(PaintScale scale)
Sets the scale and sends aTitleChangeEventto all registered listeners.
- Parameters:
scale- the scale (nullnot permitted).
- See Also:
getScale()
public void setStripOutlinePaint(Paint paint)
Sets the paint used to draw the outline of the paint strip, and sends aTitleChangeEventto all registered listeners.
- Parameters:
paint- the paint (nullnot permitted).
- See Also:
getStripOutlinePaint()
public void setStripOutlineStroke(Stroke stroke)
Sets the stroke used to draw the outline around the paint strip and sends aTitleChangeEventto all registered listeners.
- Parameters:
stroke- the stroke (nullnot permitted).
- See Also:
getStripOutlineStroke()
public void setStripOutlineVisible(boolean visible)
Sets the flag that controls whether or not an outline is drawn around the paint strip, and sends aTitleChangeEventto all registered listeners.
- Parameters:
visible- the flag.
- See Also:
isStripOutlineVisible()
public void setStripWidth(double width)
Sets the width of the paint strip and sends aTitleChangeEventto all registered listeners.
- Parameters:
width- the width.
- See Also:
getStripWidth()