A temporary storage object for recording the properties of a legend item,
without any consideration for layout issues.
LegendItem
public LegendItem(AttributedString label,
String description,
String toolTipText,
String urlText,
Shape shape,
Paint fillPaint)
Creates a legend item with a filled shape. The shape is not outlined,
and no line is visible.
label
- the label (null
not permitted).description
- the description (null
permitted).toolTipText
- the tool tip text (null
permitted).urlText
- the URL text (null
permitted).shape
- the shape (null
not permitted).fillPaint
- the paint used to fill the shape (null
not permitted).
LegendItem
public LegendItem(AttributedString label,
String description,
String toolTipText,
String urlText,
Shape shape,
Paint fillPaint,
Stroke outlineStroke,
Paint outlinePaint)
Creates a legend item with a filled and outlined shape.
label
- the label (null
not permitted).description
- the description (null
permitted).toolTipText
- the tool tip text (null
permitted).urlText
- the URL text (null
permitted).shape
- the shape (null
not permitted).fillPaint
- the paint used to fill the shape (null
not permitted).outlineStroke
- the outline stroke (null
not
permitted).outlinePaint
- the outline paint (null
not
permitted).
LegendItem
public LegendItem(AttributedString label,
String description,
String toolTipText,
String urlText,
Shape line,
Stroke lineStroke,
Paint linePaint)
Creates a legend item using a line.
label
- the label (null
not permitted).description
- the description (null
permitted).toolTipText
- the tool tip text (null
permitted).urlText
- the URL text (null
permitted).line
- the line (null
not permitted).lineStroke
- the line stroke (null
not permitted).linePaint
- the line paint (null
not permitted).
LegendItem
public LegendItem(AttributedString label,
String description,
String toolTipText,
String urlText,
boolean shapeVisible,
Shape shape,
boolean shapeFilled,
Paint fillPaint,
boolean shapeOutlineVisible,
Paint outlinePaint,
Stroke outlineStroke,
boolean lineVisible,
Shape line,
Stroke lineStroke,
Paint linePaint)
Creates a new legend item.
label
- the label (null
not permitted).description
- the description (not currently used,
null
permitted).toolTipText
- the tool tip text (null
permitted).urlText
- the URL text (null
permitted).shapeVisible
- a flag that controls whether or not the shape is
displayed.shape
- the shape (null
permitted).shapeFilled
- a flag that controls whether or not the shape is
filled.fillPaint
- the fill paint (null
not permitted).shapeOutlineVisible
- a flag that controls whether or not the
shape is outlined.outlinePaint
- the outline paint (null
not permitted).outlineStroke
- the outline stroke (null
not
permitted).lineVisible
- a flag that controls whether or not the line is
visible.line
- the line.lineStroke
- the stroke (null
not permitted).linePaint
- the line paint (null
not permitted).
LegendItem
public LegendItem(String label,
String description,
String toolTipText,
String urlText,
Shape shape,
Paint fillPaint)
Creates a legend item with a filled shape. The shape is not outlined,
and no line is visible.
label
- the label (null
not permitted).description
- the description (null
permitted).toolTipText
- the tool tip text (null
permitted).urlText
- the URL text (null
permitted).shape
- the shape (null
not permitted).fillPaint
- the paint used to fill the shape (null
not permitted).
LegendItem
public LegendItem(String label,
String description,
String toolTipText,
String urlText,
Shape shape,
Paint fillPaint,
Stroke outlineStroke,
Paint outlinePaint)
Creates a legend item with a filled and outlined shape.
label
- the label (null
not permitted).description
- the description (null
permitted).toolTipText
- the tool tip text (null
permitted).urlText
- the URL text (null
permitted).shape
- the shape (null
not permitted).fillPaint
- the paint used to fill the shape (null
not permitted).outlineStroke
- the outline stroke (null
not
permitted).outlinePaint
- the outline paint (null
not
permitted).
LegendItem
public LegendItem(String label,
String description,
String toolTipText,
String urlText,
Shape line,
Stroke lineStroke,
Paint linePaint)
Creates a legend item using a line.
label
- the label (null
not permitted).description
- the description (null
permitted).toolTipText
- the tool tip text (null
permitted).urlText
- the URL text (null
permitted).line
- the line (null
not permitted).lineStroke
- the line stroke (null
not permitted).linePaint
- the line paint (null
not permitted).
LegendItem
public LegendItem(String label,
String description,
String toolTipText,
String urlText,
boolean shapeVisible,
Shape shape,
boolean shapeFilled,
Paint fillPaint,
boolean shapeOutlineVisible,
Paint outlinePaint,
Stroke outlineStroke,
boolean lineVisible,
Shape line,
Stroke lineStroke,
Paint linePaint)
Creates a new legend item.
label
- the label (null
not permitted).description
- the description (not currently used,
null
permitted).toolTipText
- the tool tip text (null
permitted).urlText
- the URL text (null
permitted).shapeVisible
- a flag that controls whether or not the shape is
displayed.shape
- the shape (null
permitted).shapeFilled
- a flag that controls whether or not the shape is
filled.fillPaint
- the fill paint (null
not permitted).shapeOutlineVisible
- a flag that controls whether or not the
shape is outlined.outlinePaint
- the outline paint (null
not permitted).outlineStroke
- the outline stroke (null
not
permitted).lineVisible
- a flag that controls whether or not the line is
visible.line
- the line.lineStroke
- the stroke (null
not permitted).linePaint
- the line paint (null
not permitted).
equals
public boolean equals(Object obj)
Tests this item for equality with an arbitrary object.
obj
- the object (null
permitted).
getAttributedLabel
public AttributedString getAttributedLabel()
Returns the attributed label.
- The attributed label (possibly
null
).
getDatasetIndex
public int getDatasetIndex()
Returns the dataset index for this legend item.
getDescription
public String getDescription()
Returns the description for the legend item.
getFillPaint
public Paint getFillPaint()
Returns the fill paint.
- The fill paint (never
null
).
getFillPaintTransformer
public GradientPaintTransformer getFillPaintTransformer()
Returns the transformer used when the fill paint is an instance of
GradientPaint
.
- The transformer (never
null
).
getLabel
public String getLabel()
Returns the label.
getLine
public Shape getLine()
Returns the line.
getLinePaint
public Paint getLinePaint()
Returns the paint used for lines.
getLineStroke
public Stroke getLineStroke()
Returns the line stroke for the series.
getOutlinePaint
public Paint getOutlinePaint()
Returns the outline paint.
- The outline paint (never
null
).
getOutlineStroke
public Stroke getOutlineStroke()
Returns the outline stroke.
- The outline stroke (never
null
).
getSeriesIndex
public int getSeriesIndex()
Returns the series index for this legend item.
getShape
public Shape getShape()
Returns the shape used to label the series represented by this legend
item.
getToolTipText
public String getToolTipText()
Returns the tool tip text.
- The tool tip text (possibly
null
).
getURLText
public String getURLText()
Returns the URL text.
- The URL text (possibly
null
).
isLineVisible
public boolean isLineVisible()
Returns a flag that indicates whether or not the line is visible.
isShapeFilled
public boolean isShapeFilled()
Returns a flag that controls whether or not the shape is filled.
isShapeOutlineVisible
public boolean isShapeOutlineVisible()
Returns the flag that controls whether or not the shape outline
is visible.
isShapeVisible
public boolean isShapeVisible()
Returns a flag that indicates whether or not the shape is visible.
setDatasetIndex
public void setDatasetIndex(int index)
Sets the dataset index for this legend item.
setFillPaintTransformer
public void setFillPaintTransformer(GradientPaintTransformer transformer)
Sets the transformer used when the fill paint is an instance of
GradientPaint
.
transformer
- the transformer (null
not permitted).
setSeriesIndex
public void setSeriesIndex(int index)
Sets the series index for this legend item.