Get the example picker to display the given selected component.

@param selectedComponent the wcomponent to be displayed.
511416
public void displaySelection(final WComponent selectedComponent) {
		WComponent currentComponent = getCurrentComponent();

		if (selectedComponent == currentComponent) {
			// We are already displaying this component, so nothing to do.
			return;
		}

		// We have a new selection so display it.
		container.removeAll();
		container.add(selectedComponent);
	}
1372796
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
		WCheckBoxSelect select = (WCheckBoxSelect) component;
		XmlStringBuilder xml = renderContext.getWriter();
		int cols = select.getButtonColumns();
		boolean readOnly = select.isReadOnly();

		xml.appendTagOpen("ui:checkboxselect");
		xml.appendAttribute("id", component.getId());
		xml.appendOptionalAttribute("class", component.getHtmlClass());
		xml.appendOptionalAttribute("track", component.isTracking(), "true");
		xml.appendOptionalAttribute("hidden", select.isHidden(), "true");
		if (readOnly) {
			xml.appendAttribute("readOnly", "true");
		} else {
			int min = select.getMinSelect();
			int max = select.getMaxSelect();
			xml.appendOptionalAttribute("disabled", select.isDisabled(), "true");
			xml.appendOptionalAttribute("required", select.isMandatory(), "true");
			xml.appendOptionalAttribute("submitOnChange", select.isSubmitOnChange(), "true");
			xml.appendOptionalAttribute("toolTip", component.getToolTip());
			xml.appendOptionalAttribute("accessibleText", component.getAccessibleText());
			xml.appendOptionalAttribute("min", min > 0, min);
			xml.appendOptionalAttribute("max", max > 0, max);
		}
		xml.appendOptionalAttribute("frameless", select.isFrameless(), "true");

		switch (select.getButtonLayout()) {
			case COLUMNS:
				xml.appendAttribute("layout", "column");
				xml.appendOptionalAttribute("layoutColumnCount", cols > 0, cols);
				break;
			case FLAT:
				xml.appendAttribute("layout", "flat");
				break;
			case STACKED:
				xml.appendAttribute("layout", "stacked");
				break;
			default:
				throw new SystemException("Unknown layout type: " + select.getButtonLayout());
		}


		xml.appendClose();

		// Options
		List<?> options = select.getOptions();
		boolean renderSelectionsOnly = readOnly;

		if (options != null) {
			int optionIndex = 0;
			List<?> selections = select.getSelected();

			for (Object option : options) {
				if (option instanceof OptionGroup) {
					throw new SystemException("Option groups not supported in WCheckBoxSelect.");
				} else {
					renderOption(select, option, optionIndex++, xml, selections,
							renderSelectionsOnly);
				}
			}
		}
		if (!readOnly) {
			DiagnosticRenderUtil.renderDiagnostics(select, renderContext);
		}
		xml.appendEndTag("ui:checkboxselect");
	}
718427
@Override
     public Component getTableCellRendererComponent(JTable table, Object value,
             boolean isSelected, boolean hasFocus, int rowIndex, int vColIndex) {
         // 'value' is value contained in the cell located at
         // (rowIndex, vColIndex)

         if (isSelected) {
             // cell (and perhaps other cells) are selected
         }

         if (hasFocus) {
             // this cell is the anchor and the table has the focus
         }

         JComponent result = label;
         // Configure the component with the specified value
         if (!value.toString().equals("")) {
             result = button;
             ((JButton) button).setText(value.toString());
         }

         // Set tool tip if desired
         //setToolTipText((String)value);

         // Since the renderer is a component, return itself
         return result;
     }
992888
private void makeSimpleExample() {
		add(new WHeading(HeadingLevel.H3, "Simple WRadioButtonSelect"));
		WPanel examplePanel = new WPanel();
		examplePanel.setLayout(new FlowLayout(FlowLayout.VERTICAL, Size.MEDIUM));
		add(examplePanel);

		/**
		 * The radio button select.
		 */
		final WRadioButtonSelect rbSelect = new WRadioButtonSelect("australian_state");
		final WTextField text = new WTextField();

		text.setReadOnly(true);
		text.setText(NO_SELECTION);

		WButton update = new WButton("Update");
		update.setAction(new Action() {
			@Override
			public void execute(final ActionEvent event) {
				text.setText("The selected item is: "
						+ rbSelect.getSelected());
			}
		});
		//setting the default submit button improves usability. It can be set on a WPanel or the WRadioButtonSelect directly
		examplePanel.setDefaultSubmitButton(update);

		examplePanel.add(new WLabel("Select a state or territory", rbSelect));
		examplePanel.add(rbSelect);
		examplePanel.add(text);
		examplePanel.add(update);
		add(new WAjaxControl(update, text));
	}
69708
protected CmsPushButton createSelectButton(A_SelectionHandler selectionHandler) {

        CmsPushButton selectButton = new CmsPushButton();
        selectButton.setImageClass(I_CmsButton.SEARCH_SMALL);
        selectButton.setTitle(Messages.get().key(Messages.GUI_TAB_SEARCH_SEARCH_EXISTING_0));
        selectButton.setButtonStyle(ButtonStyle.FONT_ICON, null);
        selectionHandler.setSelectButton(selectButton);
        selectButton.addClickHandler(selectionHandler);
        return selectButton;
    }
165841
private int getComponentState(JComponent c) {
        if (frame != null) {

            if (frame.isSelected()) {
                return SELECTED;
            }
        }

        return SeaGlassLookAndFeel.getComponentState(c);
    }
