Package com.vaadin.ui

Examples of com.vaadin.ui.Embedded.addStyleName()


                new FlagSeResource());
        main.addComponent(appResourceTest);
        Embedded specialNameResourceTest = new Embedded(
                "Test ApplicationResources with special names",
                new SpecialNameResource());
        specialNameResourceTest.addStyleName("hugeBorder");
        main.addComponent(specialNameResourceTest);

        userInfo.setCaption("User info");
        userInfo.setContentMode(ContentMode.PREFORMATTED);
        main.addComponent(userInfo);
View Full Code Here


 
  public Component generateCell(Table source, Object itemId, Object columnId) {
    Embedded embedded = new Embedded(null, image);
   
    if (clickListener != null) {
      embedded.addStyleName(ExplorerLayout.STYLE_CLICKABLE);
      embedded.setData(itemId);
      embedded.addListener(clickListener);
    }
   
    return embedded;
View Full Code Here

      if(picture != null) {
        Resource imageResource = new StreamResource(new InputStreamStreamSource(picture.getInputStream()),
          userName + picture.getMimeType(), ExplorerApp.get());
       
        Embedded image = new Embedded(null, imageResource);
        image.addStyleName(ExplorerLayout.STYLE_CLICKABLE);
        image.setType(Embedded.TYPE_IMAGE);
        image.setHeight(30, Embedded.UNITS_PIXELS);
        image.setWidth(30, Embedded.UNITS_PIXELS);
        image.addListener(new MouseEvents.ClickListener() {
          private static final long serialVersionUID = 7341560240277898495L;
View Full Code Here

      if(picture != null) {
        Resource imageResource = new StreamResource(new InputStreamStreamSource(picture.getInputStream()),
          userName + picture.getMimeType(), ExplorerApp.get());
       
        Embedded image = new Embedded(null, imageResource);
        image.addStyleName(ExplorerLayout.STYLE_CLICKABLE);
        image.setType(Embedded.TYPE_IMAGE);
        image.setHeight(30, Embedded.UNITS_PIXELS);
        image.setWidth(30, Embedded.UNITS_PIXELS);
        image.addListener(new MouseEvents.ClickListener() {
          private static final long serialVersionUID = 7341560240277898495L;
View Full Code Here

        addItemProperty("email", new ObjectProperty<String>(user.getEmail(), String.class));
      }
     
      // Delete
      Embedded deleteIcon = new Embedded(null, Images.DELETE);
      deleteIcon.addStyleName(ExplorerLayout.STYLE_CLICKABLE);
      deleteIcon.addListener(new DeleteMembershipListener(identityService, user.getId(), groupId, memberShipChangeListener));
      addItemProperty("actions", new ObjectProperty<Embedded>(deleteIcon, Embedded.class));
    }
   
  }
View Full Code Here

   
    Embedded picture = new Embedded(null, imageresource);
    picture.setType(Embedded.TYPE_IMAGE);
    picture.setHeight(200, UNITS_PIXELS);
    picture.setWidth(200, UNITS_PIXELS);
    picture.addStyleName(ExplorerLayout.STYLE_PROFILE_PICTURE);
   
    imageLayout.addComponent(picture);
    imageLayout.setWidth(picture.getWidth() + 5, picture.getWidthUnits());
   
    // Change picture button
View Full Code Here

    }
   
    authorPicture.setType(Embedded.TYPE_IMAGE);
    authorPicture.setHeight("48px");
    authorPicture.setWidth("48px");
    authorPicture.addStyleName(ExplorerLayout.STYLE_TASK_EVENT_PICTURE);
    eventGrid.addComponent(authorPicture);
  }
 
  protected void addTaskEventText(final org.activiti.engine.task.Event taskEvent, final GridLayout eventGrid) {
    VerticalLayout layout = new VerticalLayout();
View Full Code Here

      if (group.getType() != null) {
        addItemProperty("type", new ObjectProperty<String>(group.getType(), String.class));
      }
     
      Embedded deleteIcon = new Embedded(null, Images.DELETE);
      deleteIcon.addStyleName(ExplorerLayout.STYLE_CLICKABLE);
      deleteIcon.addListener(new DeleteMembershipListener(identityService, userId, group.getId(), userDetailPanel));
      addItemProperty("actions", new ObjectProperty<Embedded>(deleteIcon, Embedded.class));
    }
   
  }
View Full Code Here

      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);
    }
   
    if(!table.getItemIds().isEmpty()) {
View Full Code Here

        subTaskLayout.setComponentAlignment(subTaskLink, Alignment.MIDDLE_LEFT);
       
        if(subTask.getEndTime() == null) {
          // Delete icon only appears when task is not finished yet
          Embedded deleteIcon = new Embedded(null, Images.DELETE);
          deleteIcon.addStyleName(ExplorerLayout.STYLE_CLICKABLE);
          deleteIcon.addListener(new DeleteSubTaskClickListener(subTask, this));
          subTaskLayout.addComponent(deleteIcon);
          subTaskLayout.setComponentAlignment(deleteIcon, Alignment.MIDDLE_RIGHT);
        } else {
          // Next line of grid
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.