SwingTerminal
Reusable Swing terminal component.
The component consumes published render-cache snapshots from a TerminalSession and paints terminal rows without knowing which transport produced the bytes. Hosts own session creation, process lifecycle, and connector choice outside this component.
Component state belongs to the Swing Event Dispatch Thread (EDT). Access it on the EDT unless a method explicitly documents another threading contract. Snapshot access and dispatch to the EDT are specified by each public method.
Parameters
provider for immutable settings snapshots.
host-provided non-render services.
Constructors
Properties
Functions
Registers an EDT callback for automatic-suggestion eligibility changes.
Registers an EDT callback for shell-bound input invalidation.
Binds this component to session.
Requests a foreground-program screen clear/redraw.
Clears the current terminal-buffer search query and highlights.
Returns all currently retained output for recordId.
Copies all retained output for recordId through the host clipboard service.
Copies captured command text for recordId through the host clipboard service.
Copies the current terminal text selection to the host clipboard.
Writes host-approved text to the configured clipboard service.
Returns the current search result snapshot.
Returns the current visible cell selection, or null when nothing is selected. Linear selection columns are logical; block selection columns are visual, as defined by CellSelection.
Returns the current shell suggestion popup state.
Hides the shell suggestion popup.
Returns whether automatic suggestions are enabled at the live viewport.
Pastes text from the host clipboard into the active terminal session.
Returns the component size in pixels for the requested grid and screen.
Applies changed settings, rebuilding geometry only when its inputs change.
Removes a callback previously registered with addShellSuggestionEligibilityListener.
Removes a callback previously registered with addShellSuggestionInvalidationListener.
Requests suggestions for the command line currently reported by the bound TerminalSession.
Requests shell suggestions from SwingHostServices.shellSuggestionProvider and shows the returned suggestions near a terminal-grid cell.
Moves the viewport to scrollbackOffset terminal rows above live output.
Returns to the live terminal viewport.
Scrolls to the nearest next shell command.
Scrolls to the nearest previous shell command.
Scrolls to an absolute scrollback offset.
Applies a signed scrollback delta in terminal rows.
Selects command output for recordId.
Selects the next search result when a search query is active.
Selects the previous search result when a search query is active.
Configures whether terminal-buffer search is case-sensitive.
Shows host-provided shell suggestions for a known command-line request.
Triggers this component's visual bell indicator.
Returns the latest terminal-native scrollback viewport snapshot.
Returns the grid size that fits in this component's current bounds.