@Nullable public IHCElement <?> getIconAsNode () { return m_eIcon == null ? null : m_eIcon.getAsNode ().addClass (CBootstrapCSS.FORM_CONTROL_FEEDBACK); } }
public BootstrapCaret () { addChildren (new HCTextNode (" "), new HCSpan ().addClass (CBootstrapCSS.CARET)); } }
@Nonnull public static HCSpan createEmptyAction () { return new HCSpan ().addClass (CSS_CLASS_EMPTY_ACTION) .addStyle (CCSSProperties.DISPLAY_INLINE_BLOCK) .addStyle (CCSSProperties.WIDTH.newValue (ECSSUnit.px (16))); }
@Nullable public IHCNode build () { if (m_aPrefixes.isEmpty () && m_aSuffixes.isEmpty ()) return m_aInput; final HCDiv aInputGroup = new HCDiv ().addClasses (CBootstrapCSS.INPUT_GROUP, m_eSize); for (final IHCNode aPrefix : m_aPrefixes) { if (aPrefix instanceof BootstrapButton) aInputGroup.addChild (new HCSpan ().addClass (CBootstrapCSS.INPUT_GROUP_BTN).addChild (aPrefix)); else aInputGroup.addChild (new HCSpan ().addClass (CBootstrapCSS.INPUT_GROUP_ADDON).addChild (aPrefix)); } aInputGroup.addChild (m_aInput); for (final IHCNode aSuffix : m_aSuffixes) { if (aSuffix instanceof BootstrapButton) aInputGroup.addChild (new HCSpan ().addClass (CBootstrapCSS.INPUT_GROUP_BTN).addChild (aSuffix)); else aInputGroup.addChild (new HCSpan ().addClass (CBootstrapCSS.INPUT_GROUP_ADDON).addChild (aSuffix)); } return aInputGroup; } }
public BootstrapNavbar (@Nonnull final EBootstrapNavbarType eType, final boolean bCollapsible, @Nonnull final Locale aDisplayLocale) { addClasses (CBootstrapCSS.NAVBAR, CBootstrapCSS.NAVBAR_DEFAULT, eType); setRole (EHTMLRole.NAVIGATION); m_aContainer = addAndReturnChild (new BootstrapContainer ()); m_aHeader = m_aContainer.addAndReturnChild (new BootstrapNavbarHeader ()); // Create the main container m_aContent = m_aContainer.addAndReturnChild (new HCDiv ()); if (bCollapsible) { // Create a per-instance class for collapsing final String sCollapseTarget = "navbar" + GlobalIDFactory.getNewIntID (); // Responsive toggle final HCButton aToggle = m_aHeader.addAndReturnChild (new HCButton ()); aToggle.addClass (CBootstrapCSS.NAVBAR_TOGGLE); aToggle.setDataAttr ("toggle", "collapse"); aToggle.setDataAttr ("target", "#" + sCollapseTarget); aToggle.addChild (new HCSpan ().addClass (CBootstrapCSS.SR_ONLY) .addChild (EBootstrapText.TOOGLE_NAVIGATION.getDisplayText (aDisplayLocale))); aToggle.addChild (new HCSpan ().addClass (CBootstrapCSS.ICON_BAR)); aToggle.addChild (new HCSpan ().addClass (CBootstrapCSS.ICON_BAR)); aToggle.addChild (new HCSpan ().addClass (CBootstrapCSS.ICON_BAR)); m_aContent.addClasses (CBootstrapCSS.COLLAPSE, CBootstrapCSS.NAVBAR_COLLAPSE).setID (sCollapseTarget); } }
@Nonnull public HCNodeList build () { registerExternalResources (m_eLanguage); // Create control final BootstrapInputGroup aBIG = new BootstrapInputGroup (m_aEdit); for (final IHCNode aPrefix : m_aPrefixes) aBIG.addPrefix (aPrefix); for (final IHCNode aSuffix : m_aSuffixes) aBIG.addSuffix (aSuffix); if (m_bShowResetButton) aBIG.addSuffix (EBootstrapIcon.REMOVE.getAsNode ()); // It's either a div or an edit IHCElement <?> aCtrl = (IHCElement <?>) aBIG.build (); if (aCtrl == m_aEdit) { // No input group created - wrap in dummy span aCtrl = new HCSpan ().setID (m_sContainerID).addClass (CSS_CLASS_DATE).addChild (aCtrl); } else aCtrl.setID (m_sContainerID).addClass (CSS_CLASS_DATE); // Assemble return new HCNodeList ().addChild (aCtrl).addChild (new BootstrapDateTimePickerJS (this)); }
aRow.addCell (new HCSpan ().addChild (sProviderName).addClass (CSS_CLASS_NOWRAP)); aRow.addCell (aService.getType ()); aRow.addCell (aService.getAlgorithm ()); aRow.addCell (new HCSpan ().addChild (sProviderName).addClass (CSS_CLASS_NOWRAP)); aRow.addCell (aService.getType ()); aRow.addCell (aService.getAlgorithm ());