Class ToolManagerNode
java.lang.Object
uno.anahata.asi.swing.agi.context.AbstractContextNode<ToolManager>
uno.anahata.asi.swing.agi.context.ToolManagerNode
A specialized context tree node representing the
ToolManager.
This node manages the display of the root tool manager and exposes its registered toolkits as child nodes.
- Author:
- anahata
-
Field Summary
Fields inherited from class AbstractContextNode
agiPanel, children, declarationsTokens, historyTokens, instructionsTokens, ragTokens, status, userObject -
Constructor Summary
ConstructorsConstructorDescriptionToolManagerNode(AgiPanel agiPanel, ToolManager userObject) Constructs a new ToolManagerNode. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidCalculates the token counts for this node's own content (excluding children).protected AbstractContextNode<?> createChildNode(Object obj) Creates a new child node for the given domain object.protected List<?> Fetches the current list of domain objects that should be represented as children of this node.Gets a detailed description of the node's purpose or content.getName()Gets the human-readable display name for this node.booleanisActive()Checks if the underlying domain object is currently active in the context.protected voidUpdates the status string for this node.Methods inherited from class AbstractContextNode
equals, getAgi, getChildren, getIcon, hashCode, refresh, refreshData, refreshTokens, toString
-
Constructor Details
-
ToolManagerNode
Constructs a new ToolManagerNode.- Parameters:
agiPanel- The parent agi panel.userObject- The tool manager to wrap.
-
-
Method Details
-
getName
Gets the human-readable display name for this node.- Specified by:
getNamein classAbstractContextNode<ToolManager>- Returns:
- The human-readable name of the tool manager.
- See Also:
-
getDescription
Gets a detailed description of the node's purpose or content.- Specified by:
getDescriptionin classAbstractContextNode<ToolManager>- Returns:
- The detailed description of the tool manager's purpose.
- See Also:
-
fetchChildObjects
Fetches the current list of domain objects that should be represented as children of this node.- Specified by:
fetchChildObjectsin classAbstractContextNode<ToolManager>- Returns:
- A list of registered toolkits as children.
-
createChildNode
Creates a new child node for the given domain object.- Specified by:
createChildNodein classAbstractContextNode<ToolManager>- Parameters:
obj- The toolkit domain object to wrap.- Returns:
- A new ToolkitNode wrapping the toolkit.
-
calculateLocalTokens
protected void calculateLocalTokens()Calculates the token counts for this node's own content (excluding children).- Specified by:
calculateLocalTokensin classAbstractContextNode<ToolManager>
-
isActive
public boolean isActive()Checks if the underlying domain object is currently active in the context.Subclasses override this method to define their specific active-state policy, allowing for clean, polymorphic evaluation without dirty instanceof chains.
- Specified by:
isActivein classAbstractContextNode<ToolManager>- Returns:
- True if the tool manager is providing context.
-
updateStatus
protected void updateStatus()Updates the status string for this node.- Specified by:
updateStatusin classAbstractContextNode<ToolManager>
-

