congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
DefaultAbstractTree
Code IndexAdd Tabnine to your IDE (free)

How to use
DefaultAbstractTree
in
org.apache.wicket.extensions.markup.html.tree

Best Java code snippets using org.apache.wicket.extensions.markup.html.tree.DefaultAbstractTree (Showing top 19 results out of 315)

origin: org.onehippo.cms7/hippo-cms-api

/**
 * @deprecated node icons should be created in {@link #newNodeIcon(MarkupContainer, String, TreeNode)}.
 */
@Override
@Deprecated
protected final ResourceReference getNodeIcon(TreeNode node) {
  return super.getNodeIcon(node);
}
origin: org.ops4j.pax.wicket/pax-wicket-service

/**
 * Returns the resource reference for icon of specified tree node.
 *
 * @param node
 *            The node
 * @return The package resource reference
 */
protected ResourceReference getNodeIcon(TreeNode node)
{
  if (node.isLeaf() == true)
  {
    return getItem();
  }
  else
  {
    if (isNodeExpanded(node))
    {
      return getFolderOpen();
    }
    else
    {
      return getFolderClosed();
    }
  }
}
origin: org.ops4j.pax.wicket/pax-wicket-service

final ILinkCallback callback)
if (getLinkType() == LinkType.REGULAR)
else if (getLinkType() == LinkType.AJAX)
origin: org.ops4j.pax.wicket/pax-wicket-service

  public void onClick(AjaxRequestTarget target)
  {
    getTreeState().selectNode(node, !getTreeState().isNodeSelected(node));
    onNodeLinkClicked(target, node);
    updateTree(target);
  }
});
origin: org.ops4j.pax.wicket/pax-wicket-service

  public void onClick(AjaxRequestTarget target)
  {
    if (isNodeExpanded(node))
    {
      getTreeState().collapseNode(node);
    }
    else
    {
      getTreeState().expandNode(node);
    }
    onJunctionLinkClicked(target, node);
    updateTree(target);
  }
});
origin: org.wicketstuff/wicket15-tree

  @Override
  public void onClick(final AjaxRequestTarget target)
  {
    if (isNodeExpanded(node))
    {
      getTreeState().collapseNode(node);
    }
    else
    {
      getTreeState().expandNode(node);
    }
    onJunctionLinkClicked(target, node);
    if (target != null)
    {
      updateTree(target);
    }
  }
});
origin: org.wicketstuff/wicket15-tree

junctionLink = newLink(parent, id, new ILinkCallback()
junctionLink.add(newJunctionImage(junctionLink, imageId, node));
origin: org.ops4j.pax.wicket/pax-wicket-service

/**
 * Performs the tree initialization. Adds header contribution for the stylesheet.
 */
private void init()
{
  ResourceReference css = getCSS();
  if (css != null)
  {
    add(CSSPackageResource.getHeaderContribution(css.getScope(), css.getName()));
  }
}
origin: org.ops4j.pax.wicket/pax-wicket-service

/**
 * Sets the type of links on tree items. After the link type is changed, the whole tree is
 * rebuild and re-rendered.
 *
 * @param linkType
 *            type of links
 */
public void setLinkType(LinkType linkType)
{
  if (this.linkType != linkType)
  {
    this.linkType = linkType;
    invalidateAll();
  }
}
origin: org.wicketstuff/wicket15-tree

  /**
   * {@inheritDoc}
   */
  @Override
  public void renderHead(final IHeaderResponse response)
  {
    super.renderHead(response);
    ResourceReference css = getCSS();
    if (css != null)
    {
      response.render(CssHeaderItem.forReference(css));
    }
  }
}
origin: org.wicketstuff/wicket15-tree

  /**
   * {@inheritDoc}
   */
  @Override
  protected void onComponentTag(final ComponentTag tag)
  {
    super.onComponentTag(tag);
    final String cssClassInner;
    if (node.isLeaf() == false)
    {
      cssClassInner = isNodeExpanded(node) ? "minus" : "plus";
    }
    else
    {
      cssClassInner = "corner";
    }
    final String cssClassOuter = isNodeLast(node) ? "junction-last" : "junction";
    Response response = RequestCycle.get().getResponse();
    response.write("<span class=\"" + cssClassOuter + "\"><span class=\"" +
      cssClassInner + "\"></span></span>");
  }
}.setRenderBodyOnly(true);
origin: org.wicketstuff/wicket15-tree

  @Override
  public void onClick(final AjaxRequestTarget target)
  {
    getTreeState().selectNode(node, !getTreeState().isNodeSelected(node));
    onNodeLinkClicked(target, node);
    if (target != null)
    {
      updateTree(target);
    }
  }
});
origin: org.ops4j.pax.wicket/pax-wicket-service

