Examples of ImageItem


Examples of com.pegaa.uploader.ui.filelist.item.ImageItem

    }

    private ListItem createListItem(File f)
    {
         if(this.policy.getPolicyType() == ImageUploadPolicy.POLICY_TYPE_IMG){
             return new ImageItem(this.configHolder, f);
         }else{
             return new FileItem(this.configHolder, f);
         }
    }
View Full Code Here

Examples of com.pegaa.uploader.ui.filelist.item.ImageItem

        int curIndex = 0;
        int len = this.listItemUIs.size();
        while(this.cancelLoading != true && curIndex<len)
        {
                ListItem item = this.listItemUIs.get(curIndex).getItem();
                ImageItem imgItem = (ImageItem)item;
                imgItem.init();
                curIndex++;
        }
       
    }
View Full Code Here

Examples of com.pegaa.uploader.ui.filelist.item.ImageItem

        BufferedImage image = null;
        ByteArrayOutputStream baos = null;
        ByteArrayInputStream bais = null;
        InputStreamInfo info = null;

        ImageItem imgItem = (ImageItem) item;

        try {
            image = javax.imageio.ImageIO.read(item.getFile());

            //Raz - modify this to send out the filename in an overloaded
            //function of getScaledImageAndRotated
            //in com.pegaa.uploader.tools.ImageFuncs
            File rtmpf = item.getFile();
            String rfilename = rtmpf.getName();
            String rext = rfilename.substring(rfilename.lastIndexOf('.') + 1, rfilename.length());

            image = getScaledImageAndRotated(image, imgItem.getRotationStatus(), rext);

            baos = ImageFuncs.createImageOutputStream(image, rext);

            byte[] resultImageAsRawBytes = baos.toByteArray();
            bais = new ByteArrayInputStream(resultImageAsRawBytes, 0, resultImageAsRawBytes.length);
View Full Code Here

Examples of entity.ImageItem

        PreparedQuery pq = ds.prepare(query);
        List<Entity> results = pq.asList(FetchOptions.Builder.withLimit(number).offset(offset));
        List<ImageItem> ret = new ArrayList<ImageItem>();
        for(Entity e: results)
        {
            ret.add(new ImageItem(e));
        }
        //System.out.println("Have " + ret.size());
        return ret;
    }
View Full Code Here

Examples of entity.ImageItem

    }
     
    List<ImageItem> itemList = new ArrayList<ImageItem>();
 
    for (Entity e : duelingList) {
      itemList.add(new ImageItem(e));
    }
 
    return itemList;
  }
View Full Code Here

Examples of entity.ImageItem

    }
     
    List<ImageItem> itemList = new ArrayList<ImageItem>();
 
    for (Entity e : randomItemList) {
      itemList.add(new ImageItem(e));
    }
 
    return itemList;
  }
View Full Code Here

Examples of entity.ImageItem

      }
    }
     
    List<ImageItem> itemList = new ArrayList<ImageItem>();
    for (Entity e : randomItemList) {
      itemList.add(new ImageItem(e));
    }
 
    return itemList;
  }
View Full Code Here

Examples of entity.ImageItem

    }
   
    List<ImageItem> itemList = new ArrayList<ImageItem>();
    for (Entity e : randomItemList) {
      itemList.add(new ImageItem(e));
    }
   
    return itemList;
  }
View Full Code Here

Examples of entity.ImageItem

   
    if (batchNum == 1) {
      for (int kk = 0; kk < 40; kk++) {
        String[] item = itemData.get(kk);
        try {
          itemArray[kk] = new ImageItem(
              item[0],
              item[1],
              item[2],
              item[3].contains("cat") ? true : false,
              item[3].contains("dog") ? true : false,
              item[3].contains("bird") ? true : false,
              item[3].contains("pets") ? true : false,
              item[3].contains("wildlife") ? true : false,
              item[3].contains("human") ? true : false,         
              item[4] == "" ? 1500 : Integer.parseInt(item[4]),
              item[5] == "" ? 1 : Integer.parseInt(item[5]),
              item[6]
              )
        } catch(Exception e){
          System.out.println("warning: error in index " + kk);
        }     
      }
    } else if (batchNum == 2) {
      for (int kk = 40; kk < 80; kk++) {
        String[] item = itemData.get(kk);
        try {
          itemArray[kk] = new ImageItem(
              item[0],
              item[1],
              item[2],
              item[3].contains("cat") ? true : false,
              item[3].contains("dog") ? true : false,
              item[3].contains("bird") ? true : false,
              item[3].contains("pets") ? true : false,
              item[3].contains("wildlife") ? true : false,
              item[3].contains("human") ? true : false,         
              item[4] == "" ? 1500 : Integer.parseInt(item[4]),
              item[5] == "" ? 1 : Integer.parseInt(item[5]),
              item[6]
              )
        } catch(Exception e){
          System.out.println("warning: error in index " + kk);
        }     
      }
    } else if (batchNum == 3) {
      for (int kk = 80; kk < 120; kk++) {
        String[] item = itemData.get(kk);
        try {
          itemArray[kk] = new ImageItem(
              item[0],
              item[1],
              item[2],
              item[3].contains("cat") ? true : false,
              item[3].contains("dog") ? true : false,
              item[3].contains("bird") ? true : false,
              item[3].contains("pets") ? true : false,
              item[3].contains("wildlife") ? true : false,
              item[3].contains("human") ? true : false,         
              item[4] == "" ? 1500 : Integer.parseInt(item[4]),
              item[5] == "" ? 1 : Integer.parseInt(item[5]),
              item[6]
              )
        } catch(Exception e){
          System.out.println("warning: error in index " + kk);
        }     
      }
    } else if (batchNum == 4) {
      for (int kk = 120; kk < 152; kk++) {
        String[] item = itemData.get(kk);
        try {
          itemArray[kk] = new ImageItem(
              item[0],
              item[1],
              item[2],
              item[3].contains("cat") ? true : false,
              item[3].contains("dog") ? true : false,
View Full Code Here

Examples of entity.ImageItem

      br = new BufferedReader(new FileReader(_filename));
      String line = null;
      String[] itemData = null;
      while ((line = br.readLine()) != null) {
        itemData = line.split(",");
        ImageItem anItem = new ImageItem(itemData[0],itemData[1]);
        anItem.save();
        }     
    } catch (FileNotFoundException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    } catch (IOException e) {
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.