×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Java
Posted by: Ellirabeth Dzhurko
Added: Oct 7, 2016 11:25 AM
Views: 9
Tags: no tags
  1. private enum CustomColor {
  2.         BLACK   ("Black", 0xFF000000),
  3.         WHITE   ("White", 0xFFFFFFFF),
  4.         RED     ("Red", 0xFFFF0000),
  5.         GREEN   ("Green", 0xFF00FF00),
  6.         BLUE    ("Blue", 0xFF0000FF),
  7.         YELLOW  ("Yellow", 0xFFFF000),
  8.         MAGENTA ("Magenta", 0xFF00FF00),
  9.         CYAN    ("Cyan", 0x00FFFF00);
  10.  
  11.         private String colorName;
  12.         private String localeColorName;
  13.         private int argb;
  14.  
  15.         CustomColor(String color, int argb) {
  16.             this.colorName = color;
  17.         }
  18.  
  19.         ARGB getARGBIntance(){
  20.             return ARGB.create(this.argb);
  21.         }
  22.         void setLocaleColorName(String localeColor) { this.localeColorName = localeColor; }
  23.         String getLocaleColorName() { return localeColorName; }
  24.         String getColorName() { return colorName; }
  25.     }