Package org.geoserver.web

Examples of org.geoserver.web.ComponentBuilder


    }
   
    public void testNew() {
        final LayerInfo layer = getCatalog().getFactory().createLayer();
        layer.setResource(getCatalog().getFactory().createFeatureType());
        FormTestPage page = new FormTestPage(new ComponentBuilder() {

            public Component buildComponent(String id) {
                return new WMSLayerConfig(id, new Model(layer));
            }
        }
View Full Code Here


import org.geoserver.web.GeoServerWicketTestSupport;

public class ConfirmRemovalPanelTest extends GeoServerWicketTestSupport {

    void setupPanel(final CatalogInfo... roots) {
        tester.startPage(new FormTestPage(new ComponentBuilder() {
           
            public Component buildComponent(String id) {
                return new ConfirmRemovalPanel(id, roots);
            }
        }));
View Full Code Here

public class EnvelopePanelTest extends GeoServerWicketTestSupport {

    public void testEditPlain() throws Exception {
        final ReferencedEnvelope e = new ReferencedEnvelope(-180,180,-90,90, DefaultGeographicCRS.WGS84);
        tester.startPage(new FormTestPage(new ComponentBuilder() {
       
            public Component buildComponent(String id) {
                return new EnvelopePanel(id, e);
            }
        }));
View Full Code Here

   
    public void testEditCRS() throws Exception {
        CoordinateReferenceSystem epsg4326 = CRS.decode("EPSG:4326", true);
        CoordinateReferenceSystem epsg4140 = CRS.decode("EPSG:4140", true);
        final ReferencedEnvelope e = new ReferencedEnvelope(-180,180,-90,90, epsg4326);
        tester.startPage(new FormTestPage(new ComponentBuilder() {
       
            public Component buildComponent(String id) {
                EnvelopePanel panel = new EnvelopePanel(id, e);
                panel.setCRSFieldVisible(true);
                return panel;
View Full Code Here

@SuppressWarnings("serial")
public class AttributionLayerConfigTest extends GeoServerWicketTestSupport {
   
    public void testExisting() {
        final LayerInfo layer = getCatalog().getLayerByName(MockData.PONDS.getLocalPart());
        FormTestPage page = new FormTestPage(new ComponentBuilder() {

            public Component buildComponent(String id) {
                return new AttributionLayerConfigPanel(id, new Model(layer));
            }
        }
View Full Code Here

        initResourceSettings(tester);
        keywords = new ArrayList<String>();
        keywords.add("one");
        keywords.add("two");
        keywords.add("three");
        tester.startPage(new FormTestPage(new ComponentBuilder() {
       
            public Component buildComponent(String id) {
                return new KeywordsEditor(id, new Model(keywords));
            }
        }));
View Full Code Here

    protected void setUp() throws Exception {
        tester = new WicketTester();
    }
   
    public void testBasicTable() throws Exception {
        tester.startPage(new FormTestPage(new ComponentBuilder() {
       
            public Component buildComponent(String id) {
                return new IntegerTable(id, false);
            }
        }));
View Full Code Here

        DataView dv = (DataView) tester.getComponentFromLastRenderedPage("form:panel:listContainer:items");
        assertEquals(10, dv.size());
    }
   
    public void testFullSelection() throws Exception {
        tester.startPage(new FormTestPage(new ComponentBuilder() {
           
            public Component buildComponent(String id) {
                return new IntegerTable(id, true);
            }
        }));
View Full Code Here

        table.setSelection(false);
        assertEquals(0, table.getSelection().size());
    }
   
    public void testSingleSelection() throws Exception {
        tester.startPage(new FormTestPage(new ComponentBuilder() {
           
            public Component buildComponent(String id) {
                return new IntegerTable(id, true);
            }
        }));
View Full Code Here

        two = new File(child, "two.sld");
        two.createNewFile();
    }
   
    public void setupChooser(final File file) {
        tester.startPage(new FormTestPage(new ComponentBuilder() {
           
            public Component buildComponent(String id) {
                return new GeoServerFileChooser(id, new Model(file));
            }
        }));
View Full Code Here

TOP

Related Classes of org.geoserver.web.ComponentBuilder

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.