Examples of UIFlowLayout


Examples of org.apache.myfaces.tobago.component.UIFlowLayout

public class FlowLayoutRenderer extends RendererBase implements SpacingValues, MarginValues {

  @Override
  public void encodeBegin(FacesContext facesContext, UIComponent component) throws IOException {
    TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
    UIFlowLayout layout = (UIFlowLayout) component;
    writer.startElement(HtmlElements.DIV, layout);
    writer.writeClassAttribute(Classes.create(layout));
    Style style = new Style();
    style.setMarginLeft(getMarginLeft(facesContext, layout));
    style.setMarginRight(getMarginRight(facesContext, layout));
    style.setMarginTop(getMarginTop(facesContext, layout));
    style.setMarginBottom(getMarginBottom(facesContext, layout));
    style.setTextAlign(layout.getTextAlign());
    writer.writeStyleAttribute(style);
  }
View Full Code Here

Examples of org.apache.myfaces.tobago.component.UIFlowLayout

    TextAlignMapper(TagAttribute attribute) {
      this.attribute = attribute;
    }

    public void applyMetadata(FaceletContext ctx, Object instance) {
      UIFlowLayout gridLayout = (UIFlowLayout) instance;
      gridLayout.setTextAlign(TextAlign.parse(attribute.getValue()));
    }
View Full Code Here

Examples of org.apache.myfaces.tobago.component.UIFlowLayout

    MarginLeftMapper(TagAttribute attribute) {
      this.attribute = attribute;
    }

    public void applyMetadata(FaceletContext ctx, Object instance) {
      UIFlowLayout gridLayout = (UIFlowLayout) instance;
      gridLayout.setMarginLeft(Measure.valueOf(attribute.getValue()));
    }
View Full Code Here

Examples of org.apache.myfaces.tobago.component.UIFlowLayout

    MarginTopMapper(TagAttribute attribute) {
      this.attribute = attribute;
    }

    public void applyMetadata(FaceletContext ctx, Object instance) {
      UIFlowLayout gridLayout = (UIFlowLayout) instance;
      gridLayout.setMarginTop(Measure.valueOf(attribute.getValue()));
    }
View Full Code Here

Examples of org.apache.myfaces.tobago.component.UIFlowLayout

    MarginRightMapper(TagAttribute attribute) {
      this.attribute = attribute;
    }

    public void applyMetadata(FaceletContext ctx, Object instance) {
      UIFlowLayout gridLayout = (UIFlowLayout) instance;
      gridLayout.setMarginRight(Measure.valueOf(attribute.getValue()));
    }
View Full Code Here

Examples of org.apache.myfaces.tobago.component.UIFlowLayout

    MarginBottomMapper(TagAttribute attribute) {
      this.attribute = attribute;
    }

    public void applyMetadata(FaceletContext ctx, Object instance) {
      UIFlowLayout gridLayout = (UIFlowLayout) instance;
      gridLayout.setMarginBottom(Measure.valueOf(attribute.getValue()));
    }
View Full Code Here

Examples of org.apache.myfaces.tobago.component.UIFlowLayout

    MarginMapper(TagAttribute attribute) {
      this.attribute = attribute;
    }

    public void applyMetadata(FaceletContext ctx, Object instance) {
      UIFlowLayout gridLayout = (UIFlowLayout) instance;
      gridLayout.setMargin(Measure.valueOf(attribute.getValue()));
    }
View Full Code Here

Examples of org.apache.myfaces.tobago.component.UIFlowLayout

  }

  @Override
  protected void setProperties(final UIComponent uiComponent) {
    super.setProperties(uiComponent);
    final UIFlowLayout component = (UIFlowLayout) uiComponent;
    final FacesContext context = FacesContext.getCurrentInstance();
    final Application application = context.getApplication();
    if (marginBottom != null) {
      if (!marginBottom.isLiteralText()) {
        component.setValueExpression("marginBottom", marginBottom);
      } else {
        component.setMarginBottom(org.apache.myfaces.tobago.layout.Measure.valueOf(marginBottom.getExpressionString()));
      }
    }
    if (markup != null) {
      if (!markup.isLiteralText()) {
        component.setValueExpression("markup", markup);
      } else {
        component.setMarkup(org.apache.myfaces.tobago.context.Markup.valueOf(markup.getExpressionString()));
      }
    }
    if (marginTop != null) {
      if (!marginTop.isLiteralText()) {
        component.setValueExpression("marginTop", marginTop);
      } else {
        component.setMarginTop(org.apache.myfaces.tobago.layout.Measure.valueOf(marginTop.getExpressionString()));
      }
    }
    if (marginLeft != null) {
      if (!marginLeft.isLiteralText()) {
        component.setValueExpression("marginLeft", marginLeft);
      } else {
        component.setMarginLeft(org.apache.myfaces.tobago.layout.Measure.valueOf(marginLeft.getExpressionString()));
      }
    }
    if (marginRight != null) {
      if (!marginRight.isLiteralText()) {
        component.setValueExpression("marginRight", marginRight);
      } else {
        component.setMarginRight(org.apache.myfaces.tobago.layout.Measure.valueOf(marginRight.getExpressionString()));
      }
    }
    if (textAlign != null) {
      if (!textAlign.isLiteralText()) {
        component.setValueExpression("textAlign", textAlign);
      } else {
        component.setTextAlign(org.apache.myfaces.tobago.layout.TextAlign.parse(textAlign.getExpressionString()));
      }
    }
    if (margin != null) {
      if (!margin.isLiteralText()) {
        component.setValueExpression("margin", margin);
      } else {
        component.setMargin(org.apache.myfaces.tobago.layout.Measure.valueOf(margin.getExpressionString()));
      }
    }
  }
View Full Code Here

Examples of org.apache.myfaces.tobago.component.UIFlowLayout

    TextAlignMapper(TagAttribute attribute) {
      this.attribute = attribute;
    }

    public void applyMetadata(FaceletContext ctx, Object instance) {
      UIFlowLayout gridLayout = (UIFlowLayout) instance;
      gridLayout.setTextAlign(TextAlign.parse(attribute.getValue()));
    }
View Full Code Here

Examples of org.apache.myfaces.tobago.component.UIFlowLayout

    MarginLeftMapper(TagAttribute attribute) {
      this.attribute = attribute;
    }

    public void applyMetadata(FaceletContext ctx, Object instance) {
      UIFlowLayout gridLayout = (UIFlowLayout) instance;
      gridLayout.setMarginLeft(Measure.valueOf(attribute.getValue()));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.