Package itumulator.executable
Class DisplayInformation
java.lang.Object
itumulator.executable.DisplayInformation
An abstraction used to determine the visual appearance of objects within the simulation.
Images have precedence over colors, however, if a class implements
DynamicDisplayInformationProvider, this preceeds images.-
Constructor Summary
ConstructorsConstructorDescriptionDisplayInformation(Color color) Only display using a color.DisplayInformation(Color color, String imageKey) Display using an image (and color when image is not applicable).DisplayInformation(Color color, String imageKey, boolean random_direction) Display using an image (and color when image is not applicable), allowing you to choose whether an icon can face a random direction. -
Method Summary
Modifier and TypeMethodDescriptiongetColor()Get the color.Get the imageKey of the image.booleanGet whether or not the orientation of the image can be randomized.
-
Constructor Details
-
DisplayInformation
Only display using a color.- Parameters:
color- to display as.
-
DisplayInformation
Display using an image (and color when image is not applicable), allowing you to choose whether an icon can face a random direction.- Parameters:
color- to fall back upon.imageKey- to the imagerandom_direction- Whether or not the image can be placed in a random direction.
-
DisplayInformation
Display using an image (and color when image is not applicable). Will always use the same image orientation.- Parameters:
color- to fall back upon.imageKey- to the image
-
-
Method Details
-
getColor
Get the color.- Returns:
- color.
-
getImageKey
Get the imageKey of the image.- Returns:
- imageKey (string).
-
getRandomDirection
public boolean getRandomDirection()Get whether or not the orientation of the image can be randomized.- Returns:
- true if allowed to randomize orientation.
-