SwingSettings

data class SwingSettings @JvmOverloads constructor(val font: Font = defaultTerminalFont(), val fallbackFonts: List<Font> = defaultFallbackFonts(), val useSystemFallbackFonts: Boolean = true, val palette: TerminalColorPalette = defaultPalette(), val columns: Int = 80, val rows: Int = 24, val treatAmbiguousAsWide: Boolean = false, val cursorBlinkMillis: Int = 600, val textAntialiasing: Any = RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB, val fractionalMetrics: Any = RenderingHints.VALUE_FRACTIONALMETRICS_OFF, val clipboardShortcuts: TerminalClipboardShortcuts = TerminalClipboardShortcuts.platformDefault(), val hyperlinkActivationForeground: Int = DEFAULT_HYPERLINK_ACTIVATION_FOREGROUND, val selectionBackground: Int = DEFAULT_SELECTION_BACKGROUND, val searchMatchBackground: Int = DEFAULT_SEARCH_MATCH_BACKGROUND, val searchActiveMatchBackground: Int = DEFAULT_SEARCH_ACTIVE_MATCH_BACKGROUND, val visualBellEnabled: Boolean = true, val visualBellColor: Int = DEFAULT_VISUAL_BELL_COLOR, val visualBellDurationMillis: Int = DEFAULT_VISUAL_BELL_DURATION_MILLIS, val visualBellEdgeThicknessPixels: Int = DEFAULT_VISUAL_BELL_EDGE_THICKNESS_PIXELS, val shellIntegrationPromptDotsVisible: Boolean = true, val shellIntegrationPromptDotColor: Int = DEFAULT_SHELL_INTEGRATION_PROMPT_DOT_COLOR, val shellIntegrationFailedPromptDotColor: Int = DEFAULT_SHELL_INTEGRATION_FAILED_PROMPT_DOT_COLOR, val shellIntegrationPromptDotDiameter: Int = 8, val shellIntegrationDecorationGutterWidth: Int = 16, val shellIntegrationFailedCommandRailsVisible: Boolean = true, val shellIntegrationFailedCommandRailColor: Int = DEFAULT_SHELL_INTEGRATION_FAILED_COMMAND_RAIL_COLOR, val shellIntegrationFailedCommandRailWidth: Int = 3, val padding: Insets = Insets(0, 20, 8, 8), val pasteOnMiddleClick: Boolean = true, val pasteSanitizationPolicy: PasteSanitizationPolicy = PasteSanitizationPolicy.RAW, val cursorShape: TerminalRenderCursorShape = TerminalRenderCursorShape.BLOCK, val scrollbackLines: Int = 1000, val lineHeight: Float = 1.0f, val shellRequestResizeWindow: Boolean = false, val shellRequestWindowManipulation: Boolean = false, val shellSuggestionsEnabled: Boolean = true)

Immutable Swing terminal UI settings.

Hosts can replace this value and call SwingTerminal.reloadSettings to rebuild metrics and repaint.

Constructors

Link copied to clipboard
constructor(font: Font = defaultTerminalFont(), fallbackFonts: List<Font> = defaultFallbackFonts(), useSystemFallbackFonts: Boolean = true, palette: TerminalColorPalette = defaultPalette(), columns: Int = 80, rows: Int = 24, treatAmbiguousAsWide: Boolean = false, cursorBlinkMillis: Int = 600, textAntialiasing: Any = RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB, fractionalMetrics: Any = RenderingHints.VALUE_FRACTIONALMETRICS_OFF, clipboardShortcuts: TerminalClipboardShortcuts = TerminalClipboardShortcuts.platformDefault(), hyperlinkActivationForeground: Int = DEFAULT_HYPERLINK_ACTIVATION_FOREGROUND, selectionBackground: Int = DEFAULT_SELECTION_BACKGROUND, searchMatchBackground: Int = DEFAULT_SEARCH_MATCH_BACKGROUND, searchActiveMatchBackground: Int = DEFAULT_SEARCH_ACTIVE_MATCH_BACKGROUND, visualBellEnabled: Boolean = true, visualBellColor: Int = DEFAULT_VISUAL_BELL_COLOR, visualBellDurationMillis: Int = DEFAULT_VISUAL_BELL_DURATION_MILLIS, visualBellEdgeThicknessPixels: Int = DEFAULT_VISUAL_BELL_EDGE_THICKNESS_PIXELS, shellIntegrationPromptDotsVisible: Boolean = true, shellIntegrationPromptDotColor: Int = DEFAULT_SHELL_INTEGRATION_PROMPT_DOT_COLOR, shellIntegrationFailedPromptDotColor: Int = DEFAULT_SHELL_INTEGRATION_FAILED_PROMPT_DOT_COLOR, shellIntegrationPromptDotDiameter: Int = 8, shellIntegrationDecorationGutterWidth: Int = 16, shellIntegrationFailedCommandRailsVisible: Boolean = true, shellIntegrationFailedCommandRailColor: Int = DEFAULT_SHELL_INTEGRATION_FAILED_COMMAND_RAIL_COLOR, shellIntegrationFailedCommandRailWidth: Int = 3, padding: Insets = Insets(0, 20, 8, 8), pasteOnMiddleClick: Boolean = true, pasteSanitizationPolicy: PasteSanitizationPolicy = PasteSanitizationPolicy.RAW, cursorShape: TerminalRenderCursorShape = TerminalRenderCursorShape.BLOCK, scrollbackLines: Int = 1000, lineHeight: Float = 1.0f, shellRequestResizeWindow: Boolean = false, shellRequestWindowManipulation: Boolean = false, shellSuggestionsEnabled: Boolean = true)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

