Package org.cfeclipse.cfml.images

Examples of org.cfeclipse.cfml.images.ItemGroup


      public void handleEvent(Event event) {
        final GalleryItem item = (GalleryItem) event.item;
        final GalleryItem parentItem = item.getParentItem();
        if (parentItem == null) {
          final int index = gallery.indexOf(item);
          final ItemGroup itemGroup = (ItemGroup) images.get(index);
          item.setText(itemGroup.getName());
          item.setData(itemGroup);
          item.setItemCount(itemGroup.getChildCount());
        } else {
          final int indexOf = parentItem.indexOf(item);
          final ItemGroup ga = (ItemGroup) parentItem.getData();
          item.setItemCount(0);
          final IImageEntry image = ga.getImage(indexOf);
          try {
            item.setImage(image.getImage());
          } catch (IOException e) {
            e.printStackTrace();
          }
View Full Code Here


      images.addAll(contents);
    } else {
      final StringMatcher ma = new StringMatcher("*" + this.pattern + "*", true, false);
      for (final Object o : contents) {
        if (o instanceof ItemGroup) {
          final ItemGroup ga = (ItemGroup) o;

          if (ma.match(ga.getName())) {
            images.add(o);
          } else {
            final ArrayList<IImageEntry> z = new ArrayList<IImageEntry>();
            for (int a = 0; a < ga.getChildCount(); a++) {
              final IImageEntry image = ga.getImage(a);
              if (ma.match(image.getName())) {
                z.add(image);
              }
            }
            if (!z.isEmpty()) {
              images.add(new ItemGroup(ga.getName(), z));
            }
          }
        }
      }
    }
View Full Code Here

    Collections.sort(images, new Comparator<Object>() {

      public int compare(Object o1, Object o2) {
        if (o1 instanceof ItemGroup) {
          if (o2 instanceof ItemGroup) {
            final ItemGroup i1 = (ItemGroup) o1;
            final ItemGroup i2 = (ItemGroup) o2;
            return i1.getName().compareTo(i2.getName());
          } else {
            return -1;
          }
        }
        return 1;
View Full Code Here

TOP

Related Classes of org.cfeclipse.cfml.images.ItemGroup

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.