Commit 282831aa authored by helene ortiz's avatar helene ortiz
Browse files

Improve dynamic interface motor for checkbox widget: take font size and

style into account.
parent 03e73039
......@@ -2,6 +2,7 @@
-------
* Add a method isProd() in Nomad class.
* Move method writeToClipboard() in Nomad class.
* Improve dynamic interface motor for checkbox widget: take font size and style into account.
......
......@@ -637,7 +637,7 @@ public class SWTPWidgetFactory extends PWidgetFactory {
}
Composite composite = getParentComposite(parent, nElements, widgetDescriptor.isInTableComposite());
Button check = SWTWidgetFactory.getInstance().createCheck(composite, ConfigManager.getInstance().getString(widgetDescriptor.getPrefix()));
Button check = SWTWidgetFactory.getInstance().createCheck(composite, widgetDescriptor);
if (widgetDescriptor.isInTableComposite()) {
composite.setLayoutData(SWTWidgetFactory.getInstance().getHorizontallyAlignedGridData((GridData) composite.getLayoutData(), widgetDescriptor.getHorizontalAlignment()));
......
......@@ -1182,6 +1182,18 @@ public class SWTWidgetFactory extends WidgetFactory {
}
/**
* Creates a check button widget from a WidgetDescriptor instance (Caution ! Initialization must be done outside)
*
* @param parentComposite parent composite
* @param initialValue initial value for the text associated with the check button widget
* @return a check button widget
*/
public Button createCheck(Composite parentComposite, WidgetDescriptor widgetDescriptor) {
return createButton(parentComposite, ConfigManager.getInstance().getString(widgetDescriptor.getPrefix()), SWT.CHECK, widgetDescriptor.getFontSize(), widgetDescriptor.getFontStyle());
}
/**
* Creates a radio button widget
*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment