thanks a lot  !
I have tried your example.it's working ..
I think the difference is i was adding *fill* to liquidcanvasbehaviour
constructor while
you have used setChainedGraphics(fill).
I also saw the source of liquidcanvasbehavior and noted that in the end
it's  string concatenation
of all the properties of  Graphics subclasses but may be *sequence* of
concatenation matters...

thanks again to both nino and stefan  !

regards,
Vineet Semwal


---------- Forwarded message ----------
From: Istvan <[email protected]>
Date: Wed, Jul 8, 2009 at 4:50 PM
Subject: Re: artwork problem while changing background color of liquid
canvas
To: [email protected]


Had same problem. Try (,or something like) this
(named "Bocs" instead of "Box") to avoid name clashes in future):

public class Bocs extends WebMarkupContainer {

   public static final byte DEFAULT_ROUNDING_RADIUS = 8;
   public static final String DEAFAULT_FILLCOLOR = "#EEFFD0";
   public static final int DEAFAULT_BORDERWIDTH = 1;
   public static final String DEFAULT_BORDERCOLOR = "#AAAAAA";

   public Bocs(String id) {
       this(id, DEFAULT_ROUNDING_RADIUS, DEAFAULT_FILLCOLOR,
DEAFAULT_BORDERWIDTH,
               DEFAULT_BORDERCOLOR);
   }

   public Bocs(String id, int roundingRadius, String fillColor, int
borderWidth, String borderColor) {
       super(id);
       this.setOutputMarkupId(true);
       this.setOutputMarkupPlaceholderTag(true);
       // CAUTION: do not substitute
       Graphics graphics = new Border(borderColor, borderWidth);
       graphics.setChainedGraphics(new Fill(fillColor));
       LiquidCanvasBehavior behavior = new LiquidCanvasBehavior(graphics,
new RoundedRect(
               (byte) roundingRadius));
       this.add(behavior);
   }

   private static final long serialVersionUID = 1L;
}

Use latest Wicket (1.4-rc5), Wicketstuff Artwork (1.4-20090706.220716-150).

Stefan

Reply via email to