Examples of Photo


Examples of BusinessObjects.Photo

      currentAvis.setActiviteID(attributes.getValue("ActiviteID"));
      currentAvis.setUserID(attributes.getValue("UserID"));
    }
   
    if (localName.equals("photo")){
      currentPhoto = new Photo();
     
      currentPhoto.setPhotoID(Integer.parseInt(attributes.getValue("PhotoID")));
    }
   
    if (localName.equals("ID")){
View Full Code Here

Examples of Java.Photo

        if(page > photos.size()/pageItems) {page = needed;}
        if(page < 1) {page = 1;}
        max = (page*(pageItems-1)+page);
        int i;
        for(i = max-pageItems; i < photos.size() && i < max; i++) {
            Photo p = photos.get(i);
            out.print("<div class='container'>");
            out.print("<div class='img' onclick='photoClick(" + p.getNo() + ")'>");
            out.print("<img src='ServletGetImage?photo=" + p.getNo() + "'>");
            out.print("</div>");
            out.print("<input type='button' id='btn" + p.getNo() + "' onclick='like(" + p.getNo() + ")' value='" + liked("" + p.getNo()) + "' style='margin: 0px;'/>");
            out.print("<b>" + p.getRating() + " likes</b>");
            out.print("</div>");
        }
        return i;
    }
View Full Code Here

Examples of br.com.visualmidia.business.Photo

    }
   
    public Photo getPhoto() {
        if (image == null)
            return null;
        return new Photo(image);
    }
View Full Code Here

Examples of cloudinary.models.Photo

        if (result.hasErrors()){
            model.addAttribute("photoUpload", photoUpload);
            return "upload_form";
        } else {
            Photo photo = new Photo();
            photo.setTitle(photoUpload.getTitle());
            photo.setUpload(photoUpload);
            model.addAttribute("upload", uploadResult);
            photoRepository.save(photo);
            model.addAttribute("photo", photo);
            return "upload";
        }
View Full Code Here

Examples of com.aetrion.flickr.photos.Photo

        PhotoContext photoContext = new PhotoContext();
        while (iter.hasNext()) {
            Element element = (Element) iter.next();
            String elementName = element.getTagName();
            if (elementName.equals("prevphoto")) {
                Photo photo = new Photo();
                photo.setId(element.getAttribute("id"));
                photoContext.setPreviousPhoto(photo);
            } else if (elementName.equals("nextphoto")) {
                Photo photo = new Photo();
                photo.setId(element.getAttribute("id"));
                photoContext.setNextPhoto(photo);
            } else {
                System.err.println("unsupported element name: " + elementName);
            }
        }
View Full Code Here

Examples of com.denisk.appengine.nl.client.thirdparty.com.reveregroup.carousel.client.Photo

          final ArrayList<Photo> photos = new ArrayList<Photo>(goods
              .length());
          for (int i = 0; i < goods.length(); i++) {
            GoodJavascriptObject good = goods.get(i);
            String imageUrl = getImageUrl(good.getImageBlobKey(), 600, 600);
            Photo photo = new Photo(imageUrl, good.getName(), good
                .getDescription(), good.getKeyStr());
            photos.add(photo);
          }
          parent.getDtoService().isAdmin(new AsyncCallback<UserStatus>() {

            @Override
            public void onSuccess(UserStatus result) {
              if (UserStatus.ADMIN == result) {
                for (int i = 0; i < photos.size(); i++) {
                  Photo photo = photos.get(i);
                  GoodJavascriptObject good = goods.get(i);

                  photo.setEditClickHandler(getEditClickHandler(
                      good, editGoodForm));
                  photo.setDeleteClickHandler(getDeleteClickHandler(
                      good, goodDeletion));
                }
              }
            }
View Full Code Here

Examples of com.extjs.gxt.samples.client.examples.model.Photo

        return o1.getName().compareTo(o2.getName());
      }
    });

    for (File pic : pics) {
      Photo photo = new Photo();
      photo.setName(pic.getName());
      photo.setDate(new Date(pic.lastModified()));
      photo.setSize(pic.length());
      photo.setPath("samples/images/photos/" + pic.getName());
      photos.add(photo);
    }
  }
