Class CopyChip
java.lang.Object
com.inductiveautomation.ignition.designer.gui.CopyChip
Builds the small icon-only Copy affordance used wherever a renderer wants to expose "copy this
chunk to the clipboard" — the assistant reply bubble, fenced code blocks, table grids, etc.
Centralized so every Copy chip across the AI / Markdown rendering surfaces lands with the same
glyph, the same click affordance, and the same
FEEDBACK_MSms post-click feedback (icon
swap to a check glyph and tooltip swap to "Copied" before reverting).
The glyphs (copy + check) and pixel size are locked inside the chip; callers supply only the
clipboard-text Supplier and an optional tint. The helper is intentionally opacity-neutral
— it does not call setOpaque or setBackground on the returned button. Callers
mount the chip into chrome that varies widely in tint and set that themselves before adding the
button.
-
Method Summary
Modifier and TypeMethodDescriptionstatic JideToolbarButtonstatic JideToolbarButtonVariant that tints the copy/check glyphs.
-
Method Details
-
create
- Parameters:
textSupplier- lazy source of the text written to the clipboard on click. Anullor empty value short-circuits the click — neither the clipboard nor the feedback state change.
-
create
Variant that tints the copy/check glyphs.- Parameters:
textSupplier- lazy source of the text written to the clipboard on click.iconColor- tint applied to both glyphs.nullleaves the icons at their default platform color.
-