Package org.geoserver.web.wicket

Examples of org.geoserver.web.wicket.ImageAjaxLink


    protected Component upDownFragment(String id, final AttributeDescription attribute) {
        Fragment upDown = new Fragment(id, "upDown", this);
        if (attributesProvider.isFirst(attribute)) {
            upDown.add(new PlaceholderLink("up"));
        } else {
            ImageAjaxLink upLink = new ImageAjaxLink("up", new ResourceReference(getClass(),
                    "../../img/icons/silk/arrow_up.png")) {
                @Override
                protected void onClick(AjaxRequestTarget target) {
                    attributesProvider.moveUp(attribute);
                    target.addComponent(form);
                }
            };
            upDown.add(upLink);
        }

        if (attributesProvider.isLast(attribute)) {
            upDown.add(new PlaceholderLink("down"));
        } else {
            ImageAjaxLink downLink = new ImageAjaxLink("down", new ResourceReference(getClass(),
                    "../../img/icons/silk/arrow_down.png")) {
                @Override
                protected void onClick(AjaxRequestTarget target) {
                    attributesProvider.moveDown(attribute);
                    target.addComponent(form);
View Full Code Here


        return link;
    }
   
    Component removeLink(String id, IModel itemModel) {
        final LayerGroupEntry entry = (LayerGroupEntry) itemModel.getObject();
        ImageAjaxLink link = new ImageAjaxLink( id, new ResourceReference( getClass(), "../../img/icons/silk/delete.png") ) {
            @Override
            protected void onClick(AjaxRequestTarget target) {
               
                items.remove( entry );
                target.addComponent( layerTable );
            }
        };
        link.getImage().add(new AttributeModifier("alt", true, new ParamResourceModel("AbstractLayerGroupPage.th.remove", link)));
        return link;
    }
View Full Code Here

                // remove link
                if (TileMatrixSetEditor.this.readOnly) {
                    removeLink = new Label("removeLink", "");
                } else {
                    removeLink = new ImageAjaxLink("removeLink", GWCIconFactory.DELETE_ICON) {
                        private static final long serialVersionUID = 1L;

                        @Override
                        protected void onClick(AjaxRequestTarget target) {
                            List<Grid> list = new ArrayList<Grid>(grids.getModelObject());
View Full Code Here

        }

        @Override
        protected Component actionLink(final String id, String gridSetName) {

            Component removeLink = new ImageAjaxLink(id, GWCIconFactory.DELETE_ICON) {
                private static final long serialVersionUID = 1L;

                /**
                 * Removes the selected item from the provider's model
                 */
                @Override
                protected void onClick(AjaxRequestTarget target) {
                    final String gridsetName = getDefaultModelObjectAsString();
                    List<String> selection = DefaultGridsetsEditor.this.selection.getObject();
                    selection.remove(gridsetName);
                    List<String> choices = new ArrayList<String>(availableGridSets.getChoices());
                    choices.add(gridsetName);
                    Collections.sort(choices);
                    availableGridSets.setChoices(choices);
                    target.addComponent(defaultGridsetsTable);
                    target.addComponent(availableGridSets);
                }
            };
            removeLink.setDefaultModel(new Model<String>(gridSetName));

            return removeLink;
        }
View Full Code Here

   
    Component removeLink(String id, IModel itemModel) {
        final RequestFilterChain chain = (RequestFilterChain) itemModel.getObject();
       
        if (chain.canBeRemoved()==false) {
            ImageAjaxLink blankLink = new ImageAjaxLink( id, new ResourceReference( getClass(), "../img/icons/blank.png") ) {
                @Override
                protected void onClick(AjaxRequestTarget target) {
                }
            };
            blankLink.getImage().add(new AttributeModifier("alt", true, new Model("")));
            add(blankLink);
            return blankLink;
        }
       
        ImageAjaxLink link = new ImageAjaxLink( id, new ResourceReference( getClass(), "../img/icons/silk/delete.png") ) {
            @Override
            protected void onClick(AjaxRequestTarget target) {               
                secMgrConfig.getFilterChain().getRequestChains().remove( chain );
                target.addComponent( tablePanel );
            }
        };
        link.getImage().add(new AttributeModifier("alt", true, new ParamResourceModel("AbstractLayerGroupPage.th.remove", link)));
        return link;
    }
View Full Code Here

        public PositionPanel( String id, final RequestFilterChain chain ) {
            super( id );
            this.theChain = chain;
            this.setOutputMarkupId(true);
           
            upLink = new ImageAjaxLink( "up", new ResourceReference( getClass(), "../img/icons/silk/arrow_up.png") ) {                                                                                      
                @Override
                protected void onClick(AjaxRequestTarget target) {
                    int index = getChains().indexOf( PositionPanel.this.theChain );
                    getChains().remove( index );
                    getChains().add(Math.max(0, index - 1), PositionPanel.this.theChain);
                    target.addComponent( tablePanel );
                    target.addComponent(this);
                    target.addComponent(downLink);  
                    target.addComponent(upLink);                   
                }
               
                @Override
                protected void onComponentTag(ComponentTag tag) {
                    if ( getChains().indexOf( theChain ) == 0 ) {
                        tag.put("style", "visibility:hidden");
                    } else {
                        tag.put("style", "visibility:visible");
                    }
                }
            };
            upLink.getImage().add(new AttributeModifier("alt", true, new ParamResourceModel("SecurityFilterChainsPanel.th.up", upLink)));
            upLink.setOutputMarkupId(true);
            add( upLink);           

            downLink = new ImageAjaxLink( "down", new ResourceReference( getClass(), "../img/icons/silk/arrow_down.png") ) {
                @Override
                protected void onClick(AjaxRequestTarget target) {
                    int index = getChains().indexOf( PositionPanel.this.theChain );
                    getChains().remove( index );
                    getChains().add(Math.min(getChains().size(), index + 1), PositionPanel.this.theChain);
View Full Code Here

TOP

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

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.