Package org.activiti.explorer.ui.content

Examples of org.activiti.explorer.ui.content.AttachmentRenderer


    return table;
  }

  protected void populateRelatedContent(Table table, List<Attachment> attachments) {
    for (Attachment attachment : attachments) {
      AttachmentRenderer renderer = attachmentRendererManager.getRenderer(attachment);
      Item attachmentItem = table.addItem(attachment.getId());
     
      // Simple renderer that just shows a popup window with the attachment
      RelatedContentComponent relatedContentComponent = new RelatedContentComponent() {
        public void showAttachmentDetail(Attachment attachment) {
          AttachmentDetailPopupWindow popup = new AttachmentDetailPopupWindow(attachment);
          ExplorerApp.get().getViewManager().showPopupWindow(popup);  
        }
      };
     
      attachmentItem.getItemProperty("name").setValue(renderer.getOverviewComponent(attachment, relatedContentComponent));
      attachmentItem.getItemProperty("type").setValue(new Embedded(null, renderer.getImage(attachment)));
    }
    table.setPageLength(table.size());
  }
View Full Code Here


    if (!attachments.isEmpty()) {
      table.setVisible(true);
    }
   
    for (Attachment attachment : attachments) {
      AttachmentRenderer renderer = attachmentRendererManager.getRenderer(attachment);
      Item attachmentItem = table.addItem(attachment.getId());
     
      // Simple renderer that just shows a popup window with the attachment
      RelatedContentComponent relatedContentComponent = new RelatedContentComponent() {
        public void showAttachmentDetail(Attachment attachment) {
          AttachmentDetailPopupWindow popup = new AttachmentDetailPopupWindow(attachment);
          ExplorerApp.get().getViewManager().showPopupWindow(popup);  
        }
      };
     
      attachmentItem.getItemProperty("name").setValue(renderer.getOverviewComponent(attachment, relatedContentComponent));
      attachmentItem.getItemProperty("type").setValue(new Embedded(null, renderer.getImage(attachment)));
    }
    table.setPageLength(table.size());
  }
View Full Code Here

    }
  }

  protected void addAttachmentsToTable(List<Attachment> attachments) {
    for (Attachment attachment : attachments) {
      AttachmentRenderer renderer = attachmentRendererManager.getRenderer(attachment);
      Item attachmentItem = table.addItem(attachment.getId());
      attachmentItem.getItemProperty("name").setValue(renderer.getOverviewComponent(attachment, this));
      attachmentItem.getItemProperty("type").setValue(new Embedded(null, renderer.getImage(attachment)));
     
      Embedded deleteButton = new Embedded(null, Images.DELETE);
      deleteButton.addStyleName(ExplorerLayout.STYLE_CLICKABLE);
      deleteButton.addListener((ClickListener) new DeleteClickedListener(attachment));
      attachmentItem.getItemProperty("delete").setValue(deleteButton);
View Full Code Here

    }
  }

  protected void addAttachmentsToTable(List<Attachment> attachments) {
    for (Attachment attachment : attachments) {
      AttachmentRenderer renderer = attachmentRendererManager.getRenderer(attachment);
      Item attachmentItem = table.addItem(attachment.getId());
      attachmentItem.getItemProperty("name").setValue(renderer.getOverviewComponent(attachment, this));
      attachmentItem.getItemProperty("type").setValue(new Embedded(null, renderer.getImage(attachment)));
     
      Embedded deleteButton = new Embedded(null, Images.DELETE);
      deleteButton.addStyleName(ExplorerLayout.STYLE_CLICKABLE);
      deleteButton.addListener((ClickListener) new DeleteClickedListener(attachment));
      attachmentItem.getItemProperty("delete").setValue(deleteButton);
View Full Code Here

TOP

Related Classes of org.activiti.explorer.ui.content.AttachmentRenderer

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.