401795
@Override
	public void add(final WComponent component) {
		getCardContainer().add(component);
		CardManagerModel model = getComponentModel();

		if (model.visibleComponent == null) {
			model.visibleComponent = component;
		}
	}
62555
public <T> List<T> getComponentInstancesOfType(Class<T> componentType)
   {
      return container.getComponentInstancesOfType(componentType);
   }
297301
private synchronized Renderer findRenderer(final WComponent component,
			final Duplet<String, Class<?>> key) {
		LOG.info("Looking for layout for " + key.getSecond().getName() + " in " + key.getFirst());

		Renderer renderer = findConfiguredRenderer(component, key.getFirst());

		if (renderer == null) {
			renderers.put(key, NULL_RENDERER);
		} else {
			renderers.put(key, renderer);
		}

		return renderer;
	}
616490
public static Component findParentForm(final Component childComponent)
	{
		final Component parent = findParent(childComponent, Form.class);
		if ((parent != null) && parent.getClass().equals(Form.class))
		{
			return parent;
		}
		return null;
	}
443814
def componentSelection(self, comp):
        """"""
        # current row which is selected in auto parameters to all component selection to
        indexes = self.selectedIndexes()
        index = indexes[0]
        self.model().toggleSelection(index, comp)
937556
private UIForm getForm(UIComponent component) {
		while (component != null) {
			if (component instanceof UIForm) {
				break;
			}
			component = component.getParent();
		}
		return (UIForm) component;
	}
1129958
public void displaySelectedURL()
    {
        dispFinished = false;
        if (treeCompWindow != null)
        {
            treeCompWindow.setVisible(false);
            treeCompWindow.dispose();
            treeCompWindow = null;
        }
        
        try {
            int i = rendererCombo.getSelectedIndex();
            if (i != -1)
            {
                BoxTreeProvider btp = rendererCombo.getItemAt(i);
                Page page = proc.renderPage(btp, ((ParamsPanel) rendererParamsPanel).getParams());
                setPage(page);
                
                if (segmAutorunCheckbox.isSelected())
                {
                    segmentPage();
                }
                if (logicalAutorunCheckbox.isSelected())
                {
                    buildLogicalTree();
                }
            }
        } catch (Exception e) {
            System.err.println("*** Error: "+e.getMessage());
            e.printStackTrace();
        }
    }
1124046
public Object getComponent(String role, String roleHint) throws ComponentLookupException {
        return container.lookup(role, roleHint);
    }
771829
public static UIContext getContextForComponent(final WComponent component) {
		// Start with the current Context
		UIContext result = UIContextHolder.getCurrent();
		// Go through the contexts until we find the component
		while (result instanceof SubUIContext && !((SubUIContext) result).isInContext(component)) {
			result = ((SubUIContext) result).getBacking();
		}
		return result;
	}
11767
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
		WTextArea textArea = (WTextArea) component;
		XmlStringBuilder xml = renderContext.getWriter();
		boolean readOnly = textArea.isReadOnly();
		xml.appendTagOpen("ui:textarea");
		xml.appendAttribute("id", component.getId());
		xml.appendOptionalAttribute("class", component.getHtmlClass());
		xml.appendOptionalAttribute("track", component.isTracking(), "true");
		xml.appendOptionalAttribute("hidden", textArea.isHidden(), "true");

		if (readOnly) {
			xml.appendAttribute("readOnly", "true");
		} else {
			int cols = textArea.getColumns();
			int rows = textArea.getRows();
			int minLength = textArea.getMinLength();
			int maxLength = textArea.getMaxLength();
			WComponent submitControl = textArea.getDefaultSubmitButton();
			String submitControlId = submitControl == null ? null : submitControl.getId();

			xml.appendOptionalAttribute("disabled", textArea.isDisabled(), "true");
			xml.appendOptionalAttribute("required", textArea.isMandatory(), "true");
			xml.appendOptionalAttribute("minLength", minLength > 0, minLength);
			xml.appendOptionalAttribute("maxLength", maxLength > 0, maxLength);
			xml.appendOptionalAttribute("toolTip", textArea.getToolTip());
			xml.appendOptionalAttribute("accessibleText", textArea.getAccessibleText());
			xml.appendOptionalAttribute("rows", rows > 0, rows);
			xml.appendOptionalAttribute("cols", cols > 0, cols);
			xml.appendOptionalAttribute("buttonId", submitControlId);
			String placeholder = textArea.getPlaceholder();
			xml.appendOptionalAttribute("placeholder", !Util.empty(placeholder), placeholder);

			String autocomplete = textArea.getAutocomplete();
			xml.appendOptionalAttribute("autocomplete", !Util.empty(autocomplete), autocomplete);
		}
		xml.appendClose();

		if (textArea.isRichTextArea()) {
			/*
			 * This is a nested element instead of an attribute to cater for future enhancements
			 * such as turning rich text features on or off, or specifying JSON config either as
			 * a URL attribute or a nested CDATA section.
			 */
			xml.append("<ui:rtf />");
		}

		String textString = textArea.getText();
		if (textString != null) {
			if (textArea.isReadOnly() && textArea.isRichTextArea()) {
				// read only we want to output unescaped, but it must still be XML valid.
				xml.write(HtmlToXMLUtil.unescapeToXML(textString));
			} else {
				xml.appendEscaped(textString);
			}
		}

		if (!readOnly) {
			DiagnosticRenderUtil.renderDiagnostics(textArea, renderContext);
		}
		xml.appendEndTag("ui:textarea");
	}
1025930
public Object getComponent( String theRole, String theRoleHint )
        throws ComponentLookupException
    {
        return container.lookup( theRole, theRoleHint );
    }