Ejemplo n.º 1
0
class AutocompleteInput(TextInput):
    """Single-line input widget with auto-completion."""

    completions = List(
        String,
        help="""
    A list of completion strings. This will be used to guide the
    user upon typing the beginning of a desired value.
    """,
    )

    fuzzy_comparison = Bool(default=True,
                            help="""Enable or disable fuzzy comparison""")

    fuzzy_threshold = PositiveInt(
        default=10,
        help="""
    The number of character difference to calculate Levensthein distance.
    """,
    )

    min_characters = PositiveInt(
        default=2,
        help="""
    The number of characters a user must type before completions are presented.
    """,
    )

    case_sensitive = Bool(default=True,
                          help="""Enable or disable case sensitivity""")

    restrict = Bool(
        default=True,
        help="""
    Set to False in order to allow users to enter text that is not present in the list of completion strings.
    """,
    )
Ejemplo n.º 2
0
class VTKAxes(Model):
    """
    A Bokeh model for axes
    """

    xticker = Dict(String, Any)

    yticker = Dict(String, Any)

    zticker = Dict(String, Any)

    origin = Any()

    digits = Int(default=1)

    show_grid = Bool(default=True)

    grid_opacity = Float(default=0.1)

    axes_opacity = Float(default=1)

    fontsize = PositiveInt(default=12)