Package org.geoserver.web.wicket

Examples of org.geoserver.web.wicket.SimpleChoiceRenderer


        add(new DropDownChoice("defaultInterpolationMethod", new PropertyModel(coverage, "defaultInterpolationMethod"),
               new WCSInterpolationModel()));
        Palette interpolationMethods = new Palette("interpolationMethods", LiveCollectionModel
                .list(new PropertyModel(coverage, "interpolationMethods")),
                new WCSInterpolationModel(), new SimpleChoiceRenderer(), 7, false) {
            /**
             * Override otherwise the header is not i18n'ized
             */
            @Override
            public Component newSelectedHeader(final String componentId) {
                return new Label(componentId, new ResourceModel(
                        "InterpolationMethodsPalette.selectedHeader"));
            }

            /**
             * Override otherwise the header is not i18n'ized
             */
            @Override
            public Component newAvailableHeader(final String componentId) {
                return new Label(componentId, new ResourceModel(
                        "InterpolationMethodsPalette.availableHeader"));
            }
        };
        add(interpolationMethods);

        // don't allow editing the native format
        TextField nativeFormat = new TextField("nativeFormat", new PropertyModel(coverage, "nativeFormat"));
        nativeFormat.setEnabled(false);
        add(nativeFormat);

        Palette formatPalette = new Palette("formatPalette", LiveCollectionModel
                .list(new PropertyModel(coverage, "supportedFormats")), new WCSFormatsModel(),
                new SimpleChoiceRenderer(), 10, false) {
            /**
             * Override otherwise the header is not i18n'ized
             */
            @Override
            public Component newSelectedHeader(final String componentId) {
View Full Code Here


     * @param userModel
     * @return
     */
    Palette rolesPalette(final IModel choiceModel) {
        return new Palette("roles", choiceModel, new Model((Serializable) roles),
                new SimpleChoiceRenderer(), 10, false) {

            // trick to force the palette to have at least one selected elements
            // tried with a nicer validator but it's not used at all, the required thing
            // instead is working (don't know why...)
            protected Recorder newRecorderComponent() {
View Full Code Here

     * @param userModel
     * @return
     */
    Palette rolesPalette(final IModel choiceModel) {
        return new Palette("roles", choiceModel, new Model((Serializable) roles),
                new SimpleChoiceRenderer(), 10, false) {

            // trick to force the palette to have at least one selected elements
            // tried with a nicer validator but it's not used at all, the required thing
            // instead is working (don't know why...)
            protected Recorder newRecorderComponent() {
View Full Code Here

        add(new DropDownChoice("defaultInterpolationMethod", new PropertyModel(coverage, "defaultInterpolationMethod"),
               new WCSInterpolationModel()));
        Palette interpolationMethods = new Palette("interpolationMethods", LiveCollectionModel
                .list(new PropertyModel(coverage, "interpolationMethods")),
                new WCSInterpolationModel(), new SimpleChoiceRenderer(), 7, false) {
            /**
             * Override otherwise the header is not i18n'ized
             */
            @Override
            public Component newSelectedHeader(final String componentId) {
                return new Label(componentId, new ResourceModel(
                        "InterpolationMethodsPalette.selectedHeader"));
            }

            /**
             * Override otherwise the header is not i18n'ized
             */
            @Override
            public Component newAvailableHeader(final String componentId) {
                return new Label(componentId, new ResourceModel(
                        "InterpolationMethodsPalette.availableHeader"));
            }
        };
        add(interpolationMethods);

        // don't allow editing the native format
        TextField nativeFormat = new TextField("nativeFormat", new PropertyModel(coverage, "nativeFormat"));
        nativeFormat.setEnabled(false);
        add(nativeFormat);

        Palette formatPalette = new Palette("formatPalette", LiveCollectionModel
                .list(new PropertyModel(coverage, "supportedFormats")), new WCSFormatsModel(),
                new SimpleChoiceRenderer(), 10, false) {
            /**
             * Override otherwise the header is not i18n'ized
             */
            @Override
            public Component newSelectedHeader(final String componentId) {
View Full Code Here

        });



        add(palette = new Palette<String>("palette", model, choicesModel,
                new SimpleChoiceRenderer(), 10, false) {
            private static final long serialVersionUID = 1L;

            @Override
            protected Recorder<String> newRecorderComponent() {
                Recorder<String> rec = super.newRecorderComponent();
View Full Code Here

TOP

Related Classes of org.geoserver.web.wicket.SimpleChoiceRenderer

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.