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