View Javadoc
1   package org.woehlke.computer.kurzweil.tabs.simulatedevolution.model;
2   
3   import lombok.Getter;
4   import lombok.ToString;
5   import lombok.extern.log4j.Log4j2;
6   
7   import java.awt.*;
8   
9   import static java.awt.Color.*;
10  
11  /**
12   * The Status of the Cell's LifeCycle.
13   * It is Displayed as Color of the Cell.
14   *
15   * @see LifeCycle
16   *
17   * © 2006 - 2008 Thomas Woehlke.
18   * http://thomas-woehlke.de/p/simulated-evolution/
19   * @author Thomas Woehlke
20   * Date: 25.08.13
21   * Time: 12:40
22   */
23  @Log4j2
24  @Getter
25  @ToString
26  public enum LifeCycleStatus {
27  
28      YOUNG(BLUE, WHITE),
29      YOUNG_AND_FAT(YELLOW, BLACK),
30      FULL_AGE(RED, BLACK),
31      HUNGRY(LIGHT_GRAY, WHITE),
32      OLD(DARK_GRAY, BLACK),
33      DEAD(BLACK, BLACK),
34      POPULATION(WHITE, BLACK);
35  
36      private Color color;
37      private Color colorFont;
38  
39      LifeCycleStatus(Color color, Color colorFont){
40          this.color=color;
41          this.colorFont = colorFont;
42      }
43  
44      public Color getColorForeground() {
45          return colorFont;
46      }
47      public Color getColorBackground() {
48          return color;
49      }
50  }