Examples of NSRange


Examples of com.apple.cocoa.foundation.NSRange

/*     */
/*     */   public static native void drawBitmap(NSRect paramNSRect, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, boolean paramBoolean1, boolean paramBoolean2, String paramString, byte[] paramArrayOfByte);
/*     */
/*     */   public static native void windowList(int[] paramArrayOfInt);
/*     */
/* 376 */   public static void fillRectList(NSRect[] paramArrayOfNSRect) { fillRectListInRange(paramArrayOfNSRect, new NSRange(0, paramArrayOfNSRect.length)); }
View Full Code Here

Examples of com.apple.cocoa.foundation.NSRange

/*     */   public static native void windowList(int[] paramArrayOfInt);
/*     */
/* 376 */   public static void fillRectList(NSRect[] paramArrayOfNSRect) { fillRectListInRange(paramArrayOfNSRect, new NSRange(0, paramArrayOfNSRect.length)); }
/*     */
/*     */   public static void fillRectListWithColors(NSRect[] paramArrayOfNSRect, NSColor[] paramArrayOfNSColor) {
/* 379 */     fillRectListWithColorsInRange(paramArrayOfNSRect, paramArrayOfNSColor, new NSRange(0, paramArrayOfNSRect.length));
/*     */   }
View Full Code Here

Examples of com.apple.cocoa.foundation.NSRange

/*     */
/*     */   public static void fillRectListWithColors(NSRect[] paramArrayOfNSRect, NSColor[] paramArrayOfNSColor) {
/* 379 */     fillRectListWithColorsInRange(paramArrayOfNSRect, paramArrayOfNSColor, new NSRange(0, paramArrayOfNSRect.length));
/*     */   }
/*     */   public static void clipRectList(NSRect[] paramArrayOfNSRect) {
/* 382 */     clipRectListInRange(paramArrayOfNSRect, new NSRange(0, paramArrayOfNSRect.length));
/*     */   }
View Full Code Here

