Examples of UITreeIndent


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

public class TreeIndentRenderer extends LayoutComponentRendererBase {

  @Override
  public void encodeBegin(FacesContext facesContext, UIComponent component) throws IOException {

    final UITreeIndent indent = (UITreeIndent) component;
    final UITreeNode node = ComponentUtils.findAncestor(indent, UITreeNode.class);
    final AbstractUITree tree = ComponentUtils.findAncestor(indent, AbstractUITree.class);

    final boolean folder = node.isFolder();
    final int level = node.getLevel();
    final boolean hasNextSibling = node.isHasNextSibling();
    final List<Boolean> junctions = node.getJunctions();

    final boolean showRoot = ((UITree) tree).isShowRoot();
    final boolean showJunctions = indent.isShowJunctions();
    final boolean showRootJunction = ((UITree) tree).isShowRootJunction();
    final boolean expanded = folder && node.isExpanded() || !showRoot && level == 0;

    TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
    HtmlRendererUtils.writeDataAttributes(facesContext, writer, indent);
View Full Code Here

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

public class TreeIndentRenderer extends LayoutComponentRendererBase {

  @Override
  public void encodeBegin(FacesContext facesContext, UIComponent component) throws IOException {

    final UITreeIndent indent = (UITreeIndent) component;
    final AbstractUITreeNode node = ComponentUtils.findAncestor(indent, AbstractUITreeNode.class);
    final AbstractUIData data = ComponentUtils.findAncestor(indent, AbstractUIData.class);

    final boolean folder = node.isFolder();
    final int level = node.getLevel();
    final List<Boolean> junctions = node.getJunctions();

    final boolean showRoot = data.isShowRoot();
    final boolean showJunctions = indent.isShowJunctions();
    final boolean showRootJunction = data.isShowRootJunction();
    final boolean expanded = folder && data.getExpandedState().isExpanded(node.getPath());
    final boolean showLines = showJunctions && data instanceof UITree; // sheet should not show lines
    final boolean showIcons = showJunctions;

    final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);

    writer.startElement(HtmlElements.SPAN, indent);
    writer.writeIdAttribute(indent.getClientId(facesContext));
    HtmlRendererUtils.writeDataAttributes(facesContext, writer, indent);

    encodeIndent(
        facesContext, writer, node, showLines, showIcons, showRootJunction, showRoot, junctions);
View Full Code Here

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

  }

  @Override
  protected void setProperties(final UIComponent uiComponent) {
    super.setProperties(uiComponent);
    final UITreeIndent component = (UITreeIndent) uiComponent;
    final FacesContext context = FacesContext.getCurrentInstance();
    final Application application = context.getApplication();
    if (markup != null) {
      if (!markup.isLiteralText()) {
        component.setValueExpression("markup", markup);
      } else {
        component.setMarkup(org.apache.myfaces.tobago.context.Markup.valueOf(markup.getExpressionString()));
      }
    }
    if (showJunctions != null) {
      if (!showJunctions.isLiteralText()) {
        component.setValueExpression("showJunctions", showJunctions);
      } else {
        component.setShowJunctions(Boolean.parseBoolean(showJunctions.getExpressionString()));
      }
    }
    if (tip != null) {
      component.setValueExpression("tip", tip);
    }

  }
View Full Code Here

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

public class TreeIndentRenderer extends LayoutComponentRendererBase {

  @Override
  public void encodeBegin(FacesContext facesContext, UIComponent component) throws IOException {

    final UITreeIndent indent = (UITreeIndent) component;
    final UITreeNode node = ComponentUtils.findAncestor(indent, UITreeNode.class);
    final AbstractUITree tree = ComponentUtils.findAncestor(indent, AbstractUITree.class);

    final boolean folder = node.isFolder();
    final int level = node.getLevel();
    final boolean hasNextSibling = node.isHasNextSibling();
    final List<Boolean> junctions = node.getJunctions();

    final boolean showRoot = ((UITree) tree).isShowRoot();
    final boolean showJunctions = indent.isShowJunctions();
    final boolean showRootJunction = ((UITree) tree).isShowRootJunction();
    final boolean expanded = folder && node.isExpanded() || !showRoot && level == 0;

    TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
View Full Code Here

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

public class TreeIndentRenderer extends LayoutComponentRendererBase {

  @Override
  public void encodeBegin(FacesContext facesContext, UIComponent component) throws IOException {

    final UITreeIndent indent = (UITreeIndent) component;
    final UITreeNode node = ComponentUtils.findAncestor(indent, UITreeNode.class);
    final AbstractUIData data = ComponentUtils.findAncestor(indent, AbstractUIData.class);

    final boolean folder = node.isFolder();
    final int level = node.getLevel();
    final List<Boolean> junctions = node.getJunctions();

    final boolean showRoot = data.isShowRoot();
    final boolean showJunctions = indent.isShowJunctions();
    final boolean showRootJunction = data.isShowRootJunction();
    final boolean expanded = folder && data.getExpandedState().isExpanded(node.getPath());
    final boolean showLines = showJunctions && data instanceof UITree; // sheet should not show lines
    final boolean showIcons = showJunctions;
View Full Code Here

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

public class TreeIndentRenderer extends LayoutComponentRendererBase {

  @Override
  public void encodeBegin(final FacesContext facesContext, final UIComponent component) throws IOException {

    final UITreeIndent indent = (UITreeIndent) component;
    final AbstractUITreeNode node = ComponentUtils.findAncestor(indent, AbstractUITreeNode.class);
    final AbstractUIData data = ComponentUtils.findAncestor(indent, AbstractUIData.class);

    final boolean folder = node.isFolder();
    final int level = node.getLevel();
    final List<Boolean> junctions = node.getJunctions();

    final boolean showRoot = data.isShowRoot();
    final boolean showJunctions = indent.isShowJunctions();
    final boolean showRootJunction = data.isShowRootJunction();
    final boolean expanded = folder && data.getExpandedState().isExpanded(node.getPath());
    final boolean showLines = showJunctions && data instanceof UITree; // sheet should not show lines
    final boolean showIcons = showJunctions;

    final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);

    writer.startElement(HtmlElements.SPAN, indent);
    writer.writeIdAttribute(indent.getClientId(facesContext));
    HtmlRendererUtils.writeDataAttributes(facesContext, writer, indent);

    encodeIndent(
        facesContext, writer, node, showLines, showIcons, showRootJunction, showRoot, junctions);
View Full Code Here

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

  }

  @Override
  protected void setProperties(final UIComponent uiComponent) {
    super.setProperties(uiComponent);
    final UITreeIndent component = (UITreeIndent) uiComponent;
    final FacesContext context = FacesContext.getCurrentInstance();
    final Application application = context.getApplication();
    if (markup != null) {
      if (!markup.isLiteralText()) {
        component.setValueExpression("markup", markup);
      } else {
        component.setMarkup(org.apache.myfaces.tobago.context.Markup.valueOf(markup.getExpressionString()));
      }
    }
    if (showJunctions != null) {
      if (!showJunctions.isLiteralText()) {
        component.setValueExpression("showJunctions", showJunctions);
      } else {
        component.setShowJunctions(Boolean.parseBoolean(showJunctions.getExpressionString()));
      }
    }
    if (tip != null) {
      component.setValueExpression("tip", tip);
    }

  }
View Full Code Here

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

public class TreeIndentRenderer extends LayoutComponentRendererBase {

  @Override
  public void encodeBegin(FacesContext facesContext, UIComponent component) throws IOException {

    final UITreeIndent indent = (UITreeIndent) component;
    final AbstractUITreeNode node = ComponentUtils.findAncestor(indent, AbstractUITreeNode.class);
    final AbstractUIData data = ComponentUtils.findAncestor(indent, AbstractUIData.class);

    final boolean folder = node.isFolder();
    final int level = node.getLevel();
    final List<Boolean> junctions = node.getJunctions();

    final boolean showRoot = data.isShowRoot();
    final boolean showJunctions = indent.isShowJunctions();
    final boolean showRootJunction = data.isShowRootJunction();
    final boolean expanded = folder && data.getExpandedState().isExpanded(node.getPath());
    final boolean showLines = showJunctions && data instanceof UITree; // sheet should not show lines
    final boolean showIcons = showJunctions;

    final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);

    writer.startElement(HtmlElements.SPAN, indent);
    writer.writeIdAttribute(indent.getClientId(facesContext));

    encodeIndent(
        facesContext, writer, node, showLines, showIcons, showRootJunction, showRoot, junctions);

    encodeTreeJunction(
View Full Code Here

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

public class TreeIndentRenderer extends LayoutComponentRendererBase {

  @Override
  public void encodeBegin(final FacesContext facesContext, final UIComponent component) throws IOException {

    final UITreeIndent indent = (UITreeIndent) component;
    final AbstractUITreeNode node = ComponentUtils.findAncestor(indent, AbstractUITreeNode.class);
    final AbstractUIData data = ComponentUtils.findAncestor(indent, AbstractUIData.class);

    final boolean folder = node.isFolder();
    final int level = node.getLevel();
    final List<Boolean> junctions = node.getJunctions();

    final boolean showRoot = data.isShowRoot();
    final boolean showJunctions = indent.isShowJunctions();
    final boolean showRootJunction = data.isShowRootJunction();
    final boolean expanded = folder && data.getExpandedState().isExpanded(node.getPath());
    final boolean showLines = showJunctions && data instanceof UITree; // sheet should not show lines
    final boolean showIcons = showJunctions;

    final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);

    writer.startElement(HtmlElements.SPAN, indent);
    writer.writeIdAttribute(indent.getClientId(facesContext));
    HtmlRendererUtils.writeDataAttributes(facesContext, writer, indent);

    encodeIndent(
        facesContext, writer, node, showLines, showIcons, showRootJunction, showRoot, junctions);
View Full Code Here

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

public class TreeIndentRenderer extends LayoutComponentRendererBase {

  @Override
  public void encodeBegin(FacesContext facesContext, UIComponent component) throws IOException {

    final UITreeIndent indent = (UITreeIndent) component;
    final UITreeNode node = ComponentUtils.findAncestor(indent, UITreeNode.class);
    final AbstractUITree tree = ComponentUtils.findAncestor(indent, AbstractUITree.class);

    final boolean folder = node.isFolder();
    final int level = node.getLevel();
    final boolean hasNextSibling = node.isHasNextSibling();
    final List<Boolean> junctions = node.getJunctions();

    final boolean showRoot = ((UITree) tree).isShowRoot();
    final boolean showJunctions = indent.isShowJunctions();
    final boolean showRootJunction = ((UITree) tree).isShowRootJunction();
    final boolean expanded = folder && node.isExpanded() || !showRoot && level == 0;

    TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
    HtmlRendererUtils.writeDataAttributes(facesContext, writer, indent);
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.