1 33 34 package com.icesoft.faces.context.effects; 35 36 40 public class Highlight extends Effect { 41 private String startColor; 42 43 46 public Highlight() { 47 setStartColor("#ffff99"); 48 } 49 50 55 public Highlight(String s) { 56 setStartColor(s); 57 } 58 59 64 public String getStartColor() { 65 return startColor; 66 } 67 68 73 public void setStartColor(String startColor) { 74 this.startColor = startColor; 75 ea.add("startcolor", startColor); 76 } 77 78 83 public String getFunctionName() { 84 85 return "new Effect.Highlight"; 86 } 87 88 public int hashCode() { 89 int value = 0; 90 char[] ca = startColor.toCharArray(); 91 for (int i = 1; i < ca.length; i++) { 92 value += (int) ca[i] + i; 93 } 94 return EffectHashCode.HIGHLIGHT * value; 95 } 96 97 98 } 99 | Popular Tags |