Package org.rssowl.ui.internal

Examples of org.rssowl.ui.internal.EntityGroup


        }
      }

      /* This is a EntityGroup */
      else if (object instanceof EntityGroup) {
        EntityGroup group = (EntityGroup) object;

        List<EntityGroupItem> items = group.getItems();
        for (EntityGroupItem item : items) {
          if (((INews) item.getEntity()).isVisible())
            elements.add(item.getEntity());
        }
      }
View Full Code Here


      }
    }

    /* EntityGroup Image */
    else if (element instanceof EntityGroup && newsColumn == NewsColumn.TITLE) {
      EntityGroup group = (EntityGroup) element;
      if (group.getImage() != null)
        return OwlUI.getImage(fResources, group.getImage());

      return fGroupIcon;
    }

    return null;
View Full Code Here

   */
  protected Color getForeground(Object element, int columnIndex) {

    /* Handle EntityGroup */
    if (element instanceof EntityGroup) {
      EntityGroup group = (EntityGroup) element;
      if (group.getColorHint() != null) {
        if (!fListBackground.equals(group.getColorHint()) && !fListSelectionBackground.equals(group.getColorHint()))
          return OwlUI.getColor(fResources, group.getColorHint());
      }

      return fGroupFgColor;
    }

View Full Code Here

        for (Object element : elements) {
          Item entry = null;

          /* Entity Group */
          if (element instanceof EntityGroup) {
            EntityGroup group = (EntityGroup) element;
            entry = new Group(group.getId());
            fGroupMap.put(entry.getId(), (Group) entry);

            currentGroupEntryList = new ArrayList<Long>();
            fEntityGroupToNewsMap.put(group.getId(), currentGroupEntryList);

            /*
             * We use ">=" here to check if the group is visible or not to avoid the case
             * of a group being made visible that contains no visible news at all.
             */
            if (pageSize != 0 && newsCounter >= pageSize)
              setGroupVisible(group.getId(), false);
          }

          /* News Item */
          else if (element instanceof INews) {
            newsCounter++;
View Full Code Here

        }
      }

      /* This is a EntityGroup */
      else if (object instanceof EntityGroup) {
        EntityGroup group = (EntityGroup) object;

        List<EntityGroupItem> items = group.getItems();
        for (EntityGroupItem item : items) {
          if (((INews) item.getEntity()).isVisible())
            elements.add(item.getEntity());
        }
      }
View Full Code Here

        setGroupExpanded(groupId, newsIds, EXPAND_GROUP_HANDLER_ID.equals(id));
    }

    /* Group Context Menu */
    else if (queryProvided && GROUP_MENU_HANDLER_ID.equals(id)) {
      EntityGroup group = getEntityGroup(query);
      if (group != null) {

        /* Remove Focus from Link */
        blur(Dynamic.GROUP_MENU_LINK.getId(group));

View Full Code Here

          continue;
        }
      }

      /* Create a temporary new EntityGroup to be used from the context menu */
      EntityGroup group = new EntityGroup(id, NewsGrouping.GROUP_CATEGORY_ID);
      for (INews item : news) {
        new EntityGroupItem(group, item);
      }

      return group;
View Full Code Here

      }
    }

    /* EntityGroup Image */
    else if (element instanceof EntityGroup && newsColumn == NewsColumn.TITLE) {
      EntityGroup group = (EntityGroup) element;
      if (group.getImage() != null)
        return OwlUI.getImage(fResources, group.getImage());

      return fGroupIcon;
    }

    return null;
View Full Code Here

   */
  protected Color getForeground(Object element, int columnIndex) {

    /* Handle EntityGroup */
    if (element instanceof EntityGroup) {
      EntityGroup group = (EntityGroup) element;
      if (group.getColorHint() != null) {
        if (!fListBackground.equals(group.getColorHint()) && !fListSelectionBackground.equals(group.getColorHint()))
          return OwlUI.getColor(fResources, group.getColorHint());
      }

      return fGroupFgColor;
    }

View Full Code Here

  public void testGetEntitiesFromSelection() throws Exception {
    ILabel label1 = fFactory.createLabel(null, "Label 1");
    ILabel label2 = fFactory.createLabel(null, "Label 2");
    ILabel label3 = fFactory.createLabel(null, "Label 3");

    EntityGroup group = new EntityGroup(1, "Group");
    new EntityGroupItem(group, label2);
    new EntityGroupItem(group, label3);

    Object selectedItems[] = new Object[] { label1, group };
View Full Code Here

TOP

Related Classes of org.rssowl.ui.internal.EntityGroup

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.