Package com.arcbees.chosen.client

Examples of com.arcbees.chosen.client.ChosenOptions


     * {@link #setMultipleSelect(boolean)}.
     *
     * @param isMultipleSelect specifies if multiple selection is enabled
     */
    public ChosenListBox(boolean isMultipleSelect) {
        this(isMultipleSelect, new ChosenOptions());
    }
View Full Code Here


            $("#browserWarning").show();
        }

        $(".chzn-select, .enhance").as(Chosen).chosen();

        $("#allowSingleDeselect").as(Chosen).chosen(new ChosenOptions().setAllowSingleDeselect(true));

        $("#disableSearchThreshold").as(Chosen).chosen(
                new ChosenOptions().setDisableSearchThreshold(10));

        $("#searchContains").as(Chosen).chosen(
                new ChosenOptions().setSearchContains(true));

        $("#singleBackstrokeDelete").as(Chosen).chosen(
                new ChosenOptions().setSingleBackstrokeDelete(true));

        $("#maxSelectedOptions").as(Chosen).chosen(
                new ChosenOptions().setMaxSelectedOptions(5));

        $("#noResultsText").as(Chosen).chosen(
                new ChosenOptions().setNoResultsText("Ooops, nothing was found:"));

        final ChosenListBox chzn = new ChosenListBox();
        chzn.addItem("item 1");
        chzn.setWidth("250px");

        RootPanel.get("updateChozen").add(chzn);

        $("#updateButton").click(new Function() {
            int i = 2;

            @Override
            public void f() {
                for (int j = 0; j < 100; j++) {
                    chzn.addItem("item " + i);
                    i++;
                }

                chzn.update();
            }
        });

        final ChosenListBox hcs = new ChosenListBox();
        hcs.setWidth("350px");
        hcs.setPlaceholderText("Navigate to...");
        hcs.setTabIndex(9);
        hcs.addItem("");
        hcs.addStyledItem("Home", "home", null);
        hcs.addGroup("ABOUT US");
        hcs.addStyledItemToGroup("Press Releases", "press", null, 0);
        hcs.addStyledItemToGroup("Contact Us", "about", null, 0);
        hcs.addGroup("PRODUCTS");
        hcs.addStyledItemToGroup("Tera-Magic", "tm", null, 0, 1);
        hcs.addStyledItemToGroup("Tera-Magic Pro", "tmpro", null, 1, 1);
        // Will be inserted before "Tera-Magic Pro" and custom-styled
        hcs.insertStyledItemToGroup("Tera-Magic Standard", "tmstd", "youAreHere", 1, 1, 1);
        RootPanel.get("hierChozenSingle").add(hcs);

        // custom filter
        ChosenOptions options = new ChosenOptions();
        options.setResultFilter(new ServerSideSimulatorResultFilter());
        final ChosenListBox serverChosenListBox = new ChosenListBox(false, options);
        RootPanel.get("serverChozen").add(serverChosenListBox);
    }
View Full Code Here

    /**
     * @throws java.lang.NullPointerException if {@code renderer} is null
     */
    public MultipleChosenValueListBox(Renderer<T> renderer) {
        this(renderer, new ChosenOptions());
    }
View Full Code Here

    /**
     * @throws java.lang.NullPointerException if {@code renderer} is null
     * @throws java.lang.NullPointerException if {@code keyProvider} is null
     */
    public MultipleChosenValueListBox(Renderer<T> renderer, ProvidesKey<T> keyProvider) {
        this(renderer, keyProvider, new ChosenOptions());
    }
View Full Code Here

    /**
     * @throws java.lang.NullPointerException if {@code renderer} is null
     */
    public ChosenValueListBox(Renderer<T> renderer) {
        this(renderer, new ChosenOptions());
    }
View Full Code Here

    /**
     * @throws java.lang.NullPointerException if {@code renderer} is null
     * @throws java.lang.NullPointerException if {@code keyProvider} is null
     */
    public ChosenValueListBox(Renderer<T> renderer, ProvidesKey<T> keyProvider) {
        this(renderer, keyProvider, new ChosenOptions());
    }
View Full Code Here

TOP

Related Classes of com.arcbees.chosen.client.ChosenOptions

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.