Fills in label and checkbox of a menu entry.<p>

@param entry the menu entry
@param name the label
@param checked true if checkbox should be shown
769585
protected void decorateMenuEntry(CmsContextMenuEntry entry, String name, boolean checked) {

        CmsContextMenuEntryBean bean = new CmsContextMenuEntryBean();
        bean.setLabel(name);
        bean.setActive(true);
        bean.setVisible(true);
        I_CmsInputCss inputCss = I_CmsInputLayoutBundle.INSTANCE.inputCss();
        bean.setIconClass(checked ? inputCss.checkBoxImageChecked() : "");
        entry.setBean(bean);
    }
750594
public void addParam(String name, String value) {
        if (name == null) {
            throw new NullPointerException("name");
        }
        if (value == null) {
            throw new NullPointerException("value");
        }
        params.add(new Param(name, value));
    }
359959
public void setTextWithCode(final Object entry) {
		setText(TABLE.getCode(null, entry));
		setToolTip(TABLE.getDescription(null, entry));
	}
1272
private void processLabelClicked(final String name, final ClickType clickType) {
            if (logger.isTraceEnabled()) {
                logger.trace("JS reports label {} clicked {}", name, clickType);
            }
            synchronized (mapCoordinateElements) {
                if (mapCoordinateElements.containsKey(name)) {
                    final MapCoordinateElement mapCoordinateElement = mapCoordinateElements.get(name).get();
                    if (mapCoordinateElement instanceof MapLabel) {
                        EventType<MapLabelEvent> eventType = null;
                        switch (clickType) {
                            case LEFT:
                                eventType = MapLabelEvent.MAPLABEL_CLICKED;
                                break;
                            case DOUBLE:
                                eventType = MapLabelEvent.MAPLABEL_DOUBLECLICKED;
                                break;
                            case RIGHT:
                                eventType = MapLabelEvent.MAPLABEL_RIGHTCLICKED;
                                break;
                            case MOUSEDOWN:
                                eventType = MapLabelEvent.MAPLABEL_MOUSEDOWN;
                                break;
                            case MOUSEUP:
                                eventType = MapLabelEvent.MAPLABEL_MOUSEUP;
                                break;
                            case ENTERED:
                                eventType = MapLabelEvent.MAPLABEL_ENTERED;
                                break;
                            case EXITED:
                                eventType = MapLabelEvent.MAPLABEL_EXITED;
                                break;
                        }
                        fireEvent(new MapLabelEvent(eventType, (MapLabel) mapCoordinateElement));
                    }
                }
            }
        }
781929
public function addFlag(string $name): void
    {
        if (!$this->hasFlag($name)) {
            $flagEntry = $this->entry[PoTokens::FLAG];
            if ($flagEntry === null) {
                $this->set(PoTokens::FLAG, $name);
            } elseif (is_array($flagEntry)) {
                $flagEntry[] = $name;
                $this->set(PoTokens::FLAG, implode(',', $flagEntry));
            } else {
                $this->set(PoTokens::FLAG, $flagEntry . ',' . $name);
            }
        }
    }
1017100
public static final void cellName(String name)
    {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "cellName", name);

        _cellName = name;

        if (tc.isEntryEnabled())
            Tr.exit(tc, "cellName");
    }
566420
public void initContent(CmsResourceStatusBean status) {

        m_infoBoxContainer.clear();
        CmsListItemWidget infoBox = new CmsListItemWidget(status.getListInfo());
        infoBox.addOpenHandler(new OpenHandler<CmsListItemWidget>() {

            public void onOpen(OpenEvent<CmsListItemWidget> event) {

                CmsDomUtil.resizeAncestor(getParent());
            }
        });
        infoBox.addCloseHandler(new CloseHandler<CmsListItemWidget>() {

            public void onClose(CloseEvent<CmsListItemWidget> event) {

                CmsDomUtil.resizeAncestor(getParent());
            }
        });
        CmsContextMenuButton menuButton = new CmsContextMenuButton(
            status.getStructureId(),
            m_menuHandler,
            AdeContext.resourceinfo);
        menuButton.addStyleName(I_CmsLayoutBundle.INSTANCE.listItemWidgetCss().permaVisible());
        infoBox.addButton(menuButton);
        m_infoBoxContainer.add(infoBox);
        m_dateCreated.setText(status.getDateCreated());
        m_dateExpired.setText(status.getDateExpired());
        m_dateLastModified.setText(status.getDateLastModified());
        m_dateReleased.setText(status.getDateReleased());
        m_lastProject.setText(status.getLastProject());
        m_lockState.setText(status.getLockState());
        CmsResourceState state = status.getStateBean();
        String stateStyle = CmsResourceStateUtil.getStateStyle(state);
        String stateText = CmsResourceStateUtil.getStateName(state);
        m_state.setText(makeSpan(stateStyle, stateText));
        m_title.setText(status.getTitle());
        m_navText.setText(status.getNavText());
        m_permissions.setText(status.getPermissions());
        m_resourceType.setText(status.getResourceType());
        m_size.setText("" + status.getSize() + " Bytes");
        m_userCreated.setText(status.getUserCreated());
        m_userLastModified.setText(status.getUserLastModified());

        List<String> locales = status.getLocales();
        if (locales != null) {
            StringBuffer buffer = new StringBuffer();
            int index = 0;
            for (String locale : locales) {
                if (locale.equals(CmsCoreProvider.get().getLocale())) {
                    buffer.append("<b>");
                    buffer.append(locale);
                    buffer.append("</b>");
                } else {
                    buffer.append(locale);
                }
                if (index != (locales.size() - 1)) {
                    buffer.append(", ");
                }
                index += 1;
            }
            m_locales.setText(buffer.toString());
        } else {
            m_locales.setText("");
        }
        m_additionalParams.clear();
        if (status.getAdditionalAttributes() != null) {
            for (Entry<String, String> entry : status.getAdditionalAttributes().entrySet()) {
                CmsResourceInfoLine line = new CmsResourceInfoLine();
                line.setLabel(entry.getKey());
                line.setText(entry.getValue());
                m_additionalParams.add(line);
            }
        }

    }
