1 42 43 package org.jfree.chart.ui; 44 45 import java.io.Serializable ; 46 47 52 public class GreyPalette extends ColorPalette implements Serializable { 53 54 55 private static final long serialVersionUID = -2120941170159987395L; 56 57 60 public GreyPalette() { 61 super(); 62 initialize(); 63 } 64 65 68 public void initialize() { 69 70 setPaletteName("Grey"); 71 72 this.r = new int[256]; 73 this.g = new int[256]; 74 this.b = new int[256]; 75 76 this.r[0] = 255; 77 this.g[0] = 255; 78 this.b[0] = 255; 79 this.r[1] = 0; 80 this.g[1] = 0; 81 this.b[1] = 0; 82 83 for (int i = 2; i < 256; i++) { 84 this.r[i] = i; 85 this.g[i] = i; 86 this.b[i] = i; 87 } 88 89 } 90 91 } 92 | Popular Tags |