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 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, 4, 4, 6), val alternateScreenPadding: Insets = Insets(0, 2, 2, 2), 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, val scrollOnOutput: 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, 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, 4, 4, 6), alternateScreenPadding: Insets = Insets(0, 2, 2, 2), pasteSanitizationPolicy: PasteSanitizationPolicy = PasteSanitizationPolicy.RAW, cursorShape: TerminalRenderCursorShape = TerminalRenderCursorShape.BLOCK, scrollbackLines: Int = 1000, lineHeight: Float = 1.0f, shellRequestResizeWindow: Boolean = false, shellRequestWindowManipulation: Boolean = false, shellSuggestionsEnabled: Boolean = true, scrollOnOutput: Boolean = true)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

alternate-screen visual inset around the terminal grid in pixels. The default keeps top padding at zero and uses small symmetric side insets because alternate-screen applications do not use the primary scrollback scrollbar or shell-integration prompt gutter.

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

primary-screen visual inset around the terminal grid in pixels. Prompt-decoration and scrollbar gutters are component chrome layered outside this margin. The default keeps top padding at zero so smooth scrolling can enter through the top edge, leaves a small left margin before the prompt gutter, reserves a stable right gutter for the overlay scrollbar, and keeps a small bottom visual spacer.

Link copied to clipboard

resolved terminal color palette.

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
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

pixels reserved between the primary-screen left margin and terminal grid when the bound session has shell-integration decorations.

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.