Updates the CSS classes according to the button state.<p>

@param styleDependent the dependent style name
176707
private void updateState(String styleDependent) {

        if (CmsStringUtil.isEmptyOrWhitespaceOnly(styleDependent)) {
            // reseting to cmsState-up
            styleDependent = "up";
        }
        if (!styleDependent.equals(m_styleDependent)) {
            m_main.removeStyleDependentName(m_styleDependent);
            m_main.setStyleDependentName(styleDependent, true);
            m_styleDependent = styleDependent;
        }
    }
517618
public void setDirectEditButtonStyle(String buttonstyle) {

        int buttonstyleValue = BUTTONSTYLE_TEXTIMAGE;
        try {
            if (buttonstyle != null) {
                buttonstyleValue = BUTTON_STYLES_LIST.indexOf(buttonstyle);
            }
        } catch (Exception e) {
            // do nothing, use the default value
        }
        setDirectEditButtonStyle(buttonstyleValue);
    }
1247840
public void forceMouseOut() {

        for (Widget w : m_buttonPanel) {
            if (w instanceof CmsPushButton) {
                ((CmsPushButton)w).clearHoverState();
            }
        }
        CmsDomUtil.ensureMouseOut(this);
        removeStyleName(I_CmsLayoutBundle.INSTANCE.stateCss().cmsHovering());
    }
855613
public void addEditorCssHandler(String editorCssHandlerClassName) {

        try {
            I_CmsEditorCssHandler editorCssHandler = (I_CmsEditorCssHandler)Class.forName(
                editorCssHandlerClassName).newInstance();
            m_editorCssHandlers.add(editorCssHandler);
            if (CmsLog.INIT.isInfoEnabled()) {
                CmsLog.INIT.info(
                    Messages.get().getBundle().key(Messages.INIT_EDITOR_CSSHANDLER_CLASS_1, editorCssHandlerClassName));
            }
        } catch (Exception e) {
            LOG.error(
                Messages.get().getBundle().key(Messages.LOG_INVALID_EDITOR_CSSHANDLER_1, editorCssHandlerClassName),
                e);
        }
    }
470381
protected void bind(Element element, CmsDomUtil.Style... attributes) {

        if (m_elem == null) {
            // create playground
            m_elem = DOM.createDiv();
            Style style = m_elem.getStyle();
            style.setVisibility(Style.Visibility.HIDDEN);
            style.setPosition(Style.Position.ABSOLUTE);
            style.setLeft(-5000, Style.Unit.PX);
            style.setTop(-5000, Style.Unit.PX);
        }
        // copy all relevant CSS properties
        Style style = m_elem.getStyle();
        for (CmsDomUtil.Style attr : attributes) {
            String attrName = attr.toString();
            style.setProperty(attrName, CmsDomUtil.getCurrentStyle(element, attr));
        }
        // append playground
        RootPanel.getBodyElement().appendChild(m_elem);
    }
694273
public void updateButtonVisibilty(CmsInlineEntityWidget inlineWidget) {

        int minOccurrence = 0;
        int maxOccurrence = 0;
        if (isChoiceHandler()) {
            minOccurrence = 0;
            maxOccurrence = getEntityType().getChoiceMaxOccurrence();
        } else {
            minOccurrence = getEntityType().getAttributeMinOccurrence(m_attributeName);
            maxOccurrence = getEntityType().getAttributeMaxOccurrence(m_attributeName);
        }
        CmsEntityAttribute attribute = m_entity.getAttribute(m_attributeName);
        boolean mayHaveMore = (maxOccurrence > minOccurrence)
            && ((((attribute == null) && (!getAttributeType().isSimpleType() || (inlineWidget != null)))
                || ((attribute != null) && (attribute.getValueCount() < maxOccurrence))));
        boolean needsRemove = false;
        boolean needsSort = false;
        if ((isChoiceHandler() || !getEntityType().isChoice()) && m_entity.hasAttribute(m_attributeName)) {
            int valueCount = m_entity.getAttribute(m_attributeName).getValueCount();
            needsRemove = (maxOccurrence > minOccurrence) && (valueCount > minOccurrence);
            needsSort = !isSingleValueHandler() && (valueCount > 1);
        }
        if (inlineWidget != null) {
            boolean mayEdit = (attribute != null) && (attribute.getValueCount() > inlineWidget.getAttributeIndex());
            inlineWidget.updateButtonVisibility(mayEdit, mayHaveMore, needsRemove, needsSort);
        } else {
            for (CmsAttributeValueView value : m_attributeValueViews) {
                value.updateButtonVisibility(mayHaveMore, needsRemove, needsSort);
            }
        }
    }
