java.lang.Object
org.jline.prompt.impl.DefaultPrompterConfig
- All Implemented Interfaces:
PrompterConfig
Default implementation of PrompterConfig interface.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether the first prompt can be cancelled.Get the checked box character/string.static DefaultPrompterConfigCreate a configuration with default styling support.static DefaultPrompterConfigcustom(String indicator, String uncheckedBox, String checkedBox, String unavailable, org.jline.utils.StyleResolver resolver, boolean cancellableFirstPrompt) static DefaultPrompterConfigcustom(org.jline.utils.StyleResolver styleResolver) static DefaultPrompterConfigdefaults()Get the indicator character/string.org.jline.utils.StyleResolverGet the style resolver for this configuration.Get the unavailable item character/string.Get the unchecked box character/string.static DefaultPrompterConfigunix()static DefaultPrompterConfigunix(org.jline.utils.StyleResolver styleResolver) static DefaultPrompterConfigwindows()static DefaultPrompterConfigwindows(org.jline.utils.StyleResolver styleResolver) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jline.prompt.PrompterConfig
footerMaxRows, style, withCancellableFirstPrompt
-
Method Details
-
defaults
-
windows
-
unix
-
custom
-
windows
-
unix
-
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/stringuncheckedBox- the unchecked box character/stringcheckedBox- the checked box character/stringunavailable- 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:PrompterConfigWhether the first prompt can be cancelled.- Specified by:
cancellableFirstPromptin interfacePrompterConfig- Returns:
- true if the first prompt can be cancelled
-
styleResolver
public org.jline.utils.StyleResolver styleResolver()Description copied from interface:PrompterConfigGet the style resolver for this configuration.- Specified by:
styleResolverin interfacePrompterConfig- Returns:
- the style resolver, or null if not available
-
indicator
Description copied from interface:PrompterConfigGet the indicator character/string.- Specified by:
indicatorin interfacePrompterConfig- Returns:
- the indicator
-
uncheckedBox
Description copied from interface:PrompterConfigGet the unchecked box character/string.- Specified by:
uncheckedBoxin interfacePrompterConfig- Returns:
- the unchecked box
-
checkedBox
Description copied from interface:PrompterConfigGet the checked box character/string.- Specified by:
checkedBoxin interfacePrompterConfig- Returns:
- the checked box
-