| wicket.extensions.markup.html.tree.AbstractTree wicket.extensions.markup.html.tree.DefaultAbstractTree
All known Subclasses: wicket.extensions.markup.html.tree.table.TreeTable, wicket.extensions.markup.html.tree.Tree,
DefaultAbstractTree | abstract public class DefaultAbstractTree extends AbstractTree (Code) | | 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(wicket.extensions.markup.html.tree.DefaultAbstractTree.LinkType) author: Matej Knopp |
Inner Class :final public static class LinkType extends EnumeratedType | |
Inner Class :protected interface ILinkCallback extends Serializable | |
Method Summary | |
protected PackageResourceReference | getCSS() Returns the resource reference of default stylesheet. | protected ResourceReference | getFolderClosed() Returns the resource reference of default closed tree folder. | protected ResourceReference | getFolderOpen() Returns the resource reference of default open tree folder. | protected ResourceReference | getItem() Returns the resource reference of default tree item (not folder). | public LinkType | getLinkType() Returns the current type of links on tree items. | protected ResourceReference | getNodeIcon(TreeNode node) Returns the resource reference for icon of specified tree node. | protected Component | newIndentation(MarkupContainer parent, String id, TreeNode node, int level) Creates the indentation element. | protected MarkupContainer | newJunctionImage(MarkupContainer parent, String id, TreeNode node) Creates an image placed on junction link. | protected Component | newJunctionLink(MarkupContainer parent, String id, String imageId, TreeNode node) Creates the junction link for given node. | protected MarkupContainer | newLink(MarkupContainer parent, String id, ILinkCallback callback) Creates a link of type specified by current linkType. | protected Component | newNodeIcon(MarkupContainer parent, String id, TreeNode node) Creates the icon for current node. | protected MarkupContainer | newNodeLink(MarkupContainer parent, String id, TreeNode node) Creates a link that can be used to select / unselect the specified node. | protected void | onJunctionLinkClicked(AjaxRequestTarget target, TreeNode node) Callback function called after user clicked on an junction link. | protected void | onNodeLinkClicked(AjaxRequestTarget target, TreeNode node) This callback method is called after user has selected / deselected the
given node. | public void | setLinkType(LinkType linkType) Sets the type of links on tree items. |
DefaultAbstractTree | public DefaultAbstractTree(String id)(Code) | | Tree contructor.
Parameters: id - The component id |
DefaultAbstractTree | public DefaultAbstractTree(String id, IModel model)(Code) | | Tree constructor.
Parameters: id - The component id Parameters: model - The tree model |
DefaultAbstractTree | public DefaultAbstractTree(String id, TreeModel model)(Code) | | Tree constructor.
Parameters: id - The component id Parameters: model - The tree model |
getFolderClosed | protected ResourceReference getFolderClosed()(Code) | | Returns the resource reference of default closed tree folder.
The package resource reference |
getFolderOpen | protected ResourceReference getFolderOpen()(Code) | | Returns the resource reference of default open tree folder.
The package resource reference |
getItem | protected ResourceReference getItem()(Code) | | Returns the resource reference of default tree item (not folder).
The package resource reference |
getLinkType | public LinkType getLinkType()(Code) | | Returns the current type of links on tree items.
The link type |
getNodeIcon | protected ResourceReference getNodeIcon(TreeNode node)(Code) | | Returns the resource reference for icon of specified tree node.
Parameters: node - The node The package resource reference |
newIndentation | protected Component newIndentation(MarkupContainer parent, String id, TreeNode node, int level)(Code) | | Creates the indentation element. This element should be placed as first
element in the tree item markup to ensure proper indentaion of the tree
item. This implementation also takes care of lines that connect nodes.
Parameters: parent - The component parent Parameters: id - The component id Parameters: node - The tree node for which to create the identation element Parameters: level - The current level The indentation component |
newJunctionImage | protected MarkupContainer newJunctionImage(MarkupContainer parent, String id, TreeNode node)(Code) | | Creates an image placed on junction link. This image actually consists of
two spans with different css classes. These classes are specified
according to the stylesheet to make the junction image look well together
with lines connecting nodes.
Parameters: parent - The component parent Parameters: id - The component id Parameters: node - The tree node The component that resprents a junction |
newJunctionLink | protected Component newJunctionLink(MarkupContainer parent, String id, String imageId, TreeNode node)(Code) | | Creates the junction link for given node. Also (optionally) creates the
junction image. If the node is a leaf (it has no children), the created
junction link is non-functional.
Parameters: parent - parent component of the link Parameters: id - wicket:id of the component Parameters: imageId - wicket:id of the image. this can be null, in that case imageis not created. image is supposed to be placed on the link(link is parent of image) Parameters: node - tree node for which the link should be created. The link component |
newLink | protected MarkupContainer newLink(MarkupContainer parent, String id, ILinkCallback callback)(Code) | | Creates a link of type specified by current linkType. When the links is
clicked it calls the specified callback.
Parameters: parent - The parent component Parameters: id - The component id Parameters: callback - The link call back The link component |
newNodeLink | protected MarkupContainer newNodeLink(MarkupContainer parent, String id, TreeNode node)(Code) | | Creates a link that can be used to select / unselect the specified node.
Parameters: parent - The parent component Parameters: id - The component id Parameters: node - The parent node The component that represents the link |
onJunctionLinkClicked | protected void onJunctionLinkClicked(AjaxRequestTarget target, TreeNode node)(Code) | | Callback function called after user clicked on an junction link. The node
has already been expanded/collapsed (depending on previous status).
Parameters: target - Request target - may be null on non-ajax call Parameters: node - Node for which this callback is relevant |
onNodeLinkClicked | protected void onNodeLinkClicked(AjaxRequestTarget target, TreeNode node)(Code) | | This callback method is called after user has selected / deselected the
given node.
Parameters: target - Request target - may be null on non-ajax call Parameters: node - Node for which this this callback is fired. |
setLinkType | public void setLinkType(LinkType linkType)(Code) | | Sets the type of links on tree items. After the link type is changed, the
whole tree is rebuild and re-rendered.
Parameters: linkType - type of links |
|
|