694035
public void setStyle(String style) {
		if (this.style == UNDEFINED)
			this.style = NORMAL;
		this.style |= getStyleValue(style);
	}
1078573
function (node, styles, component) {
	    if (false) {
	      ReactInstrumentation.debugTool.onHostOperation({
	        instanceID: component._debugID,
	        type: 'update styles',
	        payload: styles
	      });
	    }
	
	    var style = node.style;
	    for (var styleName in styles) {
	      if (!styles.hasOwnProperty(styleName)) {
	        continue;
	      }
	      if (false) {
	        warnValidStyle(styleName, styles[styleName], component);
	      }
	      var styleValue = dangerousStyleValue(styleName, styles[styleName], component);
	      if (styleName === 'float' || styleName === 'cssFloat') {
	        styleName = styleFloatAccessor;
	      }
	      if (styleValue) {
	        style[styleName] = styleValue;
	      } else {
	        var expansion = hasShorthandPropertyBug && CSSProperty.shorthandPropertyExpansions[styleName];
	        if (expansion) {
	          // Shorthand property that IE8 won't like unsetting, so unset each
	          // component to placate it
	          for (var individualStyleName in expansion) {
	            style[individualStyleName] = '';
	          }
	        } else {
	          style[styleName] = '';
	        }
	      }
	    }
	  }
1073069
public static void toggleButton(Button button) {

        if (isButtonPressed(button)) {
            button.removeStyleName(OpenCmsTheme.BUTTON_PRESSED);
        } else {
            button.addStyleName(OpenCmsTheme.BUTTON_PRESSED);
        }
    }
200360
@Override
  protected void updateStyle(PseudoClass pseudo, boolean newValue) {
    if (node != null) {
      node.pseudoClassStateChanged(pseudo, newValue);
    }
    if (fieldLabel != null) {
      fieldLabel.pseudoClassStateChanged(pseudo, newValue);
    }
  }
142699
function () {
        if (this._btnElement.checked) {
            u.addClass(this.element, this._CssClasses.IS_CHECKED);
        } else {
            u.removeClass(this.element, this._CssClasses.IS_CHECKED);
        }
    }
30177
public void setGhostStyleEnabled(boolean enabled) {

        String styleName = I_CmsInputLayoutBundle.INSTANCE.inputCss().textAreaGhostMode();
        if (enabled) {
            addStyleName(styleName);
        } else {
            removeStyleName(styleName);
        }
    }
5528
public void setChanged(boolean changed) {

        m_changedStyleVar.setValue(
            changed
            ? I_CmsToolbarButtonLayoutBundle.INSTANCE.toolbarButtonCss().elementInfoChanged()
            : I_CmsToolbarButtonLayoutBundle.INSTANCE.toolbarButtonCss().elementInfoUnchanged());
    }
1220542
private void initStyleGenerators() {

        if (m_model.hasMasterMode()) {
            m_styleGenerators.put(
                CmsMessageBundleEditorTypes.EditMode.MASTER,
                new CmsMessageBundleEditorTypes.TranslateTableCellStyleGenerator(
                    m_model.getEditableColumns(CmsMessageBundleEditorTypes.EditMode.MASTER)));
        }
        m_styleGenerators.put(
            CmsMessageBundleEditorTypes.EditMode.DEFAULT,
            new CmsMessageBundleEditorTypes.TranslateTableCellStyleGenerator(
                m_model.getEditableColumns(CmsMessageBundleEditorTypes.EditMode.DEFAULT)));

    }
495576
public final void setStyle(@NonNull final Style style) {
        Condition.INSTANCE.ensureNotNull(style, "The style may not be null");
        this.style = style;
        this.rawItems = null;
        notifyDataSetChanged();
    }
430680
public void mark() {
    // ensure it's not marked yet - so a control doesn't contain the same styleClass multiple times
    if (!marked) {
      preferencesGroup.getRenderer().addStyleClass(MARKED_STYLE_CLASS);
      preferencesGroup.getRenderer().getTitleLabel().setOnMouseExited(unmarker);
      marked = !marked;
    }
  }
414828
protected void updateLabelActiveStyle() {
        if (this.valueBoxBase.getText() != null && !this.valueBoxBase.getText().isEmpty()) {
            label.addStyleName(CssName.ACTIVE);
        } else {
            label.removeStyleName(CssName.ACTIVE);
        }
    }