Examples of FastSet


Examples of com.extjs.gxt.ui.client.core.FastSet

  public void addStyleName(String style) {
    if (rendered) {
      fly(getStyleElement()).addStyleName(style);
    } else {
      if (styleNames == null) {
        styleNames = new FastSet();
      }
      styleNames.add(style);
    }
  }
View Full Code Here

Examples of com.extjs.gxt.ui.client.core.FastSet

  public void addStyleName(String style) {
    if (rendered) {
      fly(getStyleElement()).addStyleName(style);
    } else {
      if (styleNames == null) {
        styleNames = new FastSet();
      }
      styleNames.add(style);
    }
  }
View Full Code Here

Examples of com.extjs.gxt.ui.client.core.FastSet

  public ModelData getModel() {
    return model;
  }

  public Collection<String> getPropertyNames() {
    Set<String> names = new FastSet();

    for (String name : model.getPropertyNames()) {
      names.add(name);
    }

    if (editing) {
      if (modified != null) {
        names.addAll(modified.keySet());
      }
    }
    return names;
  }
View Full Code Here

Examples of com.extjs.gxt.ui.client.core.FastSet

    }
    return newMap;
  }

  public Collection<String> getPropertyNames() {
    Set<String> set = new FastSet();
    if (map != null) {
      set.addAll(map.keySet());
    }
    return set;
  }
View Full Code Here

Examples of com.extjs.gxt.ui.client.core.FastSet

  public ModelData getModel() {
    return model;
  }

  public Collection<String> getPropertyNames() {
    Set<String> names = new FastSet();

    for (String name : model.getPropertyNames()) {
      names.add(name);
    }

    if (editing) {
      if (modified != null) {
        names.addAll(modified.keySet());
      }
    }
    return names;
  }
View Full Code Here

Examples of com.extjs.gxt.ui.client.core.FastSet

    }
    return newMap;
  }

  public Collection<String> getPropertyNames() {
    Set<String> set = new FastSet();
    if (map != null) {
      set.addAll(map.keySet());
    }
    return set;
  }
View Full Code Here

Examples of com.sencha.gxt.core.shared.FastSet

      // If allowed to drop only nodes or both, then we need to remove items from the list
      // that also have their parents being dragged
      ModelKeyProvider<? super M> kp = getWidget().getStore().getKeyProvider();
     
      // Start by looking for all selected non-leaf items
      FastSet nonLeafKeys = new FastSet();
      for (M item : selected) {
        if (getWidget().isLeaf(item)) {
          // While we're at it, if we're only allowed nodes, cancel if we see a leaf
          if (treeSource == TreeSource.NODE) {
            event.setCancelled(true);
            return;
          }
        } else {
          nonLeafKeys.add(kp.getKey(item));
        }
      }
     
      // Walking backward (so we can remove as we go) through the list of all selected items, for
      // each item, check if it has a parent already in the list.
      // Clearly that parent is a non-leaf, so will be in the set we established in the last loop
      // Note: see TreeGridDragSource it's similar
      for (int i = selected.size() - 1; i >= 0; i--) {
        // TODO consider tracking these parents, and if they are part of another
        // parent, adding them to the keyset
        M parent = selected.get(i);
        while ((parent = getWidget().getStore().getParent(parent)) != null) {
          // If we find that this item's parent is also selected, then we can skip this item
          if (nonLeafKeys.contains(kp.getKey(parent))) {
            selected.remove(i);
            break;
          }
        }
      }
View Full Code Here

Examples of com.sencha.gxt.core.shared.FastSet

      // If allowed to drop only nodes or both, then we need to remove items from the list
      // that also have their parents being dragged
      ModelKeyProvider<? super M> kp = getWidget().getTreeStore().getKeyProvider();

      // Start by looking for all selected non-leaf items
      FastSet nonLeafKeys = new FastSet();
      for (M item : selected) {
        if (getWidget().isLeaf(item)) {
          // While we're at it, if we're only allowed nodes, cancel if we see a leaf
          if (treeGridSource == TreeSource.NODE) {
            event.setCancelled(true);
            return;
          }
        } else {
          nonLeafKeys.add(kp.getKey(item));
        }
      }

      // Walking backward (so we can remove as we go) through the list of all selected items, for
      // each item, check if it has a parent already in the list.
      // Clearly that parent is a non-leaf, so will be in the set we established in the last loop
      for (int i = selected.size() - 1; i >= 0; i--) {
        // TODO consider tracking these parents, and if they are part of another
        // parent, adding them to the keyset
        M parent = selected.get(i);
        if (parent == null) { // EXTGWT-2692
          selected.remove(i);
        } else {
          while ((parent = getWidget().getTreeStore().getParent(parent)) != null) {
            // If we find that this item's parent is also selected, then we can skip this item
            if (nonLeafKeys.contains(kp.getKey(parent))) {
              selected.remove(i);
              break;
            }
          }
        }
View Full Code Here

Examples of com.sencha.gxt.core.shared.FastSet

    }
  }

  protected Set<String> getSet(TreeState state) {
    if (state.getExpandedKeys() == null) {
      state.setExpandedKeys(new FastSet());
    }
    return state.getExpandedKeys();
  }
View Full Code Here

Examples of com.sencha.gxt.core.shared.FastSet

          return;
        }
      }
    } else {
      ModelKeyProvider<? super M> kp = getWidget().getStore().getKeyProvider();
      FastSet nonLeafKeys = new FastSet();
      for (M item : selected) {
        if (getWidget().isLeaf(item)) {
          if (treeSource == TreeSource.NODE) {
            event.setCancelled(true);
            return;
          }
        } else {
          nonLeafKeys.add(kp.getKey(item));
        }
      }
      for (int i = selected.size() - 1; i >= 0; i--) {
        // TODO consider tracking these parents, and if they are part of another
        // parent, adding them to the keyset
        M parent = selected.get(i);
        while ((parent = getWidget().getStore().getParent(parent)) != null) {
          if (nonLeafKeys.contains(kp.getKey(parent))) {
            selected.remove(i);
          }
        }
      }
      for (M item : selected) {
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.