Interface PTHistogramPlottable
- All Known Implementing Classes:
- EndUnit, ProcurementAssembler, SequentialBatchAssembler, StandAloneBatchAssembler, Unit, Warehouse
- public interface PTHistogramPlottable
The interface to be implemented in classes referred from PTHistogram
class
PTHistogram can deal with up to three list of objects from which to obtain
the data to be plotted; from the objects contained in the first or unique
list (second or third lists are optional) we have also to obtain the
captions for the various bar in the X axis
an example of getValueToPlot() method in an object extending this interface
is
public double getValueToPlot()
{
return (double) XXXX;
// where XXXX is a value or a method getting a value
}
an example of getLabel() method in an object extending this interface,
if the object is included in the fist or unique list sent to
PTHistogram, is
public String getLabel()
{
return "" + YYYY;
// where YYYY is a numerical value or a method getting
// a numerical value (the trick "" + is used
// to convert a numerical field into a string; if we
// have directly a string, the trick is unnecessary)
}
if the object is included in the second or third list, simply use
return "";
in getLabel() body
- Author:
- From a Michele Sonnessa's idea, with comments of Pietro Terna
getLabel
public java.lang.String getLabel()
getValueToPlot
public double getValueToPlot()