Package org.geoserver.web.wicket

Examples of org.geoserver.web.wicket.ImageAjaxLink


        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


        public PositionPanel( String id, LayerGroupEntry entry ) {
            super( id );
            this.entry = entry;
           
            if ( items.indexOf( entry ) > 0 ) {
                ImageAjaxLink upLink = new ImageAjaxLink( "up", new ResourceReference( getClass(), "../../img/icons/silk/arrow_up.png") ) {
                    @Override
                    protected void onClick(AjaxRequestTarget target) {
                        int index = items.indexOf( PositionPanel.this.entry );
                        items.remove( index );
                        items.add( index-1, PositionPanel.this.entry );
                        target.addComponent( layerTable );
                    }
                };
                upLink.getImage().add(new AttributeModifier("alt", true, new ParamResourceModel("up", upLink)));
                add( upLink);
            }
            else {
                ImageAjaxLink blankLink = new ImageAjaxLink( "up", new ResourceReference( getClass(), "../../img/icons/blank.png") ) {
                    @Override
                    protected void onClick(AjaxRequestTarget target) {
                    }
                };
                blankLink.getImage().add(new AttributeModifier("alt", true, new Model("")));
                add(blankLink);
            }
           
            if ( items.indexOf( entry ) < items.size() - 1 ) {
                ImageAjaxLink downLink = new ImageAjaxLink( "down", new ResourceReference( getClass(), "../../img/icons/silk/arrow_down.png") ) {
                    @Override
                    protected void onClick(AjaxRequestTarget target) {
                        int index = items.indexOf( PositionPanel.this.entry );
                        items.remove( index );
                        items.add( index+1, PositionPanel.this.entry );
                        target.addComponent( layerTable );
                    }
                };
                downLink.getImage().add(new AttributeModifier("alt", true, new ParamResourceModel("down", downLink)));
                add( downLink);
            }
            else {
                ImageAjaxLink blankLink = new ImageAjaxLink( "down", new ResourceReference( getClass(), "../../img/icons/blank.png") ) {
                    @Override
                    protected void onClick(AjaxRequestTarget target) {
                       
                    }
                };
                blankLink.getImage().add(new AttributeModifier("alt", true, new Model("")));
                add( blankLink);
            }
        }
View Full Code Here

    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

        public PositionPanel( String id, LayerGroupEntry entry ) {
            super( id );
            this.entry = entry;
           
            if ( items.indexOf( entry ) > 0 ) {
                ImageAjaxLink upLink = new ImageAjaxLink( "up", new ResourceReference( getClass(), "../../img/icons/silk/arrow_up.png") ) {
                    @Override
                    protected void onClick(AjaxRequestTarget target) {
                        int index = items.indexOf( PositionPanel.this.entry );
                        items.remove( index );
                        items.add( index-1, PositionPanel.this.entry );
                        target.addComponent( layerTable );
                    }
                };
                upLink.getImage().add(new AttributeModifier("alt", true, new ParamResourceModel("up", upLink)));
                add( upLink);
            }
            else {
                ImageAjaxLink blankLink = new ImageAjaxLink( "up", new ResourceReference( getClass(), "../../img/icons/blank.png") ) {
                    @Override
                    protected void onClick(AjaxRequestTarget target) {
                    }
                };
                blankLink.getImage().add(new AttributeModifier("alt", true, new Model("")));
                add(blankLink);
            }
           
            if ( items.indexOf( entry ) < items.size() - 1 ) {
                ImageAjaxLink downLink = new ImageAjaxLink( "down", new ResourceReference( getClass(), "../../img/icons/silk/arrow_down.png") ) {
                    @Override
                    protected void onClick(AjaxRequestTarget target) {
                        int index = items.indexOf( PositionPanel.this.entry );
                        items.remove( index );
                        items.add( index+1, PositionPanel.this.entry );
                        target.addComponent( layerTable );
                    }
                };
                downLink.getImage().add(new AttributeModifier("alt", true, new ParamResourceModel("down", downLink)));
                add( downLink);
            }
            else {
                ImageAjaxLink blankLink = new ImageAjaxLink( "down", new ResourceReference( getClass(), "../../img/icons/blank.png") ) {
                    @Override
                    protected void onClick(AjaxRequestTarget target) {
                       
                    }
                };
                blankLink.getImage().add(new AttributeModifier("alt", true, new Model("")));
                add( blankLink);
            }
        }
View Full Code Here

        return link;
    }

    Component removeLink(String id, IModel itemModel) {
        final AggregateTypeConfiguration entry = (AggregateTypeConfiguration) itemModel.getObject();
        ImageAjaxLink link = new ImageAjaxLink( id, new ResourceReference( GeoServerApplication.class, "img/icons/silk/delete.png") ) {
            @Override
            protected void onClick(AjaxRequestTarget target) {
               
                configs.remove( entry );
                target.addComponent( configTable );
            }
           
            @Override
            protected IAjaxCallDecorator getAjaxCallDecorator() {
                return new AjaxPreprocessingCallDecorator(null) {

                    @Override
                    public CharSequence preDecorateScript(CharSequence script) {
                        String msg = new ParamResourceModel("confirmTypeRemoval",
                                AggregateStoreEditPanel.this, entry.getName()).getString();
                        return "if(!confirm('" + msg +"')) return false;" + script;
                    }
                };
            }
        };
        link.getImage().add(new AttributeModifier("alt", true, new ParamResourceModel("AggregateStoreEditPanel.th.remove", link)));
        return link;
    }
View Full Code Here

        return link;
    }
   
    Component removeLink(String id, IModel itemModel) {
        final EoLayerGroupEntry entry = (EoLayerGroupEntry) itemModel.getObject();
        ImageAjaxLink link = new ImageAjaxLink( id, new ResourceReference( LayerGroupEntryPanel.class, "../../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

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

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

                //final Component subForm = new Label("subform", "Blah");
                item.add(subForm);
               
                final Component removeLink;

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

                    @Override
                    protected void onClick(AjaxRequestTarget target) {
                        List<ParameterFilter> list;
View Full Code Here

                // gridSetBounds.setModel(new Model<ReferencedEnvelope>(new ReferencedEnvelope()));
                gridSetBounds = new Label("bounds", new ResourceModel(
                        "GridSubsetsEditor.bounds.dynamic"));
                item.add(gridSetBounds);

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

                    @Override
                    protected void onClick(AjaxRequestTarget target) {
                        List<XMLGridSubset> list;
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.