ExplorerNode: ExplorerNode

Description Important Methods

Description

R6Class representing a node in an explorer tree which can be traversed using the explorer module. Each node has an explorer_class attached representing the general behaviour of nodes with this explorer_class in the explorer. Furthermore an object is attached representing the special behaviour and data associated with this particular node.

Important

You usually don't want to call explicitly ExplorerNode$new. Instead you should create a new explorer tree with ExplorerTree, take its root node with root <- explorer_tree$get_root_node() and afterwards call root$add_child().

Methods

add_addable(labels)

Add labels to the addable labels.

add_child(addable = NULL, explorer_class_id = "__group__", id = NULL, object = Object$new(), removable = TRUE, return = c("self", "child"), visible = NULL

Initialize a new node object which is attached to the current node object as a child, but only if this node is a group node.

addable A character vector of labels. Nodes of every explorer class that has one of these labels are addable as child nodes to this particular node.
explorer_class_id Id of an object of class ExplorerClass, which defines the behaviour of the child node in the explorer. This object must be passed to explorer as an element of the .explorer_classes list.
id Unique identifier of the node. If NULL, this identifier is created internally.
object An arbitrary object for storing information about the child node.
removable If TRUE, this node is removable by the user, else not.
return If "self", this method returns the node, which adds a child; If "child", the added node is returned.
visible A character vector of labels. Nodes of every explorer class that has one of these labels are visible as child nodes to this particular node.
add_visible(labels)

Add labels to the visible labels.

get_addable()

Get a character vector of labels. Note: This does not include the labels of explorer classes that are addable to the current explorer or to all objects that share the same class with this node.

get_children()

Get an object of class ObjectStorage containing all children of this node. Each child is an object of class ExplorerNode.

get_child(id)

Get the child node object with id == id.

get_child_ids()

Get the ids of all child nodes of this node object.

get_child_objects

Get an object of class ObjectStorage containing all objects associated with the children of this node. These objects are usually heterogeneous, which means they are instances of different classes.

get_explorer_class_id()

Get the id of the object of class explorer_class associated with this node object.

get_id()

Get the id of the node object.

get_nth_child(n)

Get the nth child of this node object. The first added child is returned for coden = 1.

get_object()

Get the object associated with this node object.

get_parent_node()

Get the parent node of this node.

get_siblings()

Get an object of class ObjectStorage containing all siblings of this node. Each sibling is an object of class ExplorerNode.

get_visible()

Get a character vector of labels. Note: This does not include the labels of explorer classes that are visible to the current explorer or to all objects that share the same class with this node.

is_removable()

Returns a logical indicating whether this node is removable or not.

remove_addable(labels)

Remove labels from the addable labels.

remove_child(id)

Remove the child with id == id.

remove_visible(labels)

Remove labels from the visible labels.

set_addable_explorer_classes(addable_explorer_classes)

Set the ids of the explorer classes, which are addable as children to this node.

addable_explorer_classes character vector
set_explorer_class_id(explorer_class_id)

Set the id of the object of class explorer_class associated with this node object.

set_object(object)

Set an arbitrary object associated with this node object.


DavidBarke/shinyExplorer documentation built on Aug. 28, 2020, 8:54 p.m.