Class DisplayInformation

java.lang.Object
itumulator.executable.DisplayInformation

public class DisplayInformation extends Object
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 Details

    • DisplayInformation

      public DisplayInformation(Color color)
      Only display using a color.
      Parameters:
      color - to display as.
    • DisplayInformation

      public 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.
      Parameters:
      color - to fall back upon.
      imageKey - to the image
      random_direction - Whether or not the image can be placed in a random direction.
    • DisplayInformation

      public DisplayInformation(Color color, String imageKey)
      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

      public Color getColor()
      Get the color.
      Returns:
      color.
    • getImageKey

      public String 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.