Class ToolPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, Scrollable

public class ToolPanel extends ScrollablePanel
A panel that displays the details and controls for a specific AbstractTool.

It provides a dynamic tabbed view for inspecting tool parameters, the return type schema, and the native declaration string.

Author:
anahata
See Also:
  • Field Details

    • parentPanel

      private final ContextPanel parentPanel
      The parent context panel.
    • tabbedPane

      private final AdjustingTabPane tabbedPane
      The specialized tabbed pane for schemas.
    • nameLabel

      private final JLabel nameLabel
      Label for the tool name.
    • descLabel

      private final JLabel descLabel
      Label for the tool description.
    • permissionPanel

      private final JPanel permissionPanel
      Panel for permission buttons in the header.
    • permissionCombo

      private JComboBox<ToolPermission> permissionCombo
      The control for tool permissions.
    • maxDepthSpinner

      private JSpinner maxDepthSpinner
      The control for default max depth.
    • permissionListener

      private EdtPropertyChangeListener permissionListener
      The active tool listener.
  • Constructor Details

    • ToolPanel

      public ToolPanel(ContextPanel parentPanel)
      Constructs a new ToolPanel.
      Parameters:
      parentPanel - The parent context panel.
  • Method Details

    • setTool

      public void setTool(AbstractTool<?,?> tool)
      Updates the panel to display the details for the given tool.
      Parameters:
      tool - The selected tool.
    • createSchemaViewer

      private JComponent createSchemaViewer(String name, String json)
      Creates a high-fidelity viewer for a JSON schema.
      Parameters:
      name - The name for the ephemeral resource.
      json - The JSON string to render.
      Returns:
      A JComponent (viewer) wrapped in a padded panel.