Examples of com.webobjects.foundation.NSRange

    // Add the reordered objects
    int listItemIDCount = listItemIDArray.count();
    for (int listItemIDIndex = 0; listItemIDIndex < listItemIDCount; listItemIDIndex++) {
      String itemID = (String) listItemIDArray.objectAtIndex(listItemIDIndex);
      NSRange itemPageRange;
      if (mutableList) {
        itemPageRange = new NSRange(startIndex + listItemIDIndex, listItemIDCount - listItemIDIndex);
      }
      else {
        itemPageRange = new NSRange(startIndex, listItemIDCount);
      }
      NSArray itemPageArray = list.subarrayWithRange(itemPageRange);
      EOQualifier itemIDQualifier = new EOKeyValueQualifier(listItemIDKeyPath, EOQualifier.QualifierOperatorEqual, itemID);
      NSArray matchingItems = EOQualifier.filteredArrayWithQualifier(itemPageArray, itemIDQualifier);
      if (matchingItems.count() == 0) {
        throw new NoSuchElementException("There was no item that matched the ID '" + itemID + "' in " + list + ".");
      }
      else if (matchingItems.count() > 1) {
        throw new IllegalStateException("There was more than one item that matched the ID '" + itemID + "' in " + list + ".");
      }
      Object replacingItem = matchingItems.objectAtIndex(0);
      if (mutableList) {
        int replacedItemIndex = itemPageRange.location();
        Object replacedItem = reorderedList.objectAtIndex(replacedItemIndex);
        if (replacedItem != replacingItem) {
          int replacingItemIndex = replacedItemIndex + itemPageArray.indexOfObject(replacingItem);
          reorderedList.replaceObjectAtIndex(replacingItem, replacedItemIndex);
          reorderedList.replaceObjectAtIndex(replacedItem, replacingItemIndex);
View Full Code Here

Examples of com.webobjects.foundation.NSRange

    return true;
  }

  @Override
  protected boolean traverseOrQualifier(EOOrQualifier q) {
    NSRange range = new NSRange(_qualifiers.count() - q.qualifiers().count(), q.qualifiers().count());
    ERXOrQualifier oq = new ERXOrQualifier(_qualifiers.subarrayWithRange(range));
    _qualifiers.removeObjectsInRange(range);
    _qualifiers.addObject(oq);
    return true;
  }
View Full Code Here

Examples of com.webobjects.foundation.NSRange

    return true;
  }

  @Override
  protected boolean traverseAndQualifier(EOAndQualifier q) {
    NSRange range = new NSRange(_qualifiers.count() - q.qualifiers().count(), q.qualifiers().count());
    ERXAndQualifier aq = new ERXAndQualifier(_qualifiers.subarrayWithRange(range));
    _qualifiers.removeObjectsInRange(range);
    _qualifiers.addObject(aq);
    return true;
  }
View Full Code Here

Examples of com.webobjects.foundation.NSRange

    public WOComponent toggleExpansion() {
        @SuppressWarnings("unchecked")
    NSArray<Object> selectionPath = (NSArray<Object>)_WOJExtensionsUtil.valueForBindingOrNull("selectionPath",this);

        selectionPath = selectionPath.subarrayWithRange(new NSRange(0, _nestingLevel));

        if (!isExpanded()) {
            Object currentItem = valueForBinding("item");
    //        NSLog(@"*** currentItem=%@", currentItem);
            selectionPath = selectionPath.arrayByAddingObject(currentItem);
View Full Code Here

Examples of com.webobjects.foundation.NSRange

    if (sortOrderings != null) {
      EOSortOrdering.sortArrayUsingKeyOrderArray(fetchedRows, sortOrderings);
    }

    if (fetchLimit > 0 && fetchedRows.count() > fetchLimit) {
      fetchedRows.removeObjectsInRange(new NSRange(fetchLimit, fetchedRows.count() - fetchLimit));
    }
    return fetchedRows;
  }
View Full Code Here

Examples of com.webobjects.foundation.NSRange

    public LuceneQualifierTraversal(EOEntity entity) {
      _entity = entity;
    }

    protected NSArray<Query> queriesForCurrent(int count) {
      NSRange range = new NSRange(_queries.count() - count, count);
      NSArray<Query> result = _queries.subarrayWithRange(range);
      _queries.removeObjectsInRange(range);
      return result;
    }
View Full Code Here

Examples of com.webobjects.foundation.NSRange

    int listItemIDCount = listItemIDArray.count();
    for(int listItemIDIndex = 0; listItemIDIndex < listItemIDCount; listItemIDIndex++) {

      String itemID = listItemIDArray.objectAtIndex(listItemIDIndex);
      NSRange itemPageRange;

      if(mutableList) {
        itemPageRange = new NSRange(startIndex + listItemIDIndex, listItemIDCount - listItemIDIndex);
      } else {
        itemPageRange = new NSRange(startIndex, listItemIDCount);
      }

      NSArray itemPageArray = list.subarrayWithRange(itemPageRange);
      EOQualifier itemIDQualifier = new EOKeyValueQualifier(listItemIDKeyPath, EOQualifier.QualifierOperatorEqual, itemID);
      NSArray matchingItems = EOQualifier.filteredArrayWithQualifier(itemPageArray, itemIDQualifier);

      if(matchingItems.count() == 0) {
        throw new NoSuchElementException("There was no item that matched the ID '" + itemID + "' in " + list + ".");
      } else if(matchingItems.count() > 1) {
        throw new IllegalStateException("There was more than one item that matched the ID '" + itemID + "' in " + list + ".");
      }

      Object replacingItem = matchingItems.objectAtIndex(0);

      if(mutableList) {
        int replacedItemIndex = itemPageRange.location();
        Object replacedItem = reorderedList.objectAtIndex(replacedItemIndex);
        if(replacedItem != replacingItem) {
          int replacingItemIndex = replacedItemIndex + itemPageArray.indexOfObject(replacingItem);
          reorderedList.replaceObjectAtIndex(replacingItem, replacedItemIndex);
          reorderedList.replaceObjectAtIndex(replacedItem, replacingItemIndex);
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.