ColorPreference.java 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. package holeg.preferences;
  2. import java.awt.Color;
  3. import holeg.model.Flexibility.FlexState;
  4. import holeg.ui.model.DecoratedHolonObject.HolonObjectState;
  5. /**
  6. * A Class to save all colors in Holeg.
  7. * @author Tom
  8. *
  9. */
  10. public class ColorPreference {
  11. public static class Element{
  12. public static class Priority{
  13. public static final Color Essential = new Color(201, 44, 74);
  14. public static final Color High = new Color(255, 92, 26);
  15. public static final Color Medium = new Color(255, 216, 57);
  16. public static final Color Low = new Color(255, 255, 175);
  17. public static final Color NoData = new Color(21, 8, 17);
  18. }
  19. public static final Color Active = new Color(255, 203, 35);
  20. public static final Color Inactive = new Color(128, 154, 163);
  21. }
  22. public static class HolonObject{
  23. public static final Color Producer = new Color(153, 204, 255);
  24. public static final Color OverSupplied = new Color(166, 78, 229);
  25. public static final Color Supplied = new Color(13, 175, 28);
  26. public static final Color PartiallySupplied = Color.yellow;
  27. public static final Color NotSupplied = new Color(230, 120, 100);
  28. public static final Color NoEnergy = Color.white;
  29. public static Color getStateColor(HolonObjectState state) {
  30. switch (state) {
  31. case NOT_SUPPLIED:
  32. return NotSupplied;
  33. case OVER_SUPPLIED:
  34. return OverSupplied;
  35. case PARTIALLY_SUPPLIED:
  36. return PartiallySupplied;
  37. case PRODUCER:
  38. return Producer;
  39. case SUPPLIED:
  40. return Supplied;
  41. case NO_ENERGY:
  42. default:
  43. return NoEnergy;
  44. }
  45. }
  46. }
  47. public static class Edge{
  48. public static final Color Working = new Color(13, 175, 28);
  49. public static final Color Burned = Color.red;
  50. }
  51. public static class Energy{
  52. public static final Color Production = new Color(61, 133, 243);
  53. public static final Color Consumption = new Color(255, 67, 60);
  54. }
  55. public static class Flexibility{
  56. public static final Color InUse = new Color(182, 238, 166);
  57. public static final Color OnCooldown = new Color(239, 215, 128);
  58. public static final Color Offered = new Color(75, 170, 72);
  59. public static final Color NotOffered = new Color(237, 106, 90);
  60. public static final Color Unavailable = new Color(193, 193, 193);
  61. public static Color getStateColor(FlexState state) {
  62. switch(state) {
  63. case IN_USE:
  64. return InUse;
  65. case NOT_OFFERED:
  66. return NotOffered;
  67. case OFFERED:
  68. return Offered;
  69. case ON_COOLDOWN:
  70. return OnCooldown;
  71. case UNAVAILABLE:
  72. default:
  73. return Unavailable;
  74. }
  75. }
  76. }
  77. public static class Panel {
  78. public static final Color Transparent = new Color(0,0,0,0);
  79. public static final Color ObjectSelection = new Color(128, 174, 247, 40);
  80. public static final Color ObjectSelectionBorder = Color.lightGray;
  81. public static final Color MouseSelection = Color.blue;
  82. public static final Color Background = new Color(250, 250, 250);
  83. public static final Color Title = new Color(54, 73, 78);
  84. }
  85. public static class Dialog{
  86. public static final Color BackgroundColor = new Color(255, 50, 50);
  87. }
  88. public static class Category {
  89. public final static Color Focus = new Color(0, 0, 255);
  90. }
  91. public static class Inspector{
  92. public final static Color Selected = new Color(126, 186, 255);
  93. public final static Color Border = new Color(171, 173, 179);
  94. }
  95. public static class GUI {
  96. //TODO(Tom2021-12-1) for what is this collor used
  97. public static final Color PALE_RED = new Color(255, 192, 192);
  98. }
  99. }