public abstract class StateValuePainter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
shouldRescaleValues
Indicates whether this painter should scale its rendering of values to whatever it is told the minimum and maximum values are.
|
Constructor and Description |
---|
StateValuePainter() |
Modifier and Type | Method and Description |
---|---|
abstract void |
paintStateValue(java.awt.Graphics2D g2,
State s,
double value,
float cWidth,
float cHeight)
Paints the representation of a value function for a specific state.
|
abstract void |
rescale(double lowerValue,
double upperValue)
Used to tell this painter that it should render state values so that the minimum possible value is lowerValue and the maximum is upperValue.
|
void |
useValueRescaling(boolean rescale)
Enabling value rescaling allows the painter to adjust to the minimum and maximum values passed to it.
|
protected boolean shouldRescaleValues
public abstract void paintStateValue(java.awt.Graphics2D g2, State s, double value, float cWidth, float cHeight)
g2
- graphics context to which the object should be painteds
- the state of the object to be paintedvalue
- the value function evaluation of state scWidth
- width of the canvas sizecHeight
- height of the canvas sizepublic abstract void rescale(double lowerValue, double upperValue)
lowerValue
- the minimum value of state valuesupperValue
- the maximium value of state valuespublic void useValueRescaling(boolean rescale)
rescale
- whether this painter should rescale to the minimum and maximum value of the value function.