/** * Constructs a new blank Style tag */ public Style() { super(ComponentTypes.Style); addAttribute(StyleAttributes.Type, "text/css"); }
/** * Returns the raw CSS Data (getText shortcut) * <p> * * @return The generated css */ public String getCSS() { return getText(0).toString(); }
/** * Sets the raw CSS Data * <p> * * @param cssString * The css String (raw txt) */ public void setCSS(String cssString) { setText(cssString); }
/** * Method getCss returns the CSS for the page * * @param page * of type Page * * @return Style<? * , * ?> */ private Style<?, ?> getCss(Page page) { CSSComposer comp = new CSSComposer(); comp.addComponent(page, true); String generated = comp.toString(); StringBuilder css = page.getBody() .renderCss(0) .append(generated); if (css.toString() .isEmpty()) { return null; } Style<?, ?> style = new Style(); style.setText(css); return style; }
/** * Method getCss returns the CSS for the page * * @param page * of type Page * * @return Style<? * , * ?> */ private Style<?, ?> getCss(Page page) { CSSComposer comp = new CSSComposer(); comp.addComponent(page, true); String generated = comp.toString(); StringBuilder css = page.getBody() .renderCss(0) .append(generated); if (css.toString() .isEmpty()) { return null; } Style<?, ?> style = new Style(); style.setText(css); return style; }
/** * Method getCss returns the CSS for the page * * @param page * of type Page * * @return Style<? * , * ?> */ private Style<?, ?> getCss(Page page) { CSSComposer comp = new CSSComposer(); comp.addComponent(page, true); String generated = comp.toString(); StringBuilder css = page.getBody() .renderCss(0) .append(generated); if (css.toString() .isEmpty()) { return null; } Style<?, ?> style = new Style(); style.setText(css); return style; }
/** * @see com.jwebmp.core.base.ComponentHierarchyBase#hashCode() */ @Override public int hashCode() { return getText(0).hashCode(); }
/** * Constructs a new blank Style tag */ public Style() { super(ComponentTypes.Style); addAttribute(StyleAttributes.Type, "text/css"); }
/** * Sets the raw CSS Data * <p> * * @param cssString * The css String (raw txt) */ public void setCSS(String cssString) { setText(cssString); }
/** * @see com.jwebmp.core.base.ComponentHierarchyBase#hashCode() */ @Override public int hashCode() { return getText(0).hashCode(); }
/** * Constructs a new blank Style tag */ public Style() { super(ComponentTypes.Style); addAttribute(StyleAttributes.Type, "text/css"); }
/** * Sets the raw CSS Data * <p> * * @param cssString * The css String (raw txt) */ public void setCSS(String cssString) { setText(cssString); }
/** * Returns the raw CSS Data (getText shortcut) * <p> * * @return The generated css */ public String getCSS() { return getText(0).toString(); }
/** * @see com.jwebmp.core.base.ComponentHierarchyBase#hashCode() */ @Override public int hashCode() { return getText(0).hashCode(); }
/** * Returns the raw CSS Data (getText shortcut) * <p> * * @return The generated css */ public String getCSS() { return getText(0).toString(); }