Example #1
0
 public void setFillColor(Color fillColor) {
   this.fillColor = fillColor;
   float[] compArray = new float[3];
   this.fillColor.getColorComponents(compArray);
   java.util.List<Float> colorValues = new ArrayList<Float>(compArray.length);
   for (float comp : compArray) {
     colorValues.add(comp);
   }
   entries.put(IC_KEY, colorValues);
 }
Example #2
0
 public void init() {
   super.init();
   // parse out interior colour, specific to link annotations.
   fillColor = Color.WHITE; // we default to black but probably should be null
   java.util.List C = (java.util.List) getObject(IC_KEY);
   // parse thought rgb colour.
   if (C != null && C.size() >= 3) {
     float red = ((Number) C.get(0)).floatValue();
     float green = ((Number) C.get(1)).floatValue();
     float blue = ((Number) C.get(2)).floatValue();
     red = Math.max(0.0f, Math.min(1.0f, red));
     green = Math.max(0.0f, Math.min(1.0f, green));
     blue = Math.max(0.0f, Math.min(1.0f, blue));
     fillColor = new Color(red, green, blue);
     isFillColor = true;
   }
 }