Class UriParameterRenderer
java.lang.Object
uno.anahata.asi.swing.agi.message.part.tool.param.UriParameterRenderer
- All Implemented Interfaces:
ParameterRenderer<Object>
- Direct Known Subclasses:
PathParameterRenderer
A specialized parameter renderer for URIs.
This renderer provides a sleek chip showing the URI and allows opening it via the host-specific ResourceUI strategy.
- Author:
- anahata
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate AgiPanelThe parent AGI panel interface.private AbstractToolCall<?, ?> The tool call execution context associated with this parameter.private final JPanelWrapper panel layout containing rendering chips.private StringThe declared name of this parameter.private ObjectThe raw value bound to this parameter. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new UriParameterRenderer and initializes the container layout. -
Method Summary
Modifier and TypeMethodDescriptionprivate JPanelcreateChip(String uriString) Dynamically builds a beautiful UI chip for the specified URI.Returns the Swing component that performs the rendering.voidinit(AgiPanel agiPanel, AbstractToolCall<?, ?> call, String paramName, Object value) Initializes the renderer with its context.booleanrender()Triggers the rendering logic.voidupdateContent(Object value) Updates the renderer with a new value.
-
Field Details
-
agiPanel
The parent AGI panel interface. -
call
The tool call execution context associated with this parameter. -
paramName
The declared name of this parameter. -
value
The raw value bound to this parameter. -
container
Wrapper panel layout containing rendering chips.
-
-
Constructor Details
-
UriParameterRenderer
public UriParameterRenderer()Constructs a new UriParameterRenderer and initializes the container layout.
-
-
Method Details
-
init
Description copied from interface:ParameterRendererInitializes the renderer with its context.- Specified by:
initin interfaceParameterRenderer<Object>- Parameters:
agiPanel- The parent agi panel.call- The tool call being rendered.paramName- The name of the parameter.value- The initial value.
-
getComponent
Description copied from interface:ParameterRendererReturns the Swing component that performs the rendering.- Specified by:
getComponentin interfaceParameterRenderer<Object>- Returns:
- The rendering component.
-
updateContent
Description copied from interface:ParameterRendererUpdates the renderer with a new value.- Specified by:
updateContentin interfaceParameterRenderer<Object>- Parameters:
value- The new value to render.
-
render
public boolean render()Description copied from interface:ParameterRendererTriggers the rendering logic.- Specified by:
renderin interfaceParameterRenderer<Object>- Returns:
- True if a visual update occurred.
-
createChip
-