80658
@Override
    public void addHeader(String name, String value) {
        this.checkState();
        super.addHeader(name, value);
    }
394283
public void addTagID(String tagID, String name)
    {
        if (_focusMap == null) {
            _focusMap = new HashMap();
        }
        _focusMap.put(tagID, name);
    }
649818
public void checkCheckboxInCell(int row, int column) {
        String checkboxLocator = getXPathBase() + "tr[" + row + "]/td[" + column + "]/input";
        CheckBox cb = new CheckBox(checkboxLocator);
        cb.check();
    }
801587
public void updateInNavigation(CmsClientSitemapEntry entry) {

        if (entry.isInNavigation()) {
            m_inNavigationStyle.setValue(null);
            getListItemWidget().setTitleEditable(true);
        } else {
            m_inNavigationStyle.setValue(CSS.notInNavigationEntry());
            getListItemWidget().setTitleEditable(false);
        }
    }
936414
public static function checkboxSmart($name, $checked = false, $options = [])
    {
        $options['checked'] = (boolean)$checked;
        $value = array_key_exists('value', $options) ? $options['value'] : '1';
        if (isset($options['uncheck'])) {
            // add a hidden field so that if the checkbox is not selected, it still submits a value
            $hidden = static::hiddenInput($name, $options['uncheck']);
            unset($options['uncheck']);
        } else {
            $hidden = '';
        }
        if (isset($options['label'])) {
            $label = $options['label'];
            $labelOptions = isset($options['labelOptions']) ? $options['labelOptions'] : [];
            unset($options['label'], $options['labelOptions']);
            $iconOptions = ArrayHelper::remove($options, 'iconOptions', []);
            $iconTag = ArrayHelper::remove($iconOptions, 'tag', 'i');
            $content = static::label(static::input('checkbox', $name, $value, $options) . Html::tag($iconTag, null, $iconOptions) . $label, null, $labelOptions);
            return $hidden . $content;
        } else {
            return $hidden . static::input('checkbox', $name, $value, $options);
        }
    }
1289520
@Override
    public void setHeader(String name, String value) {
        this.checkState();
        super.setHeader(name, value);
    }
352936
public function checkboxes($name, $label = null, $choices = [], $checkedValues = [], $inline = false, array $options = [])
    {
        $elements = '';

        foreach ($choices as $value => $choiceLabel) {
            $checked = in_array($value, (array) $checkedValues);

            $elements .= $this->checkboxElement($name, $choiceLabel, $value, $checked, $inline, $options);
        }

        $wrapperOptions = $this->isHorizontal() ? ['class' => $this->getRightColumnClass()] : [];
        $wrapperElement = '<div' . $this->html->attributes($wrapperOptions) . '>' . $elements . $this->getFieldError($name) . $this->getHelpText($name, $options) . '</div>';

        return $this->getFormGroup($name, $label, $wrapperElement);
    }
285673
protected function addElement_checkbox ($name, $label, $customElementConfig=array())
    {
        $defaultElementConfig = array(
            'name'       => $name,
            'attributes' => array(
                'id'         => $name,
            ),
            'options'    => array(
                'label'      => $label,
            ),
        );
        $elementConfig = array_replace_recursive(
            $defaultElementConfig,
            $customElementConfig
        );

        $this->addElement_checkbox_configArray($elementConfig);
    }
68983
public final void entry(Class sourceClass, String methodName)
    {
        entry(null, sourceClass, methodName, (Object[]) null);
    }
945883
protected String processLabel(String label, String name) {
    if (null != label) {
      if (Strings.isEmpty(label)) return null;
      else return getText(label);
    } else return getText(name);
  }