Adds a CSS class to a component in the view tree. The class is appended
to the styleClass value.

@param c
the component
@param aclass
the CSS class to be added
505136
protected static void addClass2Component(UIComponent c, String aclass) {
		Map<String, Object> a = c.getAttributes();
		if (a.containsKey("styleClass")) {
			a.put("styleClass", a.get("styleClass") + " " + aclass);
		} else {
			a.put("styleClass", aclass);
		}
	}
1287230
public static void setCSSClass(Element e, String cssclass) {
    setAtt(e, SVGConstants.SVG_CLASS_ATTRIBUTE, cssclass);
  }
217701
function(viewClass) {
      var t = this,
          newIdNum = 1,
          components = t.get('components'),
          classParts = viewClass.split('.'),
          appName = classParts[0],
          appView = classParts[1];

      // Instantiate and add the component
      var component = new Component({
        id: Monitor.generateUniqueCollectionId(components, 'c'),
        viewClass: viewClass,
        viewOptions: UI.app[appName][appView].prototype.defaultOptions,
        css: {
          '.nm-cv': 'top:10px;'
        }
      });
      components.add(component);
      return component;
    }
466125
private static void setupCSSClasses(Object owner, CSSClassManager manager, StyleLibrary style) throws CSSNamingConflict {
    if(!manager.contains(CSS_AXIS)) {
      CSSClass axis = new CSSClass(owner, CSS_AXIS);
      axis.setStatement(SVGConstants.CSS_STROKE_PROPERTY, style.getColor(StyleLibrary.AXIS));
      axis.setStatement(SVGConstants.CSS_STROKE_WIDTH_PROPERTY, style.getLineWidth(StyleLibrary.AXIS));
      manager.addClass(axis);
    }
    if(!manager.contains(CSS_AXIS_TICK)) {
      CSSClass tick = new CSSClass(owner, CSS_AXIS_TICK);
      tick.setStatement(SVGConstants.CSS_STROKE_PROPERTY, style.getColor(StyleLibrary.AXIS_TICK));
      tick.setStatement(SVGConstants.CSS_STROKE_WIDTH_PROPERTY, style.getLineWidth(StyleLibrary.AXIS_TICK));
      manager.addClass(tick);
    }
    if(!manager.contains(CSS_AXIS_LABEL)) {
      CSSClass label = new CSSClass(owner, CSS_AXIS_LABEL);
      label.setStatement(SVGConstants.CSS_FILL_PROPERTY, style.getTextColor(StyleLibrary.AXIS_LABEL));
      label.setStatement(SVGConstants.CSS_FONT_FAMILY_PROPERTY, style.getFontFamily(StyleLibrary.AXIS_LABEL));
      label.setStatement(SVGConstants.CSS_FONT_SIZE_PROPERTY, style.getTextSize(StyleLibrary.AXIS_LABEL));
      manager.addClass(label);
    }
  }
895940
public static void addClass2FacetComponent(UIComponent f, String cname, String aclass) {
		// If the facet contains only one component, getChildCount()=0 and the
		// Facet is the UIComponent
		if (f.getClass().getName().endsWith(cname)) {
			addClass2Component(f, aclass);
		} else {
			if (f.getChildCount() > 0) {
				for (UIComponent c : f.getChildren()) {
					if (c.getClass().getName().endsWith(cname)) {
						addClass2Component(c, aclass);
					}
				}
			}
		}
	}
684786
private boolean classExists(Class<?> aClass) {
		if(xmlJmapper.classes == null)return false;
		return findXmlClass(aClass) !=null?true:false;
	}
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);
        }
    }
1136064
public B css(String... classes) {
        if (classes != null) {
            List<String> failSafeClasses = new ArrayList<>();
            for (String c : classes) {
                if (c != null) {
                    if (c.contains(" ")) {
                        failSafeClasses.addAll(asList(c.split(" ")));
                    } else {
                        failSafeClasses.add(c);
                    }
                }
            }
            for (String failSafeClass : failSafeClasses) {
                get().classList.add(failSafeClass);
            }
        }
        return that();
    }
