in plugin/src/software/aws/toolkits/eclipse/amazonq/views/CustomizationDialog.java [65:112]
public RadioButtonWithDescriptor(final Composite parent, final String text, final String subtext,
final int style) {
super(parent, SWT.NONE);
GridLayout layout = new GridLayout(1, false);
layout.marginWidth = 0;
layout.marginHeight = 0;
layout.verticalSpacing = 2;
this.setLayout(layout);
Composite topRow = new Composite(this, SWT.NONE);
GridLayout topRowLayout = new GridLayout(2, false);
topRowLayout.marginWidth = 0;
topRowLayout.marginHeight = 0;
topRow.setLayout(topRowLayout);
topRow.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
radioButton = new Button(topRow, SWT.RADIO | style);
radioButton.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
textFont = createFont(12, SWT.NORMAL);
textLabel = new Label(topRow, SWT.WRAP);
textLabel.setText(text);
textLabel.setFont(textFont);
GridData textData = new GridData(SWT.FILL, SWT.CENTER, true, false);
textData.horizontalIndent = PluginUtils.getPlatform().equals(PluginPlatform.WINDOWS) ? 3 : 0;
textLabel.setLayoutData(textData);
subtextFont = createFont(11, SWT.ITALIC);
subtextLabel = new Label(this, SWT.WRAP);
subtextLabel.setText(subtext);
subtextLabel.setFont(subtextFont);
subtextLabel.setForeground(getDisplay().getSystemColor(SWT.COLOR_DARK_GRAY));
GridData subtextData = new GridData(SWT.FILL, SWT.CENTER, true, false);
subtextData.horizontalIndent = PluginUtils.getPlatform().equals(PluginPlatform.WINDOWS) ? 21 : 23; // Indent to align with text label
subtextLabel.setLayoutData(subtextData);
addDisposeListener(e -> {
if (subtextFont != null && !subtextFont.isDisposed()) {
subtextFont.dispose();
}
if (textFont != null && !textFont.isDisposed()) {
textFont.dispose();
}
});
}