Class Colors

java.lang.Object
org.opentcs.guing.util.Colors

public class Colors
extends java.lang.Object
Utility methods concerning colors/colored elements.
  • Method Summary

    Modifier and Type Method Description
    static java.util.List<java.awt.Color> defaultColors()  
    static java.awt.Color unusedBlockColor​(java.util.List<org.opentcs.guing.model.elements.BlockModel> blocks)
    Returns a (preferredly unused) color for a new block.
    static java.awt.Color unusedVehicleColor​(java.util.List<org.opentcs.guing.model.elements.VehicleModel> vehicles)
    Returns a (preferredly unused) color for a new vehicle.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • defaultColors

      public static final java.util.List<java.awt.Color> defaultColors()
    • unusedBlockColor

      public static java.awt.Color unusedBlockColor​(java.util.List<org.opentcs.guing.model.elements.BlockModel> blocks)
      Returns a (preferredly unused) color for a new block.
      Parameters:
      blocks - The existing blocks.
      Returns:
      The color to be used.
    • unusedVehicleColor

      public static java.awt.Color unusedVehicleColor​(java.util.List<org.opentcs.guing.model.elements.VehicleModel> vehicles)
      Returns a (preferredly unused) color for a new vehicle.
      Parameters:
      vehicles - The existing vehicles.
      Returns:
      The color to be used.