junctionLink = newLink(parent, id, new ILinkCallback()
junctionLink.add(newJunctionImage(junctionLink, imageId, node));
origin: org.wicketstuff/wicket15-tree

/**
 * Sets the type of links on tree items. After the link type is changed, the whole tree is
 * rebuild and re-rendered.
 * 
 * @param linkType
 *            type of links
 */
public void setLinkType(final LinkType linkType)
{
  if (this.linkType != linkType)
  {
    this.linkType = linkType;
    invalidateAll();
  }
}
origin: org.wicketstuff/wicket15-tree

/**
 * Returns the resource reference for icon of specified tree node.
 * 
 * @param node
 *            The node
 * @return The package resource reference
 */
protected ResourceReference getNodeIcon(final TreeNode node)
{
  if (node.isLeaf() == true)
  {
    return getItem();
  }
  else
  {
    if (isNodeExpanded(node))
    {
      return getFolderOpen();
    }
    else
    {
      return getFolderClosed();
    }
  }
}
origin: org.onehippo.cms7/hippo-cms-api

@Override
protected Component newNodeIcon(final MarkupContainer parent, final String id, final TreeNode node) {
  ResourceReference nodeIcon = super.getNodeIcon(node);
  return HippoIcon.fromResource(id, nodeIcon);
}
origin: org.wicketstuff/wicket15-tree

final ILinkCallback callback)
if (getLinkType() == LinkType.REGULAR)
else if (getLinkType() == LinkType.AJAX)
origin: org.ops4j.pax.wicket/pax-wicket-service

  @Override
  protected void onComponentTag(ComponentTag tag)
  {
    super.onComponentTag(tag);
    tag.put("style", "background-image: url('" +
      RequestCycle.get().urlFor(getNodeIcon(node)) + "')");
  }
};
origin: org.wicketstuff/wicket15-tree

  /**
   * {@inheritDoc}
   */
  @Override
  protected void onComponentTag(final ComponentTag tag)
  {
    super.onComponentTag(tag);
    IRequestHandler handler = new ResourceReferenceRequestHandler(getNodeIcon(node));
    tag.put("style", "background-image: url('" + RequestCycle.get().urlFor(handler) +
      "')");
  }
};
org.apache.wicket.extensions.markup.html.treeDefaultAbstractTree

Javadoc

Tree class that contains convenient functions related to presentation of the tree, which includes junction link, tree item selection link, spacers (with lines) and default tree item and folder icons.

The class itself adds no component to tree items. If you use this class directly, you have to implement populateTreeItem() on your own. If you want to use an existing (complete) tree class, use Tree

This class allows you to choose between 3 types of links. DefaultAbstractTree#setLinkType(LinkType)

Most used methods

  • getNodeIcon
    Returns the resource reference for icon of specified tree node.
  • getCSS
    Returns the resource reference of default stylesheet.
  • getFolderClosed
    Returns the resource reference of default closed tree folder.
  • getFolderOpen
    Returns the resource reference of default open tree folder.
  • getItem
    Returns the resource reference of default tree item (not folder).
  • getLinkType
    Returns the current type of links on tree items.
  • getTreeState
  • invalidateAll
  • isNodeExpanded
  • newJunctionImage
    Creates an image placed on junction link. This image actually consists of two spans with different c
  • newLink
    Creates a link of type specified by current linkType. When the links is clicked it calls the specifi
  • onJunctionLinkClicked
    Callback function called after user clicked on an junction link. The node has already been expanded/
  • newLink,
  • onJunctionLinkClicked,
  • onNodeLinkClicked,
  • onTargetRespond,
  • setModelObject,
  • updateTree,
  • add,
  • init,
  • renderHead

Popular in Java

  • Making http post requests using okhttp
  • setContentView (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • runOnUiThread (Activity)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • JList (javax.swing)
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now