/** * Additional class names can be added directly to content div for better custom styling. * The same idea as UiBinder's embedded addStyleNames functionality. * * <br> Example: * <pre><jqm:JQMPage contentAddStyleNames="aaa bbb ccc"/></pre> */ public void setContentAddStyleNames(String value) { if (value == null || value.isEmpty()) return; JQMCommon.addStyleNames(content, value); }
public HeadGroupsPanel(Element e, String addnlClasses) { super(e); if (addnlClasses != null && !addnlClasses.isEmpty()) { JQMCommon.addStyleNames(this, addnlClasses); } } }
/** * Additional class names can be added directly to content div for better custom styling. * The same idea as UiBinder's embedded addStyleNames functionality. * * <br> Example: * <pre><jqm:JQMPage contentAddStyleNames="aaa bbb ccc"/></pre> */ public void setContentAddStyleNames(String value) { if (value == null || value.isEmpty()) return; JQMCommon.addStyleNames(content, value); }
/** * Additional class names can be added directly to content div for better custom styling. * The same idea as UiBinder's embedded addStyleNames functionality. * * <br> Example: * <pre><jqm:JQMPage contentAddStyleNames="aaa bbb ccc"/></pre> */ public void setContentAddStyleNames(String value) { if (value == null || value.isEmpty()) return; JQMCommon.addStyleNames(content, value); }
public HeadGroupsPanel(Element e, String addnlClasses) { super(e); if (addnlClasses != null && !addnlClasses.isEmpty()) { JQMCommon.addStyleNames(this, addnlClasses); } } }
public HeadGroupsPanel(Element e, String addnlClasses) { super(e); if (addnlClasses != null && !addnlClasses.isEmpty()) { JQMCommon.addStyleNames(this, addnlClasses); } } }
public void setHeaderStyleNames(String value) { if (headerStyleNames == value || headerStyleNames != null && headerStyleNames.equals(value)) return; if (headingToggle != null) JQMCommon.removeStyleNames(headingToggle, headerStyleNames); headerStyleNames = value; if (headingToggle != null) JQMCommon.addStyleNames(headingToggle, headerStyleNames); }
public void setContentStyleNames(String value) { if (contentStyleNames == value || contentStyleNames != null && contentStyleNames.equals(value)) return; if (collapsibleContent != null) JQMCommon.removeStyleNames(collapsibleContent, contentStyleNames); contentStyleNames = value; if (collapsibleContent != null) JQMCommon.addStyleNames(collapsibleContent, contentStyleNames); }
/** * @param add - if false then colClassNames will be removed. */ protected void applyColClassNames(boolean add) { if (colClsNames == null || colClsNames.isEmpty()) return; ComplexPanel head = getHeadRow(); if (head != null) { forEachCol(head, (col, i) -> { String classes = calcColClassNames(i, true/*head*/); if (!Empty.is(classes)) { if (add) JQMCommon.addStyleNames(col, classes); else JQMCommon.removeStyleNames(col, classes); } }); } forEachRow((row, j) -> { forEachCol(row, (col, i) -> { String classes = calcColClassNames(i, false/*head*/); if (!Empty.is(classes)) { if (add) JQMCommon.addStyleNames(col, classes); else JQMCommon.removeStyleNames(col, classes); } }); }); }
private void findSubParts() { Boolean isInstance = null; if (headingToggle == null) { if (isInstance == null) isInstance = isInstance(getElement()); if (isInstance) { headingToggle = JQMCommon.findFirst(header.getElement(), ".ui-collapsible-heading-toggle.ui-btn"); if (headingToggle != null) { JQMCommon.setInlineEx(headingToggle, inline, JQMCommon.STYLE_UI_BTN_INLINE); JQMCommon.setIconNoDisc(headingToggle, iconNoDisc); JQMCommon.setIconAlt(headingToggle, iconAlt); JQMCommon.addStyleNames(headingToggle, headerStyleNames); } } } if (collapsibleContent == null) { if (isInstance == null) isInstance = isInstance(getElement()); if (isInstance) { collapsibleContent = JQMCommon.findFirst(getElement(), ".ui-collapsible-content"); if (collapsibleContent != null) JQMCommon.addStyleNames(collapsibleContent, contentStyleNames); } } }
protected ComplexPanel addToHead(String title, String priority, int index) { if (index < 0) return null; ComplexPanel col = getCol(getHeadRow(), index, true/*addTh*/); if (col == null) return null; setColPriority(col, priority); col.getElement().setInnerHTML(title); String classes = calcColClassNames(index, true/*head*/); if (!Empty.is(classes)) JQMCommon.addStyleNames(col, classes); applyImgOnly(col); return col; }
private void addBodyCell(ComplexPanel row, int colIdx, String cell, boolean addTh, Widget... widgets) { if (!addTh) addTh = isColCellTypeTh(colIdx); ComplexPanel c = getCol(row, colIdx, addTh); if (c == null) return; c.clear(); if (widgets != null && widgets.length > 0) { for (Widget w : widgets) c.add(w); } else { c.getElement().setInnerHTML(cell); } String classes = calcColClassNames(colIdx, false/*head*/); if (!Empty.is(classes)) JQMCommon.addStyleNames(c, classes); applyImgOnly(c); }
protected ComplexPanel addToHeadGroups(ColumnDef grp, int index) { if (grp == null || index < 0) return null; final int colspan = grp.getColspan(); final int rowspan = grp.getRowspan(); final boolean isTitleTh = isTh(grp.getTitle()); boolean addTh = colspan > 1 || rowspan > 1 || isTitleTh; ComplexPanel col = getCol(getHeadGroupsRow(), index, addTh); if (col == null) return null; setColPriority(col, grp.getPriority()); col.getElement().setInnerHTML(isTitleTh ? removeTh(grp.getTitle()) : grp.getTitle()); if (colspan > 1) JQMCommon.setAttribute(col, "colspan", String.valueOf(colspan)); if (rowspan > 1) JQMCommon.setAttribute(col, "rowspan", String.valueOf(rowspan)); String classes = calcColClassNames(index, true/*head*/); if (!Empty.is(classes)) JQMCommon.addStyleNames(col, classes); applyImgOnly(col); return col; }
/** * Add the given {@link Widget} into the next available cell. This call * will wrap to a new row if the existing row is already filled. * * The given widget will be wrapped inside a div with the appropriate * JQuery Mobile class name given (eg, "ui-block-a" for the first cell, * etc). This created div will have an automatically assigned id. * * @param addStyleNames - space separated additional style names for this particular cell * @return the widget that was created to wrap the given content */ @UiChild(tagname = "cell") public Widget add(Widget widget, String addStyleNames) { int size = getElement().getChildCount(); String klass = getCellStyleName(size); JQMTableCell cell = new JQMTableCell(); Element cellElt = cell.getElement(); cellElt.setId(Document.get().createUniqueId()); removeAllCellStyles(cellElt); cellElt.addClassName(klass); prepareCellPercentStyle(size, cell); if (addStyleNames != null && !addStyleNames.isEmpty()) { JQMCommon.addStyleNames(cell, addStyleNames); } cell.add(widget); flow.add(cell); JQMContext.render(cell.getElement().getId()); return cell; }
/** * Add the given {@link Widget} into the next available cell. This call * will wrap to a new row if the existing row is already filled. * * The given widget will be wrapped inside a div with the appropriate * JQuery Mobile class name given (eg, "ui-block-a" for the first cell, * etc). This created div will have an automatically assigned id. * * @param addStyleNames - space separated additional style names for this particular cell * @return the widget that was created to wrap the given content */ @UiChild(tagname = "cell") public Widget add(Widget widget, String addStyleNames) { int size = getElement().getChildCount(); String klass = getCellStyleName(size); JQMTableCell cell = new JQMTableCell(); Element cellElt = cell.getElement(); cellElt.setId(Document.get().createUniqueId()); removeAllCellStyles(cellElt); cellElt.addClassName(klass); prepareCellPercentStyle(size, cell); if (addStyleNames != null && !addStyleNames.isEmpty()) { JQMCommon.addStyleNames(cell, addStyleNames); } cell.add(widget); flow.add(cell); JQMContext.render(cell.getElement().getId()); return cell; }
/** * Add the given {@link Widget} into the next available cell. This call * will wrap to a new row if the existing row is already filled. * * The given widget will be wrapped inside a div with the appropriate * JQuery Mobile class name given (eg, "ui-block-a" for the first cell, * etc). This created div will have an automatically assigned id. * * @param addStyleNames - space separated additional style names for this particular cell * @return the widget that was created to wrap the given content */ @UiChild(tagname = "cell") public Widget add(Widget widget, String addStyleNames) { int size = getElement().getChildCount(); String klass = getCellStyleName(size); JQMTableCell cell = new JQMTableCell(); Element cellElt = cell.getElement(); cellElt.setId(Document.get().createUniqueId()); removeAllCellStyles(cellElt); cellElt.addClassName(klass); prepareCellPercentStyle(size, cell); if (addStyleNames != null && !addStyleNames.isEmpty()) { JQMCommon.addStyleNames(cell, addStyleNames); } cell.add(widget); flow.add(cell); JQMContext.render(cell.getElement().getId()); return cell; }
label.setStyleName(JQM4GWT_ERROR_LABEL_STYLENAME); if (globalValidationErrorStyles != null && !globalValidationErrorStyles.isEmpty()) { JQMCommon.addStyleNames(label, globalValidationErrorStyles);
label.setStyleName(JQM4GWT_ERROR_LABEL_STYLENAME); if (globalValidationErrorStyles != null && !globalValidationErrorStyles.isEmpty()) { JQMCommon.addStyleNames(label, globalValidationErrorStyles);
label.setStyleName(JQM4GWT_ERROR_LABEL_STYLENAME); if (globalValidationErrorStyles != null && !globalValidationErrorStyles.isEmpty()) { JQMCommon.addStyleNames(label, globalValidationErrorStyles);