Style Intelligence v12.0

inetsoft.graph.guide.form
Class TargetStrategy

java.lang.Object
  extended by inetsoft.graph.guide.form.TargetStrategy
Direct Known Subclasses:
ConfidenceIntervalStrategy, DynamicLineStrategy, PercentageStrategy, PercentileStrategy, QuantileStrategy, StandardDeviationStrategy

public abstract class TargetStrategy
extends Object

These classes are used as different strategies for calculating the boundaries of graph target bands


Field Summary
protected  Integer[] sortedIndices
           
 
Constructor Summary
TargetStrategy()
           
 
Method Summary
 double[] calculateBoundaries(double[] data)
          Calculates the positions of the band boundaries based on incoming post-aggregate data and some number of parameters.
protected abstract  String[] generateDefaultLabels(double[] bandBoundaries, boolean dateTarget)
          Generate labels for boundary lines using the line boundaries
protected  String[] generateLabels(double[] bandBoundaries, MessageFormat[] labelFormats, String fieldName, Format valueFormat, boolean dateTarget)
          Generates label strings for boundary lines
protected abstract  double[] getRuntimeBoundaries(double[] data)
          Generate the runtime boundary values in original order
protected abstract  void reorderValues(Integer[] indices)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sortedIndices

protected Integer[] sortedIndices
Constructor Detail

TargetStrategy

public TargetStrategy()
Method Detail

calculateBoundaries

public final double[] calculateBoundaries(double[] data)
Calculates the positions of the band boundaries based on incoming post-aggregate data and some number of parameters. This also needs to re-arrange the dynamic values in the strategy so that labels are generated properly later.

Returns:
A sorted(ascending) array of boundary values

getRuntimeBoundaries

protected abstract double[] getRuntimeBoundaries(double[] data)
Generate the runtime boundary values in original order

Parameters:
data -
Returns:

reorderValues

protected abstract void reorderValues(Integer[] indices)

generateDefaultLabels

protected abstract String[] generateDefaultLabels(double[] bandBoundaries,
                                                  boolean dateTarget)
Generate labels for boundary lines using the line boundaries


generateLabels

protected String[] generateLabels(double[] bandBoundaries,
                                  MessageFormat[] labelFormats,
                                  String fieldName,
                                  Format valueFormat,
                                  boolean dateTarget)
Generates label strings for boundary lines

Parameters:
bandBoundaries - The already calculated positions of boundary lines
labelFormats - The user provided template string
fieldName - The name of the field
Returns:
labels for the target lines.

Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.