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

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

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

origin: com.helger/ph-oton-bootstrap4

 public final void applyBasicHTMLTo (@Nonnull final IHCElement <?> aTarget)
 {
  if (hasID ())
   aTarget.setID (getID ());

  if (m_aCSSClasses != null)
   aTarget.addClasses (m_aCSSClasses.getAllClasses ());

  if (m_aCSSStyles != null)
   aTarget.addStyles (m_aCSSStyles.getAllStyleValues ());
 }
}
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-bootstrap3

@Nonnull
public <T extends IHCElement <?>> T applyToNode (@Nonnull final T aElement)
{
 aElement.addClasses (CBootstrapCSS.GLYPHICON, m_aCSSClass);
 aElement.customAttrs ().setAriaHidden (true);
 return aElement;
}
origin: com.helger/ph-oton-core

/**
 * Register a state for the passed HC element, using the internal ID of the
 * element.
 *
 * @param aNewElement
 *        The element to be added to the registry. May not be
 *        <code>null</code>.
 * @return Never <code>null</code>.
 */
@Nonnull
public EChange registerState (@Nonnull final IHCElement <?> aNewElement)
{
 ValueEnforcer.notNull (aNewElement, "NewElement");
 if (aNewElement.hasNoID ())
  LOGGER.warn ("Registering the state for an object that has no ID - creating a new ID now!");
 return registerState (aNewElement.ensureID ().getID (), aNewElement);
}
origin: com.helger/ph-oton-icon

@Nonnull
public <T extends IHCElement <?>> T applyToNode (@Nonnull final T aElement)
{
 if (m_bIsBrand)
  aElement.addClasses (CFontAwesome5CSS.FAB, m_aCSSClass);
 else
  aElement.addClasses (CFontAwesome5CSS.FA, m_aCSSClass);
 return aElement;
}
origin: com.helger/ph-oton-uictrls

m_aUploader.setButtonElementID (m_aButton.ensureID ().getID ());
origin: com.helger/ph-oton-bootstrap4

public static void connectFormControlWithLabel (@Nullable final IHCElement <?> aCtrl,
                        @Nullable final HCFormLabel aLabel)
{
 // Set "aria-labelledby"
 if (aCtrl != null && aLabel != null)
 {
  aLabel.setFor (aCtrl);
  aCtrl.customAttrs ().setAriaLabeledBy (aLabel);
 }
}
origin: com.helger/ph-oton-jscode

 @Override
 public void customizeNode (@Nonnull final IHCNode aNode,
               @Nonnull final EHTMLVersion eHTMLVersion,
               @Nonnull final IHCHasChildrenMutable <?, ? super IHCNode> aTargetNode)
 {
  if (aNode instanceof IHCElement && !(aNode instanceof IHCScript <?>))
  {
   final JSEventMap aEventMap = ((IHCElement <?>) aNode).getEventMap ();
   if (aEventMap != null)
    for (final Map.Entry <EJSEvent, CollectingJSCodeProvider> aEntry : aEventMap.getAllEventHandler ().entrySet ())
    {
     // "ag" for "automatically generated"
     final JSFunction aFunc = new JSFunction ("_photon_ag" + GlobalIDFactory.getNewIntID ());
     aFunc.body ().add (aEntry.getValue ());
     aTargetNode.addChild (new HCScriptInline (aFunc));
     aEventMap.setHandler (aEntry.getKey (), aFunc.invoke ());
    }
  }
 }
}
origin: com.helger/ph-oton-icon

@Nonnull
public <T extends IHCElement <?>> T applyToNode (@Nonnull final T aElement)
{
 aElement.addClasses (CMaterialDesignCSS.MATERIAL_ICONS, m_aCSSClass);
 return aElement;
}
origin: com.helger/ph-oton-uictrls

m_aUploader.setButtonElementID (m_aButton.ensureID ().getID ());
origin: com.helger/ph-oton-bootstrap4

