Tabnine Logo
IHCElement.addClass
Code IndexAdd Tabnine to your IDE (free)

How to use
addClass
method
in
com.helger.html.hc.html.IHCElement

Best Java code snippets using com.helger.html.hc.html.IHCElement.addClass (Showing top 12 results out of 315)

origin: com.helger/ph-oton-bootstrap3

@Nonnull
public BootstrapNavbar addButton (@Nonnull final EBootstrapNavbarPosition ePos, @Nonnull final IHCElement <?> aButton)
{
 aButton.addClass (CBootstrapCSS.NAVBAR_BTN);
 return _addNode (ePos, aButton);
}
origin: com.helger/ph-oton-bootstrap4

public static void applyFormControlValidityState (@Nullable final Iterable <? extends IHCElement <?>> aCtrls,
                         @Nullable final IErrorList aErrorList)
{
 if (aCtrls != null && aErrorList != null)
 {
  final boolean bIsInvalid = aErrorList.containsAtLeastOneError ();
  for (final IHCElement <?> aCurCtrl : aCtrls)
   if (bIsInvalid)
   {
    // Required so that error text is shown
    aCurCtrl.addClass (CBootstrapCSS.IS_INVALID);
   }
 }
}
origin: com.helger/ph-oton-bootstrap4

public static void applyFormControlValidityState (@Nullable final IHCElement <?> aElement,
                         @Nullable final IErrorList aErrorList)
{
 ValueEnforcer.notNull (aElement, "Element");
 if (aErrorList != null)
  if (aErrorList.containsAtLeastOneError ())
  {
   // Required so that error text is shown
   aElement.addClass (CBootstrapCSS.IS_INVALID);
  }
}
origin: com.helger/ph-oton-icon

@Nonnull
public static HCSpan createIconStack (@Nonnull final IHCElement <?> aLargeIcon,
                   @Nonnull final IHCElement <?> aSmallIcon)
{
 final HCSpan ret = new HCSpan ().addClasses (CFontAwesome5CSS.FA_STACK, CFontAwesome5CSS.FA_LG);
 ret.addChild (aLargeIcon.addClass (CFontAwesome5CSS.FA_STACK_2X));
 ret.addChild (aSmallIcon.addClass (CFontAwesome5CSS.FA_STACK_1X));
 return ret;
}
origin: com.helger/ph-oton-icon

@Nonnull
public static HCSpan createIconStack (@Nonnull final IHCElement <?> aLargeIcon,
                   @Nonnull final IHCElement <?> aSmallIcon)
{
 final HCSpan ret = new HCSpan ().addClasses (CFontAwesome4CSS.FA_STACK, CFontAwesome4CSS.FA_LG);
 ret.addChild (aLargeIcon.addClass (CFontAwesome4CSS.FA_STACK_2X));
 ret.addChild (aSmallIcon.addClass (CFontAwesome4CSS.FA_STACK_1X));
 return ret;
}
origin: com.helger/ph-oton-bootstrap3

@Nonnull
private BootstrapNavbar _addNode (@Nonnull final EBootstrapNavbarPosition ePos, @Nullable final IHCElement <?> aNode)
{
 if (aNode != null)
  aNode.addClass (ePos);
 if (ePos.isFixed ())
  m_aHeader.addChild (aNode);
 else
  m_aContent.addChild (aNode);
 return this;
}
origin: com.helger/ph-oton-bootstrap3

 public static void makeFormControlStatic (@Nullable final IHCNode aNode)
 {
  if (aNode != null)
  {
   if (aNode instanceof IHCElement <?>)
   {
    if (!(aNode instanceof IHCControl <?>) && !(aNode instanceof IHCScript <?>))
     ((IHCElement <?>) aNode).addClass (CBootstrapCSS.FORM_CONTROL_STATIC);
   }
   else
   {
    // Descend only in non-elements - e.g. HCNodeList
    aNode.forAllChildren (aChild -> makeFormControlStatic (aChild));
   }
  }
 }
}
origin: com.helger/ph-oton-bootstrap3

public void applyTo (@Nonnull final IHCElement <?> aElement)
{
 ValueEnforcer.notNull (aElement, "Element");
 int nLastPartCount = -1;
 if (m_eXS != null)
 {
  aElement.addClass (m_eXS);
  nLastPartCount = m_eXS.getParts ();
 }
 // Apply only if different from the previous part count
 if (m_eSM != null && m_eSM.getParts () != nLastPartCount)
 {
  aElement.addClass (m_eSM);
  nLastPartCount = m_eSM.getParts ();
 }
 if (m_eMD != null && m_eMD.getParts () != nLastPartCount)
 {
  aElement.addClass (m_eMD);
  nLastPartCount = m_eMD.getParts ();
 }
 if (m_eLG != null && m_eLG.getParts () != nLastPartCount)
 {
  aElement.addClass (m_eLG);
  nLastPartCount = m_eLG.getParts ();
 }
}
origin: com.helger/ph-oton-bootstrap4

if (m_eXS != null)
 aElement.addClass (m_eXS);
 nLastPartCount = m_eXS.getParts ();
 aElement.addClass (m_eSM);
 nLastPartCount = m_eSM.getParts ();
 aElement.addClass (m_eMD);
 nLastPartCount = m_eMD.getParts ();
 aElement.addClass (m_eLG);
 nLastPartCount = m_eLG.getParts ();
 aElement.addClass (m_eXL);
 nLastPartCount = m_eXL.getParts ();
origin: com.helger/ph-oton-bootstrap4

if (m_eXS != null && m_eXS.getParts () > 0)
 aElement.addClass (m_eXS.getCSSClassOffset ());
 nLastPartCount = m_eXS.getParts ();
 aElement.addClass (m_eSM.getCSSClassOffset ());
 nLastPartCount = m_eSM.getParts ();
 aElement.addClass (m_eMD.getCSSClassOffset ());
 nLastPartCount = m_eMD.getParts ();
 aElement.addClass (m_eLG.getCSSClassOffset ());
 nLastPartCount = m_eLG.getParts ();
 aElement.addClass (m_eXL.getCSSClassOffset ());
 nLastPartCount = m_eXL.getParts ();
origin: com.helger/ph-oton-bootstrap4

 aErrorNode.addClass (CBootstrapCSS.D_BLOCK);
aHelpTextNode.addClass (CBootstrapCSS.SR_ONLY);
origin: com.helger/ph-oton-bootstrap3

aHelpTextNode.addClass (CBootstrapCSS.SR_ONLY);
com.helger.html.hc.htmlIHCElementaddClass

Popular methods of IHCElement

  • addClasses
  • addStyles
  • customAttrs
  • ensureID
  • getEventMap
  • getID
  • setID
  • getElement
  • getTagName
  • hasNoID
  • setCustomAttr
    Set a custom attribute that is serialized as is.
  • setTranslate
    Set the value of the HTML translate attribute.
  • setCustomAttr,
  • setTranslate

Popular in Java

  • Running tasks concurrently on multiple threads
  • getResourceAsStream (ClassLoader)
  • setScale (BigDecimal)
  • getSharedPreferences (Context)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now