Thank you for the response.
But for some reason, CSS spy didn't work for standalone SWT/JFace.
I tried the following code ant it produces a decent prop list.
Although I still don't know all of the produced props listed by this method would work.
public static void printAllAvailableProperties(Widget w) {
var engine = getEngine(w.getDisplay());
var element = engine.getElement(w);
var sb = new StringBuilder();
sb.append("WidgetClassName : " + w.getClass().getSimpleName() + "\n");
sb.append("ElementAdapter : " + element.getClass().getSimpleName() + "\n");
sb.append("AvailableProperties : \n");
var propList = engine.getCSSProperties(element);
for(String p : propList) {
if( p != null ) {
sb.append(p);
var compProp = engine.getCSSCompositePropertiesNames(p);
if( compProp != null ) {
sb.append(" " + Arrays.toString(compProp));
}
sb.append("\n");
}
}
System.out.println(sb.toString());
}
WidgetClassName : CLabel
ElementAdapter : CompositeElement
AvailableProperties :
cursor
margin
visibility
color
font-weight
font-size
font-stretch
font-style
margin-right
background-color
margin-left
swt-background-mode
text-transform
font-variant
font-adjust
background [background-attachment, background-color, background-image, background-position, background-repeat]
font-family
margin-top
background-image
margin-bottom
font [font-style, font-variant, font-weight, font-size, font-family]
text-align
swt-alignment
[Updated on: Wed, 04 March 2020 05:13]
Report message to a moderator