platform clipboard key bindings.

Link copied to clipboard

initial preferred column count.

Link copied to clipboard

cursor blink period in milliseconds. A value of zero disables cursor blinking and keeps the cursor visible.

Link copied to clipboard

default cursor shape configured for the session.

Link copied to clipboard

ordered fonts used by the complex-text renderer when font cannot display a Unicode scalar cell or grapheme cluster.

Link copied to clipboard
val font: Font

primary terminal font.

Link copied to clipboard

fractional font metrics hint used during painting.

Link copied to clipboard

packed ARGB foreground used for the linked span currently under Ctrl-hover.

Link copied to clipboard

vertical line height scaling factor.

Link copied to clipboard

optional host-owned visual inset around the terminal grid in pixels. The default keeps top padding at zero so smooth scrolling can enter through the top edge, while retaining a compact right edge, the shell-integration decoration gutter, and a small bottom visual spacer. Alternate-screen rendering replaces the inactive prompt gutter with symmetric side insets and resizes the terminal grid to the newly available columns.

Link copied to clipboard

resolved terminal color palette.

Link copied to clipboard

whether middle mouse button click triggers a clipboard paste.

Link copied to clipboard

paste payload transformation applied before host-bound input emission.

Link copied to clipboard
val rows: Int

initial preferred row count.

Link copied to clipboard

maximum scrollback lines retained by the terminal.

Link copied to clipboard

packed ARGB overlay used for the active search result.

Link copied to clipboard

packed ARGB overlay used for non-active search result ranges.

Link copied to clipboard

packed ARGB overlay used for visible terminal selection ranges.

Link copied to clipboard

maximum pixels used for shell-integration decorations in the left padding gutter.

Link copied to clipboard

packed ARGB color for failed-command rails.

whether failed-command output draws a vertical gutter rail.

Link copied to clipboard

failed-command rail width in pixels.

Link copied to clipboard

packed ARGB color for failed-command prompt dots.

Link copied to clipboard

packed ARGB color for normal prompt dots.

Link copied to clipboard

prompt-dot diameter in pixels.

Link copied to clipboard

whether shell-integration prompt dots are painted in the left gutter.

Link copied to clipboard

whether the terminal panel requests window resizing.

Link copied to clipboard

whether the terminal panel allows shell window manipulation.

Link copied to clipboard

whether the reusable terminal component may show host-provided shell suggestion popups.

Link copied to clipboard

text antialiasing hint used during painting.

Link copied to clipboard

whether future East Asian Ambiguous codepoints should occupy two terminal cells in core width policy.

Link copied to clipboard

whether the complex-text renderer may use installed system fonts after fallbackFonts fail. System font discovery is asynchronous and disabled by default to keep Swing startup and painting responsive.

Link copied to clipboard

packed ARGB color used for the visual bell edge pulse.

Link copied to clipboard

visual bell fade duration in milliseconds.

Link copied to clipboard

thickness of the visual bell edge bands in component pixels.

Link copied to clipboard

whether host BEL events trigger the Swing visual bell overlay.