67980
private void updateStyle(JTextComponent c) {
        SeaGlassContext context  = getContext(c, ENABLED);
        SynthStyle      oldStyle = style;

        SynthStyle s = SeaGlassLookAndFeel.updateStyle(context, this);
        if (s instanceof SeaGlassStyle) {
            style = (SeaGlassStyle) s;

            updateSearchStyle(c, context, getPropertyPrefix());

            if (style != oldStyle) {
                updateStyle(c, context, getPropertyPrefix());

                if (oldStyle != null) {
                    uninstallKeyboardActions();
                    installKeyboardActions();
                }
            }
        }
        
        context.dispose();

        context   = getContext(c, SeaGlassRegion.SEARCH_FIELD_FIND_BUTTON, ENABLED);
        findStyle = SeaGlassLookAndFeel.updateStyle(context, this);
        context.dispose();

        context     = getContext(c, SeaGlassRegion.SEARCH_FIELD_CANCEL_BUTTON, ENABLED);
        cancelStyle = SeaGlassLookAndFeel.updateStyle(context, this);
        context.dispose();
    }
1215936
public void setStyleClass(java.lang.String styleClass) {
        getStateHelper().put(PropertyKeys.styleClass, styleClass);
    }
397716
public static function addCssClass(&$options, $class)
    {
        if (isset($options['class'])) {
            $classes = ' ' . $options['class'] . ' ';
            if (($pos = strpos($classes, ' ' . $class . ' ')) === false) {
                $options['class'] .= ' ' . $class;
            }
        } else {
            $options['class'] = $class;
        }
    }
441512
public void setColor(Color c) {
		boolean renderAgain = (c != m_color) && isRendered();
		m_color = c;
		if (renderAgain)
			render(g2d);
	}
1177835
function setClassName(element, cssClass) {
    cssClass = snippet.isArray(cssClass) ? cssClass.join(' ') : cssClass;

    cssClass = trim(cssClass);

    if (snippet.isUndefined(element.className.baseVal)) {
        element.className = cssClass;

        return;
    }

    element.className.baseVal = cssClass;
}
1220004
def addClass(self, cn):
        '''
        '''
        if cn:
            if isinstance(cn, (tuple, list, set, frozenset)):
                add = self.addClass
                for c in cn:
                    add(c)
            else:
                classes = self._classes
                if classes is None:
                    self._extra['classes'] = classes = set()
                add = classes.add
                for cn in cn.split():
                    add(slugify(cn))
        return self
1099697
@SuppressWarnings("unchecked")
  private <T> Node registerClass(final Class<T> c)
      throws ClassHierarchyException {
    if (c.isArray()) {
      throw new UnsupportedOperationException("Can't register array types");
    }
    try {
      return getAlreadyBoundNode(c);
    } catch (final NameResolutionException ignored) {
      // node not bound yet
    }

    final Node n = buildPathToNode(c);

    if (n instanceof ClassNode) {
      final ClassNode<T> cn = (ClassNode<T>) n;
      final Class<T> superclass = (Class<T>) c.getSuperclass();
      if (superclass != null) {
        try {
          ((ClassNode<T>) getAlreadyBoundNode(superclass)).putImpl(cn);
        } catch (final NameResolutionException e) {
          throw new IllegalStateException(e);
        }
      }
      for (final Class<?> interf : c.getInterfaces()) {
        try {
          ((ClassNode<T>) getAlreadyBoundNode(interf)).putImpl(cn);
        } catch (final NameResolutionException e) {
          throw new IllegalStateException(e);
        }
      }
    }
    return n;
  }
272141
function addClass(node, name) {
        if (hasClass(node, name)) {
            return;
        }
        if (node.classList) {
            node.classList.add(name);
        } else {
            node.className += " " + name;
        }
    }
977973
@Nonnull
    public BugInstance addClass(ClassNode classNode) {
        String dottedClassName = ClassName.toDottedClassName(classNode.name);
        ClassAnnotation classAnnotation = new ClassAnnotation(dottedClassName);
        add(classAnnotation);
        return this;
    }