Examples of ToolbarItem


Examples of com.cburch.draw.toolbar.ToolbarItem

    for (Tool tool : data.getContents()) {
      ++pos;
      if (tool == null) {
        newItems.add(new ToolbarSeparator(4));
      } else {
        ToolbarItem i = findItem(oldItems, tool);
        if (i == null) {
          newItems.add(new ToolItem(tool));
        } else {
          newItems.add(i);
        }
View Full Code Here

Examples of com.cburch.draw.toolbar.ToolbarItem

        for (Tool tool : data.getContents()) {
            ++pos;
            if (tool == null) {
                newItems.add(new ToolbarSeparator(4));
            } else {
                ToolbarItem i = findItem(oldItems, tool);
                if (i == null) {
                    newItems.add(new ToolItem(tool));
                } else {
                    newItems.add(i);
                }
View Full Code Here

Examples of com.gwtext.client.widgets.ToolbarItem

                                 if (feedURL != null) {
                                     tb.addFill();
                                     //System.err.println("Base: " + GWT.getModuleBaseURL());
                                     //System.err.println("URL: " + com.google.gwt.user.client.Window.Location.getHref());
                                    
                                     ToolbarItem item = new ToolbarItem(new HTML("<a href='" + feedURL + "' target='_blank'><img src='images/feed.png'/></a>").getElement());
                                     tb.addItem(item);
                                 }


                                 currentGrid.addGridRowListener( new GridRowListenerAdapter() {
View Full Code Here

Examples of com.gwtext.client.widgets.ToolbarItem

                                 if (feedURL != null) {
                                     tb.addFill();
                                     //System.err.println("Base: " + GWT.getModuleBaseURL());
                                     //System.err.println("URL: " + com.google.gwt.user.client.Window.Location.getHref());
                                    
                                     ToolbarItem item = new ToolbarItem(new HTML("<a href='" + feedURL + "' target='_blank'><img src='images/feed.png'/></a>").getElement());
                                     tb.addItem(item);
                                 }


                                 currentGrid.addGridRowListener( new GridRowListenerAdapter() {
View Full Code Here

Examples of com.gwtext.client.widgets.ToolbarItem

          String id = record.getAsString( "value" );
          onFolderSelected( getContactFolderById( id ) );
        }
      } );
      toolbar.addItem( new ToolbarItem( this.contactListCombo.getElement() ) );
    }
    else {
      this.folderNameItem = new ToolbarTextItem( "" );
      toolbar.addItem( this.folderNameItem );
    }
View Full Code Here

Examples of com.gwtext.client.widgets.ToolbarItem

                if ( feedURL != null ) {
                    tb.addFill();
                    //System.err.println("Base: " + GWT.getModuleBaseURL());
                    //System.err.println("URL: " + com.google.gwt.user.client.Window.Location.getHref());

                    ToolbarItem item = new ToolbarItem( new HTML(

                    Format.format( "<a href='{0}' target='_blank'><img src='{1}'/></a>", feedURL, new Image( images.feed() ).getUrl() ) ).getElement() );
                    tb.addItem( item );
                }
View Full Code Here

Examples of org.zeroexchange.web.components.toolbar.ToolbarItem

        Contract contract = (Contract) getDefaultModelObject();
       
        //'Add resource' link
        if(authorizedUserService.isUserLogged() &&
                contractStatusInformant.isContractModificationAllowed(contract)) {
            toolbarActions.add(new ToolbarItem() {
                private static final long serialVersionUID = 1L;

                @Override
                public Component getComponent(String componentId) {
                    return new LinkPanel(componentId, new ResourceModel(MKEY_ADD_RESOURCE)) {
View Full Code Here

Examples of org.zeroexchange.web.components.toolbar.ToolbarItem

        ListView<ToolbarItem> toolbar = new ListView<ToolbarItem>(componentId, itemsModel) {
            private static final long serialVersionUID = 1L;

            @Override
            protected void populateItem(ListItem<ToolbarItem> item) {
                ToolbarItem toolbarItem = item.getModelObject();
                toolbarItem.onAttach(item);
                item.add(toolbarItem.getComponent(CKEY_TOOLBAR_ITEM));
            }
           
        };
        toolbar.setOutputMarkupId(true);
        return toolbar;
View Full Code Here

Examples of org.zeroexchange.web.components.toolbar.ToolbarItem


        //'Remove Contract' item
        if(contract.getStatus() == ContractStatus.UNCOMPLETED &&
                currentUserId != null && contract.getOwner() != null && contract.getOwner().getId().equals(currentUserId)) {
            toolbarActions.add(new ToolbarItem() {
                private static final long serialVersionUID = 1L;

                @Override
                public Component getComponent(String componentId) {
                    return new LinkPanel(componentId, new ResourceModel(MKEY_CONTRACT_REMOVE)) {
                        private static final long serialVersionUID = 1L;
                        @Override
                        protected void onClick() {
                            //delete the current contract
                            Contract contract = getContract();
                            contractRemover.remove(contract.getId());
                           
                            //Go to contracts list.
                            setResponsePage(Collaboration.class);
                        }
                    };
                }
            });
        }

        //'Accept Contract' item
        if(contract.getStatus() == ContractStatus.READY &&
                contractStatusInformant.getContractStatus(contract, currentUserId) != ContractStatus.ACCEPTED &&
                !isUserDebtExceeded() &&
                contractInformant.isUserEffective(contract, currentUserId)) {
            toolbarActions.add(new ToolbarItem() {
                private static final long serialVersionUID = 1L;

                @Override
                public Component getComponent(String componentId) {
                    return new AjaxLinkPanel<Void>(componentId, new ResourceModel(MKEY_CONTRACT_ACCEPT)) {
                        private static final long serialVersionUID = 1L;
                        @Override
                        protected void onClick(AjaxRequestTarget target) {
                            //Mark the current contract as accepted
                           
                            Contract contract = getContract();
                            contract = contractWriter.accept(
                                    authorizedUserService.getCurrentUser(),
                                    contract);

                            eventsDispatcher.publishEvent(new ContractAccepted(contract,
                                    authorizedUserService.getCurrentUser()));

                            if(target != null) {
                                target.add(toolbar.getParent());
                                target.add(statusSign);
                            }
                        }
                   };
                }
            });
        }
       
        //'Cancel Acceptance' item
        if(contractPermissionsInformant.isContractCancelAcceptanceAllowed(
                contract)) {
            toolbarActions.add(new ToolbarItem() {
                private static final long serialVersionUID = 1L;

                @Override
                public Component getComponent(String componentId) {
                    return new AjaxLinkPanel<Void>(componentId, new ResourceModel(MKEY_CONTRACT_CANCEL_ACCEPT)) {
View Full Code Here

Examples of org.zeroexchange.web.components.toolbar.ToolbarItem

    @Override
    protected List<ToolbarItem> getToolbarItems() {
        List<ToolbarItem> items = super.getToolbarItems();
       
        // 'Delete' action
        items.add(new ToolbarItem() {
           
            private static final long serialVersionUID = 1L;

            @Override
            public Component getComponent(String componentId) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.