public static void connectFormControlsWithLabel (@Nullable final Iterable <? extends IHCElement <?>> aCtrls,
                         @Nullable final HCFormLabel aLabel)
{
 // Set "aria-labelledby"
 if (aCtrls != null && aLabel != null)
 {
  boolean bSetLabel = false;
  for (final IHCElement <?> aCurCtrl : aCtrls)
  {
   if (!bSetLabel)
   {
    aLabel.setFor (aCurCtrl);
    bSetLabel = true;
   }
   aCurCtrl.customAttrs ().setAriaLabeledBy (aLabel);
  }
 }
}
origin: com.helger/ph-html-jscode

 @Override
 public void customizeNode (@Nonnull final IHCNode aNode,
               @Nonnull final EHTMLVersion eHTMLVersion,
               @Nonnull final IHCHasChildrenMutable <?, ? super IHCNode> aTargetNode)
 {
  if (aNode instanceof IHCElement && !(aNode instanceof IHCScript <?>))
  {
   final JSEventMap aEventMap = ((IHCElement <?>) aNode).getEventMap ();
   if (aEventMap != null)
    for (final Map.Entry <EJSEvent, CollectingJSCodeProvider> aEntry : aEventMap.getAllEventHandler ().entrySet ())
    {
     // "ag" for "automatically generated"
     final JSFunction aFunc = new JSFunction ("_photon_ag" + GlobalIDFactory.getNewIntID ());
     aFunc.body ().add (aEntry.getValue ());
     aTargetNode.addChild (new HCScriptInline (aFunc));
     aEventMap.setHandler (aEntry.getKey (), aFunc.invoke ());
    }
  }
 }
}
origin: com.helger/ph-oton-bootstrap3

 public final void applyBasicHTMLTo (@Nonnull final IHCElement <?> aTarget)
 {
  if (hasID ())
   aTarget.setID (getID ());

  if (m_aCSSClasses != null)
   aTarget.addClasses (m_aCSSClasses.getAllClasses ());

  if (m_aCSSStyles != null)
   aTarget.addStyles (m_aCSSStyles.getAllStyleValues ());
 }
}
origin: com.helger/ph-oton-uictrls

@Nonnull
public <T extends IHCElement <?>> T applyToNode (@Nonnull final T aElement)
{
 aElement.addClasses (CSS_CLASS_ICON_FAMFAM, this);
 return aElement;
}
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-icon

@Nonnull
public <T extends IHCElement <?>> T applyToNode (@Nonnull final T aElement)
{
 aElement.addClasses (CFontAwesome4CSS.FA, m_aCSSClass);
 return aElement;
}
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-bootstrap3

public void applyPullTo (@Nonnull final IHCElement <?> aElement)
{
 ValueEnforcer.notNull (aElement, "Element");
 aElement.addClasses (m_eXS == null ? null : m_eXS.getCSSClassPull (),
            m_eSM == null ? null : m_eSM.getCSSClassPull (),
            m_eMD == null ? null : m_eMD.getCSSClassPull (),
            m_eLG == null ? null : m_eLG.getCSSClassPull ());
}
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

public void applyPushTo (@Nonnull final IHCElement <?> aElement)
{
 ValueEnforcer.notNull (aElement, "Element");
 aElement.addClasses (m_eXS == null ? null : m_eXS.getCSSClassPush (),
            m_eSM == null ? null : m_eSM.getCSSClassPush (),
            m_eMD == null ? null : m_eMD.getCSSClassPush (),
            m_eLG == null ? null : m_eLG.getCSSClassPush ());
}
com.helger.html.hc.htmlIHCElement

Javadoc

Base interface for an HC element

Most used methods

  • addClasses
  • addClass
  • addStyles
  • customAttrs
  • ensureID
  • getEventMap
  • getID
  • setID
  • getElement
  • getTagName
  • hasNoID
  • setCustomAttr
    Set a custom attribute that is serialized as is.
  • hasNoID,
  • setCustomAttr,
  • setTranslate

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • setScale (BigDecimal)
  • getApplicationContext (Context)
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • JCheckBox (javax.swing)
  • Top PhpStorm plugins
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