Package com.webobjects.foundation

Examples of com.webobjects.foundation.NSMutableArray.indexOfObject()


    public WOComponent moveUpClicked() {
        handler().startReading();
        try {
            NSMutableArray nsmutablearray = applicationArray();
            int i = nsmutablearray.indexOfObject(currentApplication);
            nsmutablearray.removeObjectAtIndex(i);
            if (i == 0)
                nsmutablearray.addObject(currentApplication);
            else
                nsmutablearray.insertObjectAtIndex(currentApplication, i - 1);
View Full Code Here


    public WOComponent moveDownClicked() {
        handler().startReading();
        try {
            NSMutableArray nsmutablearray = applicationArray();
            int i = nsmutablearray.indexOfObject(currentApplication);
            nsmutablearray.removeObjectAtIndex(i);
            if (i == nsmutablearray.count())
                nsmutablearray.insertObjectAtIndex(currentApplication, 0);
            else
                nsmutablearray.insertObjectAtIndex(currentApplication, i + 1);
View Full Code Here

    }

    public void moveUp(DRAttribute member, boolean up) {
        int cnt;
        NSMutableArray arr = _attribute.attributes();
        int cur = arr.indexOfObject(member);
        arr.removeObject(member);
        cnt = arr.count();

        if (up) {
            int newdex = cur-1;
View Full Code Here


    public void toggleGroupInList(DRAttribute att) {
        DRAttribute newAtt;
        NSMutableArray arr = _attribute.attributes();
        int curDex = arr.indexOfObject(att);

        if (att.isGroup()) {
            newAtt = DRAttribute.withKeyPathFormatLabelTotalUserInfo(att.keyPath(), att.format(), att.label(), att.shouldTotal(), att.userInfo());
        } else {
            newAtt = DRAttributeGroup.withKeyPathFormatLabelTotalListUserInfo(att.keyPath(), att.format(), att.label(), att.shouldTotal(), new NSMutableArray(), att.userInfo());
View Full Code Here

    }

    public void moveUpDimension(DRGroup vGroup, boolean up, String dim) {
        int cnt;
        NSMutableArray dims = (NSMutableArray)dimensionForName(dim);
        int cur = dims.indexOfObject(vGroup);
        dims.removeObject(vGroup);
        cnt = dims.count();

        if (up) {
            int newdex = cur-1;
View Full Code Here

    }
   
    public WOComponent promoteRule(){
        NSMutableArray rules = (NSMutableArray)this.rules();
       
        int index = rules.indexOfObject(currentRule);
        if( index == rules.count()-1 ){
            //last object
            rules.removeObjectAtIndex(index);
            rules.insertObjectAtIndex(currentRule, 0);
        } else {
View Full Code Here

    }
   
    public WOComponent demoteRule(){
        NSMutableArray rules = (NSMutableArray)this.rules();
       
        int index = rules.indexOfObject(currentRule);
        if( index == 0 ){
            //last object
            rules.removeObjectAtIndex(index);
            rules.addObject(currentRule);
        } else {
View Full Code Here

    }


    public void replaceMCWith(DRMasterCriteria oldMC, NSArray smcList) {
        NSMutableArray arr = new NSMutableArray(masterCriteriaList());
        int indx = arr.indexOfObject(oldMC);
        arr.insertObjectAtIndex(DRMasterCriteria.withSubMasterCriteriaUserInfo(smcList, oldMC.userInfo()), indx);
        arr.removeObject(oldMC);
        setMasterCriteriaList(arr);
    }
}
View Full Code Here

    public void toggleGroupInList(DRAttribute att) {
        int curDex;
        DRAttribute newAtt;
        NSMutableArray arr = new NSMutableArray(attributeList());
        curDex = arr.indexOfObject(att);

        if (att.isGroup()) {
            newAtt = DRAttribute.withKeyPathFormatLabelTotalUserInfo(att.keyPath(), att.format(), att.label(), att.shouldTotal(), att.userInfo());
        } else {
            newAtt = DRAttributeGroup.withKeyPathFormatLabelTotalListUserInfo(att.keyPath(), att.format(), att.label(), att.shouldTotal(), new NSMutableArray(), att.userInfo());
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.