Class DefaultPrompterConfig

java.lang.Object
org.jline.prompt.impl.DefaultPrompterConfig
All Implemented Interfaces:
PrompterConfig

public class DefaultPrompterConfig extends Object implements PrompterConfig
Default implementation of PrompterConfig interface.
  • Method Details

    • defaults

      public static DefaultPrompterConfig defaults()
    • windows

      public static DefaultPrompterConfig windows()
    • unix

      public static DefaultPrompterConfig unix()
    • custom

      public static DefaultPrompterConfig custom(org.jline.utils.StyleResolver styleResolver)
    • windows

      public static DefaultPrompterConfig windows(org.jline.utils.StyleResolver styleResolver)
    • unix

      public static DefaultPrompterConfig unix(org.jline.utils.StyleResolver styleResolver)
    • custom

      public static DefaultPrompterConfig custom(String indicator, String uncheckedBox, String checkedBox, String unavailable)
      Create a configuration with default styling support.

      This method creates a configuration similar to UiConfig, with default color styling based on environment variables or built-in defaults. The style keys used are:

      • .cu - cursor/indicator style
      • .be - box element style (checked/unchecked boxes)
      • .bd - disabled/unavailable item style
      • .fo - footer/description style (dimmed)
      Parameters:
      indicator - the indicator character/string
      uncheckedBox - the unchecked box character/string
      checkedBox - the checked box character/string
      unavailable - the unavailable item character/string
      Returns:
      a configuration with default styling support
    • custom

      public static DefaultPrompterConfig custom(String indicator, String uncheckedBox, String checkedBox, String unavailable, org.jline.utils.StyleResolver resolver, boolean cancellableFirstPrompt)
    • cancellableFirstPrompt

      public boolean cancellableFirstPrompt()
      Description copied from interface: PrompterConfig
      Whether the first prompt can be cancelled.
      Specified by:
      cancellableFirstPrompt in interface PrompterConfig
      Returns:
      true if the first prompt can be cancelled
    • styleResolver

      public org.jline.utils.StyleResolver styleResolver()
      Description copied from interface: PrompterConfig
      Get the style resolver for this configuration.
      Specified by:
      styleResolver in interface PrompterConfig
      Returns:
      the style resolver, or null if not available
    • indicator

      public String indicator()
      Description copied from interface: PrompterConfig
      Get the indicator character/string.
      Specified by:
      indicator in interface PrompterConfig
      Returns:
      the indicator
    • uncheckedBox

      public String uncheckedBox()
      Description copied from interface: PrompterConfig
      Get the unchecked box character/string.
      Specified by:
      uncheckedBox in interface PrompterConfig
      Returns:
      the unchecked box
    • checkedBox

      public String checkedBox()
      Description copied from interface: PrompterConfig
      Get the checked box character/string.
      Specified by:
      checkedBox in interface PrompterConfig
      Returns:
      the checked box
    • unavailable

      public String unavailable()
      Description copied from interface: PrompterConfig
      Get the unavailable item character/string.
      Specified by:
      unavailable in interface PrompterConfig
      Returns:
      the unavailable item