View Full Code Here

Examples of com.extjs.gxt.samples.client.examples.model.Photo

    loader.load();

    ListView<BeanModel> view = new ListView<BeanModel>() {
      @Override
      protected BeanModel prepareData(BeanModel model) {
        Photo photo = model.getBean();
        long size = photo.getSize() / 1000;
        model.set("shortName", Format.ellipse(photo.getName(), 15));
        model.set("sizeString", NumberFormat.getFormat("#0").format(size) + "k");
        model.set("dateString", DateTimeFormat.getMediumDateTimeFormat().format(photo.getDate()));
        model.set("path", GWT.getHostPageBaseURL() + photo.getPath())
        return model;
      }
    };
    view.setId("img-chooser-view");
    view.setTemplate(getTemplate());
View Full Code Here

Examples of com.extjs.gxt.samples.client.examples.model.Photo

    chooser.setHideOnButtonClick(true);
    chooser.addListener(Events.Hide, new Listener<WindowEvent>() {
      public void handleEvent(WindowEvent be) {
        BeanModel model = view.getSelectionModel().getSelectedItem();
        if (model != null) {
          Photo photo = model.getBean();
          if (be.getButtonClicked() == chooser.getButtonById("ok")) {
            image.setUrl(photo.getPath());
            image.setVisible(true);
          }
        }
      }
    });

    ContentPanel main = new ContentPanel();
    main.setBorders(true);
    main.setBodyBorder(false);
    main.setLayout(new FitLayout());
    main.setHeaderVisible(false);

    ToolBar bar = new ToolBar();
    bar.add(new LabelToolItem("Filter:"));

    StoreFilterField<BeanModel> field = new StoreFilterField<BeanModel>() {
      @Override
      protected boolean doSelect(Store<BeanModel> store, BeanModel parent, BeanModel record, String property,
          String filter) {
        Photo photo = record.getBean();
        String name = photo.getName().toLowerCase();
        if (name.indexOf(filter.toLowerCase()) != -1) {
          return true;
        }
        return false;
      }

      @Override
      protected void onFilter() {
        super.onFilter();
        view.getSelectionModel().select(0, false);
      }

    };
    field.setWidth(100);
    field.bind(store);

    bar.add(field);
    bar.add(new SeparatorToolItem());
    bar.add(new LabelToolItem("Sort By:"));

    sort = new SimpleComboBox<String>();
    sort.setTriggerAction(TriggerAction.ALL);
    sort.setEditable(false);
    sort.setForceSelection(true);
    sort.setWidth(90);
    sort.add("Name");
    sort.add("File Size");
    sort.add("Last Modified");
    sort.setSimpleValue("Name");
    sort.addListener(Events.Select, new Listener<FieldEvent>() {
      public void handleEvent(FieldEvent be) {
        sort();
      }
    });

    bar.add(sort);

    main.setTopComponent(bar);

    view = new ListView<BeanModel>() {
      @Override
      protected BeanModel prepareData(BeanModel model) {
        Photo photo = model.getBean();
        long size = photo.getSize() / 1000;
        model.set("shortName", Format.ellipse(photo.getName(), 15));
        model.set("sizeString", NumberFormat.getFormat("#0").format(size) + "k");
        model.set("dateString", DateTimeFormat.getMediumDateTimeFormat().format(photo.getDate()));
        model.set("modPath", GWT.getHostPageBaseURL() + photo.getPath());
        return model;
      }
    };
    view.setId("img-chooser-view");
    view.setTemplate(getTemplate());
View Full Code Here

Examples of com.freewebsys.sns.pojo.Photo

   */
  @Override
  @Transactional
  public void deletePhotoById(Integer id) throws PhotoException {
    try {
      Photo photo = (Photo) baseDao.findById(Photo.class, id);
      baseDao.delete(photo);
    } catch (Exception e) {
      throw new PhotoException("Photo删除异常");
    }
  }
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.