Klasse ValueLegend
java.lang.Object
de.erichseifert.gral.graphics.AbstractDrawable
de.erichseifert.gral.graphics.DrawableContainer
de.erichseifert.gral.plots.legends.AbstractLegend
de.erichseifert.gral.plots.legends.ValueLegend
- Bekannte direkte Unterklassen:
BarPlot.BarPlotLegend, BoxPlot.BoxPlotLegend, PiePlot.PiePlotLegend
A legend that shows one entry per row of a data source rather
than one per source. This is what a PiePlot
needs, since there each row is a slice and the source as a whole has no
single symbol.
The label text of an entry is taken from a configurable column of the row
and formatted with a java.text.Format, so a pie can be labeled with
a separate column of names instead of with its values.
- Siehe auch:
-
Verschachtelte Klassen - Übersicht
Von Klasse geerbte verschachtelte Klassen/Schnittstellen AbstractLegend
AbstractLegend.AbstractSymbol, AbstractLegend.Item -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifikator und TypMethodeBeschreibungvoidadd(DataSource source) Adds the specified data source in order to display it.voiddataAdded(DataSource source, DataChangeEvent... events) Method that is invoked when data has been added.voiddataRemoved(DataSource source, DataChangeEvent... events) Method that is invoked when data has been removed.voiddataUpdated(DataSource source, DataChangeEvent... events) Method that is invoked when data has been updated.getEntries(DataSource source) Returns a sequence of items for the specified data source that should be added to the legend.protected StringReturns the label text for the specified row.intReturns the index of the column that contains the labels for the values.Returns the format used to display data values.protected abstract DrawableReturns a symbol for rendering a legend item.voidremove(DataSource source) Removes the specified data source.voidsetLabelColumn(int labelColumn) Sets the index of the column that contains the labels for the values.voidsetLabelFormat(Format labelFormat) Sets the format used to display data values.Von Klasse geerbte Methoden AbstractLegend
clear, contains, draw, drawBackground, drawBorder, getAlignmentX, getAlignmentY, getBackground, getBaseFont, getBorderColor, getBorderStroke, getFont, getGap, getOrientation, getSources, getSymbolSize, refreshLayout, setAlignmentX, setAlignmentY, setBackground, setBaseFont, setBorderColor, setBorderStroke, setBounds, setDrawableFonts, setFont, setGap, setOrientation, setSymbolSizeVon Klasse geerbte Methoden DrawableContainer
add, add, contains, drawComponents, getConstraints, getDrawables, getDrawablesAt, getInsets, getLayout, getPreferredSize, iterator, layout, remove, setBounds, setInsets, setLayout, sizeVon Klasse geerbte Methoden AbstractDrawable
getBounds, getHeight, getWidth, getX, getY, setPositionVon Klasse geerbte Methoden Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitVon Schnittstelle geerbte Methoden Container
add, add, contains, getBounds, getConstraints, getDrawables, getDrawablesAt, getInsets, getLayout, layout, remove, setBounds, setInsets, setLayout, sizeVon Schnittstelle geerbte Methoden Drawable
getBounds, getHeight, getPreferredSize, getWidth, getX, getY, setBounds, setPositionVon Schnittstelle geerbte Methoden Iterable
forEach, iterator, spliterator
-
Konstruktordetails
-
ValueLegend
public ValueLegend()Initializes a new instance with default values.
-
-
Methodendetails
-
getEntries
Returns a sequence of items for the specified data source that should be added to the legend.- Parameter:
source- Data source.- Gibt zurück:
- A sequence of items for the specified data source.
-
getLabel
-
add
Beschreibung aus Klasse kopiert:AbstractLegendAdds the specified data source in order to display it.- Angegeben von:
addin SchnittstelleLegend- Setzt außer Kraft:
addin KlasseAbstractLegend- Parameter:
source- data source to be added.
-
remove
Beschreibung aus Klasse kopiert:AbstractLegendRemoves the specified data source.- Angegeben von:
removein SchnittstelleLegend- Setzt außer Kraft:
removein KlasseAbstractLegend- Parameter:
source- Data source to be removed.
-
dataAdded
Method that is invoked when data has been added. This method is invoked by objects that provide support forDataListeners and should not be called manually.- Angegeben von:
dataAddedin SchnittstelleDataListener- Parameter:
source- Data source that has been changed.events- Optional event object describing the data values that have been added.
-
dataUpdated
Method that is invoked when data has been updated. This method is invoked by objects that provide support forDataListeners and should not be called manually.- Angegeben von:
dataUpdatedin SchnittstelleDataListener- Parameter:
source- Data source that has been changed.events- Optional event object describing the data values that have been updated.
-
dataRemoved
Method that is invoked when data has been removed. This method is invoked by objects that provide support forDataListeners and should not be called manually.- Angegeben von:
dataRemovedin SchnittstelleDataListener- Parameter:
source- Data source that has been changed.events- Optional event object describing the data values that have been removed.
-
getLabelColumn
public int getLabelColumn()Returns the index of the column that contains the labels for the values.- Gibt zurück:
- Column index containing the labels.
-
setLabelColumn
public void setLabelColumn(int labelColumn) Sets the index of the column that contains the labels for the values.- Parameter:
labelColumn- Column index containing the labels.
-
getLabelFormat
Returns the format used to display data values.- Gibt zurück:
- Format for data to label text conversion.
-
setLabelFormat
Sets the format used to display data values.- Parameter:
labelFormat- Format for data to label text conversion.
-
getSymbol
-