* @param attribValue the value of the attribute
* @return 0 for success, non zero for failure or to require some further action
*/
public static int setAttribute( XProject project, Object comp, String attribName, Object attribValue )
{
WidgetAdapter adapter = WidgetAdapter.getInstance();
if ( attribName.equals( "preferredsize" )) {
String[] vals = attribValue.toString().split( "," );
adapter.setPreferredSize( comp, Integer.parseInt( vals[ 0 ] ), Integer.parseInt( vals[ 1 ] ));
}
else if ( attribName.equals( "minimumsize" )) {
String[] vals = attribValue.toString().split( "," );
adapter.setMinimumSize( comp, Integer.parseInt( vals[ 0 ] ), Integer.parseInt( vals[ 1 ] ));
}
else if ( attribName.equals( "maximumsize" )) {
String[] vals = attribValue.toString().split( "," );
adapter.setMaximumSize( comp, Integer.parseInt( vals[ 0 ] ), Integer.parseInt( vals[ 1 ] ));
}
else if ( attribName.equals( "tooltip" ))
adapter.setTooltip( comp, XuiUtilities.translate( project, attribValue.toString()));
else if ( attribName.equals( "opaque" ))
adapter.setOpaque( comp, attribValue.toString().equals( "true" ));
else if ( attribName.equals( "visible" ))
adapter.setVisible( comp, attribValue.toString().equals( "true" ));
else if ( attribName.equals( "enabled" ))
adapter.setEnabled( comp, attribValue.toString().equals( "true" ));
else if ( attribName.equals( "alignment" ))
adapter.setHorizontalAlignment( comp, attribValue.toString());
else if ( attribName.equals( "border" ))
adapter.setBorderType( comp, attribValue.toString());
return -1;
}