Class PaintHelper
java.lang.Object
org.moeaframework.analysis.diagnostics.PaintHelper
Helper class for maintaining a mapping from series in a plot to their assigned paint. If the series has not yet
been assigned a paint, one will be automatically assigned when invoking
get(Comparable)
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clears all paint assignments from this paint helper.get
(Comparable<?> key) Returns the paint used by the specified series key.void
set
(Comparable<?> key, Paint paint) Assigns a paint for the specified series key.
-
Constructor Details
-
PaintHelper
public PaintHelper()Constructs a new paint helper with no assigned paints.
-
-
Method Details
-
get
Returns the paint used by the specified series key. If the series key has not yet been assigned a paint, one is automatically assigned.- Parameters:
key
- the series key- Returns:
- the paint used by the specified series key
-
set
Assigns a paint for the specified series key. All subsequent invocations ofget(Comparable)
with this series key will return the specified paint.- Parameters:
key
- the series keypaint
- the paint to be used for the specified series key
-
clear
public void clear()Clears all paint assignments from this paint helper.
-