public class LegendItem extends Object implements Cloneable, Serializable
Constructor and Description |
---|
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.
|
LegendItem(AttributedString label,
String description,
String toolTipText,
String urlText,
Shape shape,
Paint fillPaint)
Creates a legend item with a filled shape.
|
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.
|
LegendItem(AttributedString label,
String description,
String toolTipText,
String urlText,
Shape line,
Stroke lineStroke,
Paint linePaint)
Creates a legend item using a line.
|
LegendItem(String label)
Creates a legend item with the specified label.
|
LegendItem(String label,
Paint paint)
Creates a legend item with the specified label and fill paint.
|
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.
|
LegendItem(String label,
String description,
String toolTipText,
String urlText,
Shape shape,
Paint fillPaint)
Creates a legend item with a filled shape.
|
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.
|
LegendItem(String label,
String description,
String toolTipText,
String urlText,
Shape line,
Stroke lineStroke,
Paint linePaint)
Creates a legend item using a line.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Returns an independent copy of this object (except that the clone will
still reference the same dataset as the original
LegendItem ). |
boolean |
equals(Object obj)
Tests this item for equality with an arbitrary object.
|
AttributedString |
getAttributedLabel()
Returns the attributed label.
|
Dataset |
getDataset()
Returns the dataset.
|
int |
getDatasetIndex()
Returns the dataset index for this legend item.
|
String |
getDescription()
Returns the description for the legend item.
|
Paint |
getFillPaint()
Returns the fill paint.
|
org.jfree.ui.GradientPaintTransformer |
getFillPaintTransformer()
Returns the transformer used when the fill paint is an instance of
GradientPaint . |
String |
getLabel()
Returns the label.
|
Font |
getLabelFont()
Returns the label font.
|
Paint |
getLabelPaint()
Returns the paint used to draw the label.
|
Shape |
getLine()
Returns the line.
|
Paint |
getLinePaint()
Returns the paint used for lines.
|
Stroke |
getLineStroke()
Returns the line stroke for the series.
|
Paint |
getOutlinePaint()
Returns the outline paint.
|
Stroke |
getOutlineStroke()
Returns the outline stroke.
|
int |
getSeriesIndex()
Returns the series index for this legend item.
|
Comparable |
getSeriesKey()
Returns the series key.
|
Shape |
getShape()
Returns the shape used to label the series represented by this legend
item.
|
String |
getToolTipText()
Returns the tool tip text.
|
String |
getURLText()
Returns the URL text.
|
boolean |
isLineVisible()
Returns a flag that indicates whether or not the line is visible.
|
boolean |
isShapeFilled()
Returns a flag that controls whether or not the shape is filled.
|
boolean |
isShapeOutlineVisible()
Returns the flag that controls whether or not the shape outline
is visible.
|
boolean |
isShapeVisible()
Returns a flag that indicates whether or not the shape is visible.
|
void |
setDataset(Dataset dataset)
Sets the dataset.
|
void |
setDatasetIndex(int index)
Sets the dataset index for this legend item.
|
void |
setDescription(String text)
Sets the description for this legend item.
|
void |
setFillPaint(Paint paint)
Sets the fill paint.
|
void |
setFillPaintTransformer(org.jfree.ui.GradientPaintTransformer transformer)
Sets the transformer used when the fill paint is an instance of
GradientPaint . |
void |
setLabelFont(Font font)
Sets the label font.
|
void |
setLabelPaint(Paint paint)
Sets the paint used to draw the label.
|
void |
setLine(Shape line)
Sets the line.
|
void |
setLinePaint(Paint paint)
Sets the line paint.
|
void |
setLineStroke(Stroke stroke)
Sets the line stroke.
|
void |
setLineVisible(boolean visible)
Sets the flag that controls whether or not the line shape is visible for
this legend item.
|
void |
setOutlinePaint(Paint paint)
Sets the outline paint.
|
void |
setOutlineStroke(Stroke stroke)
Sets the outline stroke.
|
void |
setSeriesIndex(int index)
Sets the series index for this legend item.
|
void |
setSeriesKey(Comparable key)
Sets the series key.
|
void |
setShape(Shape shape)
Sets the shape for the legend item.
|
void |
setShapeVisible(boolean visible)
Sets the flag that controls whether or not the shape is visible.
|
void |
setToolTipText(String text)
Sets the tool tip text for this legend item.
|
void |
setURLText(String text)
Sets the URL text.
|
public LegendItem(String label)
label
- the label (null
not permitted).public LegendItem(String label, Paint paint)
label
- the label (null
not permitted).paint
- the paint (null
not permitted).public LegendItem(String label, String description, String toolTipText, String urlText, Shape shape, Paint fillPaint)
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).public LegendItem(String label, String description, String toolTipText, String urlText, Shape shape, Paint fillPaint, Stroke outlineStroke, Paint outlinePaint)
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).public LegendItem(String label, String description, String toolTipText, String urlText, Shape line, Stroke lineStroke, Paint linePaint)
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).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)
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).public LegendItem(AttributedString label, String description, String toolTipText, String urlText, Shape shape, Paint fillPaint)
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).public LegendItem(AttributedString label, String description, String toolTipText, String urlText, Shape shape, Paint fillPaint, Stroke outlineStroke, Paint outlinePaint)
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).public LegendItem(AttributedString label, String description, String toolTipText, String urlText, Shape line, Stroke lineStroke, Paint linePaint)
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).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)
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 (null
not permitted).lineStroke
- the stroke (null
not permitted).linePaint
- the line paint (null
not permitted).public Dataset getDataset()
setDatasetIndex(int)
public void setDataset(Dataset dataset)
dataset
- the dataset.public int getDatasetIndex()
setDatasetIndex(int)
,
getDataset()
public void setDatasetIndex(int index)
index
- the index.getDatasetIndex()
public Comparable getSeriesKey()
setSeriesKey(Comparable)
public void setSeriesKey(Comparable key)
key
- the series key.public int getSeriesIndex()
public void setSeriesIndex(int index)
index
- the index.public String getLabel()
null
).public Font getLabelFont()
null
).public void setLabelFont(Font font)
font
- the font (null
permitted).public Paint getLabelPaint()
null
).public void setLabelPaint(Paint paint)
paint
- the paint (null
permitted).public AttributedString getAttributedLabel()
null
).public String getDescription()
null
).setDescription(java.lang.String)
public void setDescription(String text)
text
- the description (null
permitted).getDescription()
public String getToolTipText()
null
).setToolTipText(java.lang.String)
public void setToolTipText(String text)
text
- the text (null
permitted).getToolTipText()
public String getURLText()
null
).setURLText(java.lang.String)
public void setURLText(String text)
text
- the text (null
permitted).getURLText()
public boolean isShapeVisible()
setShapeVisible(boolean)
public void setShapeVisible(boolean visible)
visible
- the new flag value.isShapeVisible()
,
isLineVisible()
public Shape getShape()
null
).setShape(java.awt.Shape)
public void setShape(Shape shape)
shape
- the shape (null
not permitted).getShape()
public boolean isShapeFilled()
public Paint getFillPaint()
null
).public void setFillPaint(Paint paint)
paint
- the paint (null
not permitted).public boolean isShapeOutlineVisible()
public Stroke getLineStroke()
null
).public void setLineStroke(Stroke stroke)
stroke
- the stroke (null
not permitted).public Paint getLinePaint()
null
).public void setLinePaint(Paint paint)
paint
- the paint (null
not permitted).public Paint getOutlinePaint()
null
).public void setOutlinePaint(Paint paint)
paint
- the paint (null
not permitted).public Stroke getOutlineStroke()
null
).setOutlineStroke(java.awt.Stroke)
public void setOutlineStroke(Stroke stroke)
stroke
- the stroke (null
not permitted).getOutlineStroke()
public boolean isLineVisible()
setLineVisible(boolean)
public void setLineVisible(boolean visible)
visible
- the new flag value.isLineVisible()
public Shape getLine()
null
).setLine(java.awt.Shape)
,
isLineVisible()
public void setLine(Shape line)
line
- the line (null
not permitted).getLine()
public org.jfree.ui.GradientPaintTransformer getFillPaintTransformer()
GradientPaint
.null
).setFillPaintTransformer(GradientPaintTransformer)
public void setFillPaintTransformer(org.jfree.ui.GradientPaintTransformer transformer)
GradientPaint
.transformer
- the transformer (null
not permitted).getFillPaintTransformer()
public boolean equals(Object obj)
public Object clone() throws CloneNotSupportedException
LegendItem
).clone
in class Object
CloneNotSupportedException
- if the legend item cannot be cloned.Jas4pp 1.5 © Java Analysis Studio for Particle Physics