How can I differentiate the colour of a widget when in warning/alarm? by default it looks as though both warning and alarm show the same yellow. ![]()
Hello,
By default both colors are the same: Color.orange.
If you want to change it, you have to use the following the static command in your code:
ATKConstant.setColor4Quality("WARNING",myColor);
Hope this helps.
/**
* Sets the default background color for the attribute quality factor.
* Affects all viewer running in this JVM.
* @param quality value (can be "INVALID","WARNING","ALARM","VALID","CHANGING")
* @param c New color
*/
public static void setColor4Quality(String quality,Color c);
Thanks,
I am just using jdraw/synopticappli, so I would make this change in atkPanel? I think the tango distribution only has the class files, would I get the sources from svn?
Steve
Unfortunately, there is no way to change the default colors without coding.
You can write a small java class that launch the SimpleSynopticAppli and call setColor4State.
import fr.esrf.tangoatk.widget.jdraw.SimpleSynopticAppli;
import fr.esrf.tangoatk.widget.util.ATKConstant;
/**
*
*/
public class MySynopticAppli {
public static void main(String args[]) {
ATKConstant.setColor4State("WARING", myWaringColor);
SimpleSynopticAppli.main(args);
}
}
Thanks