Package org.geowebcache.grid

Examples of org.geowebcache.grid.GridSet


    }

    @Override
    protected GridSet load() {
        GridSetBroker gridSetBroker = GWC.get().getGridSetBroker();
        GridSet gridSet = gridSetBroker.get(name);
        return gridSet;
    }
View Full Code Here


        final Grid newGrid = new Grid();
        if (list.isEmpty()) {
            BoundingBox extent = new BoundingBox(bbox.getMinX(), bbox.getMinY(), bbox.getMaxX(),
                    bbox.getMaxY());
            final int levels = 1;
            GridSet tmpGridset = GridSetFactory.createGridSet("stub", SRS.getEPSG4326(), extent,
                    false, levels, 1D, GridSetFactory.DEFAULT_PIXEL_SIZE_METER, tileWidth,
                    tileHeight, false);
            Grid grid = tmpGridset.getGridLevels()[0];
            newGrid.setResolution(grid.getResolution());
            newGrid.setScaleDenominator(grid.getScaleDenominator());
        } else {
            Grid prev = list.get(list.size() - 1);
            newGrid.setResolution(prev.getResolution() / 2);
View Full Code Here

        if (gridSetName == null) {
            gridsetInfo = new GridSetInfo();
        } else {
            GridSetBroker gridSetBroker = GWC.get().getGridSetBroker();
            GridSet gridSet = gridSetBroker.get(gridSetName);
            if (gridSet == null) {
                throw new IllegalArgumentException("Requested GridSet does not exist: '"
                        + gridSetName + "'");
            }

            final String name = gridSet.getName();
            final boolean internal = GWC.get().isInternalGridSet(name);

            gridsetInfo = new GridSetInfo(gridSet, internal);
        }
        return gridsetInfo;
View Full Code Here

            }
            final GridSetBroker gridSetBroker = GWC.get().getGridSetBroker();
            if (previousName != null) {
                gridSetBroker.get(previousName);
            }
            GridSet gridSet = gridSetBroker.get(name);
            if (gridSet != null) {
                error(validatable, "gridSetAlreadyExists",
                        Collections.singletonMap("name", (Object) name));
            }
        }
View Full Code Here

        final double pixelSize = GridSetFactory.DEFAULT_PIXEL_SIZE_METER;
        final int tileWidth = info.getTileWidth();
        final int tileHeight = info.getTileHeight();
        final boolean yCoordinateFirst = false;

        GridSet gridSet = GridSetFactory.createGridSet(name, srs, extent, alignTopLeft,
                resolutions, scaleDenoms, metersPerUnit, pixelSize, scaleNames, tileWidth,
                tileHeight, yCoordinateFirst);

        gridSet.setDescription(info.getDescription());

        return gridSet;
    }
View Full Code Here

    @Override
    protected void onSave(AjaxRequestTarget target, Form<?> form) {
        GridSetInfo info = (GridSetInfo) form.getModelObject();

        GridSet gridset;
        try {
            gridset = GridSetBuilder.build(info);
        } catch (IllegalStateException e) {
            form.error(e.getMessage());
            target.addComponent(form);
View Full Code Here

    @Override
    protected Component getComponentForProperty(final String id, final IModel itemModel,
            final Property<GridSet> property) {

        if (property == GridSetTableProvider.NAME) {
            GridSet gridSet = (GridSet) itemModel.getObject();
            return nameLink(id, gridSet);

        } else if (property == GridSetTableProvider.EPSG_CODE) {

            String epsgCode = (String) property.getModel(itemModel).getObject();
View Full Code Here

     */
    @Override
    protected CheckBox selectOneCheckbox(Item item) {
        CheckBox cb = super.selectOneCheckbox(item);

        GridSet gs = (GridSet) item.getModelObject();

        String name = gs.getName();
        final boolean internal = GWC.get().isInternalGridSet(name);
        if (internal) {
            cb.setEnabled(false);
            cb.setModelObject(Boolean.FALSE);
        }
View Full Code Here

     */
    @Override
    public List<GridSet> getSelection() {
        List<GridSet> selection = new ArrayList<GridSet>(super.getSelection());
        for (Iterator<GridSet> it = selection.iterator(); it.hasNext();) {
            GridSet g = it.next();
            if (GWC.get().isInternalGridSet(g.getName())) {
                it.remove();
            }
        }
        return selection;
    }
View Full Code Here

    protected void onSave(AjaxRequestTarget target, Form<?> form) {
        GridSetInfo info = (GridSetInfo) form.getModelObject();

        GWC gwc = GWC.get();

        final GridSet newGridset;
        try {
            newGridset = GridSetBuilder.build(info);
        } catch (IllegalStateException e) {
            form.error(e.getMessage());
            target.addComponent(form);
View Full Code Here

TOP

Related Classes of org.geowebcache.grid.GridSet

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.