Examples of AbstractUITreeNode


Examples of org.apache.myfaces.tobago.internal.component.AbstractUITreeNode

  @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);
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.component.AbstractUITreeNode

      = ResourceUtils.createString("image", "treeNode", "icon", "leaf", ResourceUtils.GIF);

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

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

    final boolean dataRendersRowContainer = data.isRendersRowContainer();
    final boolean folder = node.isFolder();
    final String clientId = node.getClientId(facesContext);
    final String parentId = data.getRowParentClientId();
    final boolean visible = data.isRowVisible();

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

Examples of org.apache.myfaces.tobago.internal.component.AbstractUITreeNode

  private static final Logger LOG = LoggerFactory.getLogger(TreeMenuLabelRenderer.class);

  protected Style createStyle(FacesContext facesContext, UITreeLabel node) {

    final AbstractUITreeNode parent = (AbstractUITreeNode) node.getParent();
    final int level = parent.getLevel();
//    final boolean folder = parent.isFolder();

    Style style = new Style();
    Measure paddingLeft = getResourceManager().getThemeMeasure(facesContext, node, "custom.padding-left");
    paddingLeft = paddingLeft.multiply(level);
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.component.AbstractUITreeNode

  private static final Logger LOG = LoggerFactory.getLogger(TreeMenuCommandRenderer.class);

  protected Style createStyle(FacesContext facesContext, AbstractUICommand node) {

    final AbstractUITreeNode parent = (AbstractUITreeNode) node.getParent();
    final int level = parent.getLevel();
//    final boolean folder = parent.isFolder();

    Style style = new Style();
    Measure paddingLeft = getResourceManager().getThemeMeasure(facesContext, node, "custom.padding-left");
    paddingLeft = paddingLeft.multiply(level);
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.component.AbstractUITreeNode

  private static final Log LOG = LogFactory.getLog(TreeSelectRenderer.class);

  public void decode(FacesContext facesContext, UIComponent component) {

    final UITreeSelect select = (UITreeSelect) component;
    final AbstractUITreeNode node = ComponentUtils.findAncestor(select, AbstractUITreeNode.class);
    final AbstractUIData data = ComponentUtils.findAncestor(node, AbstractUIData.class);

    if (ComponentUtils.isOutputOnly(select)) {
      return;
    }
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.component.AbstractUITreeNode

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

    final UITreeSelect select = (UITreeSelect) component;
    final AbstractUITreeNode node = ComponentUtils.findAncestor(select, AbstractUITreeNode.class);
    final AbstractUIData data = ComponentUtils.findAncestor(node, AbstractUIData.class);

    TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);

    if (data instanceof AbstractUITreeListbox) {
      writer.write(StringUtils.defaultString((String) select.getLabel()));
      return;
    }

    final String id = select.getClientId(facesContext);
    final String currentValue = getCurrentValue(facesContext, select);
    final boolean checked;
    if (select.isValueStoredInState()) {
      checked = data.getSelectedState().isSelected(node.getPath());
    } else {
      checked = "true".equals(currentValue);
    }

    final boolean folder = data.isFolder();
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.component.AbstractUITreeNode

  @Override
  public void prepareRender(FacesContext facesContext, UIComponent component) throws IOException {
    super.prepareRender(facesContext, component);

    final AbstractUITreeNode node = (AbstractUITreeNode) component;
    final AbstractUIData data = ComponentUtils.findAncestor(node, AbstractUIData.class);
    if (data instanceof AbstractUITree && ((AbstractUITree) data).getSelectedState().isSelected(node.getPath())) {
      ComponentUtils.addCurrentMarkup(node, Markup.SELECTED);
    }
    if (node.isFolder()) {
      ComponentUtils.addCurrentMarkup(node, Markup.FOLDER);
      if (data.getExpandedState().isExpanded(node.getPath())) {
        ComponentUtils.addCurrentMarkup(node, Markup.EXPANDED);
      }
    }
  }
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.component.AbstractUITreeNode

  private static final Logger LOG = LoggerFactory.getLogger(TreeMenuLabelRenderer.class);

  protected Style createStyle(FacesContext facesContext, UITreeLabel node) {

    final AbstractUITreeNode parent = (AbstractUITreeNode) node.getParent();
    final int level = parent.getLevel();
//    final boolean folder = parent.isFolder();

    Style style = new Style();
    Measure paddingLeft = getResourceManager().getThemeMeasure(facesContext, node, "custom.padding-left");
    paddingLeft = paddingLeft.multiply(level);
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.component.AbstractUITreeNode

  private static final Logger LOG = LoggerFactory.getLogger(TreeMenuCommandRenderer.class);

  protected Style createStyle(FacesContext facesContext, AbstractUICommand node) {

    final AbstractUITreeNode parent = (AbstractUITreeNode) node.getParent();
    final int level = parent.getLevel();
//    final boolean folder = parent.isFolder();

    Style style = new Style();
    Measure paddingLeft = getResourceManager().getThemeMeasure(facesContext, node, "custom.padding-left");
    paddingLeft = paddingLeft.multiply(level);
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.component.AbstractUITreeNode

  private static final Logger LOG = LoggerFactory.getLogger(TreeMenuCommandRenderer.class);

  protected Style createStyle(final FacesContext facesContext, final AbstractUICommand node) {

    final AbstractUITreeNode parent = (AbstractUITreeNode) node.getParent();
    final int level = parent.getLevel();
//    final boolean folder = parent.isFolder();

    final Style style = new Style();
    Measure paddingLeft = getResourceManager().getThemeMeasure(facesContext, node, "custom.padding-left");
    paddingLeft = paddingLeft.multiply(level);
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.