AnyLogic
Expand
Font size
All Implemented Interfaces:
Serializable

public class ColorMapping
extends Object
implements Serializable
Conditional expression which determines the color of the value in TimeColorChart
Author:
AnyLogic North America, LLC https://anylogic.com
See Also:
Serialized Form

Constructor Summary

ConstructorDescription
ColorMapping(String title, ColorMappingOperator comparisonOperator, double rightHandSide, Color color)
Creates the mapping from the value to the color

Method Summary

Modifier and TypeMethodDescription
ColorgetColor()
Returns the resulting color of this mapping
ColorMappingOperatorgetComparisonOperator()
Returns the operator of this mapping
doublegetRightHandSide()
Returns the value of the rightHandSide
StringgetTitle() 

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Details

ColorMapping

public ColorMapping(String title,
 ColorMappingOperator comparisonOperator,
 double rightHandSide,
 Color color)
Creates the mapping from the value to the color
Parameters:
title - the mapping title
comparisonOperator - the operator that will be applied to the TimeColorChart value and the rightHandSide resulting in either true or false
rightHandSide - the value that will be compared to the TimeColorChart value using the comparisonOperator
color - the color of the value in TimeColorChart if the comparison operation resulted in true

Method Details

getTitle

public String getTitle()

getComparisonOperator

public ColorMappingOperator getComparisonOperator()
Returns the operator of this mapping
Returns:
comparisonOperator

getRightHandSide

public double getRightHandSide()
Returns the value of the rightHandSide
Returns:
rightHandSide

getColor

public Color getColor()
Returns the resulting color of this mapping
Returns:
color