protected Control createLayoutOptions(Composite parent) {
		Composite composite = new Composite(parent, SWT.NONE);
		composite.setFont(parent.getFont());
		GridLayout layout = new GridLayout(1, false);
		layout.marginWidth = 0;
		layout.marginHeight = 0;
		composite.setLayout(layout);

		Label label = new Label(composite, SWT.NONE);
		label.setFont(composite.getFont());
		label.setText(PaletteMessages.SETTINGS_LAYOUT_TITLE);
		GridData data = new GridData();
		label.setLayoutData(data);

		Button b = null;
		int[] modes = prefs.getSupportedLayoutModes();
		for (int i = 0; i < modes.length; i++) {
			switch (modes[i]) {
			case PaletteViewerPreferences.LAYOUT_COLUMNS:
				b = createButton(composite, LAYOUT_COLUMNS_VIEW_ID,
						PaletteMessages.SETTINGS_COLUMNS_VIEW_LABEL, SWT.RADIO,
						null);
				((GridData) b.getLayoutData()).horizontalIndent = 5;
				break;
			case PaletteViewerPreferences.LAYOUT_LIST:
				b = createButton(composite, LAYOUT_LIST_VIEW_ID,
						PaletteMessages.SETTINGS_LIST_VIEW_LABEL, SWT.RADIO,
						null);
				((GridData) b.getLayoutData()).horizontalIndent = 5;
				break;
			case PaletteViewerPreferences.LAYOUT_ICONS:
				b = createButton(composite, LAYOUT_ICONS_VIEW_ID,
						PaletteMessages.SETTINGS_ICONS_VIEW_LABEL, SWT.RADIO,
						null);
				((GridData) b.getLayoutData()).horizontalIndent = 5;
				break;
			case PaletteViewerPreferences.LAYOUT_DETAILS:
				b = createButton(composite, LAYOUT_DETAILS_VIEW_ID,
						PaletteMessages.SETTINGS_DETAILS_VIEW_LABEL, SWT.RADIO,
						null);
				((GridData) b.getLayoutData()).horizontalIndent = 5;
				break;
			}
		}

		// Load layout settings
		int layoutSetting = prefs.getLayoutSetting();
		switch (layoutSetting) {
		case PaletteViewerPreferences.LAYOUT_COLUMNS:
			b = getButton(LAYOUT_COLUMNS_VIEW_ID);
			break;
		case PaletteViewerPreferences.LAYOUT_ICONS:
			b = getButton(LAYOUT_ICONS_VIEW_ID);
			break;
		case PaletteViewerPreferences.LAYOUT_LIST:
			b = getButton(LAYOUT_LIST_VIEW_ID);
			break;
		case PaletteViewerPreferences.LAYOUT_DETAILS:
			b = getButton(LAYOUT_DETAILS_VIEW_ID);
			break;
		}
		b.setSelection(true);
		b.setFocus();

		return composite;
	}