Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
Hi to all!
How can I set the text color inside the dataUtility?
localDispText = new TextDisplayComponent((String)localName);
((TextDisplayComponent)localDispText).setValue((String)localName);
Thanks a lot!
Solved! Go to Solution.
Create your own LabelRenderer inside your dataUtility class like following:
class TextRenderer extends LabelRenderer
{
protected void renderObject(Object obj, PrintWriter printwriter, RenderingContext renderingcontext) throws RenderingException
{
Label label = (Label)obj;
String color= "#ff0000";
write(printwriter,"<b style=\"color:" + color + "\">"+label.getValue()+"</b>");
}
}
Create your own LabelRenderer inside your dataUtility class like following:
class TextRenderer extends LabelRenderer
{
protected void renderObject(Object obj, PrintWriter printwriter, RenderingContext renderingcontext) throws RenderingException
{
Label label = (Label)obj;
String color= "#ff0000";
write(printwriter,"<b style=\"color:" + color + "\">"+label.getValue()+"</b>");
}
}
Hi Anthony,
Can you please give a complete dataUtility example ?
Thank you in advance,
Hicham