Package com.extentech.toolkit

Examples of com.extentech.toolkit.FastAddVector


     * return the ptg components for a certain column within a ptgArea()
     * @param colNum
     * @return all Ptg's within colNum
     */
    public Ptg[] getColComponents(int colNum){
        FastAddVector v = new FastAddVector();
        int[] x = this.getIntLocation();
        if(x[1] == colNum)v.add(this);
        PtgRef[] pref = new PtgRef[v.size()];
        v.toArray(pref);        
        return pref;
    }
View Full Code Here


     * return the ptg components for a certain column within a ptgArea()
     * @param rowNum
     * @return all Ptg's within colNum
     */
    public Ptg[] getRowComponents(int rowNum){
        FastAddVector v = new FastAddVector();
      Ptg[] allComponents = this.getComponents();
      for(int i=0;i<allComponents.length;i++){
        PtgRef p = (PtgRef)allComponents[i];
//       TODO: check rc sanity here
        int[] x = p.getRealIntLocation();
        if(x[0] == rowNum)v.add(p);
      }
        PtgRef[] pref = new PtgRef[v.size()];
        v.toArray(pref);
        return pref;
    }
View Full Code Here

            Ptg[] ret = operands[0].getComponents();
         if(ret == null)
             return operands;
        }
       
      FastAddVector v = new FastAddVector();
    for (int i=0;i<operands.length;i++){
        Ptg[] pthings = operands[i].getComponents(); // optimized -- do it once!  -jm
      if (pthings != null){
        for (int x=0;x<pthings.length; x++){
          v.add(pthings[x]);
        }
      }else{
        v.add(operands[i]);
      }
    }
    Ptg[] res = new Ptg[v.size()];
    res = (Ptg[]) v.toArray(res);
    return res;
    }
View Full Code Here

     * @return all Ptg's within colNum
     */
    public Ptg[] getColComponents(int colNum){
      if(colrefs!=null) // cache
        return colrefs;
        FastAddVector v = new FastAddVector();
        Ptg[] allComponents = this.getComponents();
        for(int i=0;i<allComponents.length;i++){
            PtgRef p = (PtgRef)allComponents[i];
//       TODO: check rc sanity here
            int[] x = p.getIntLocation();
            if(x[1] == colNum)v.add(p);
        }
        colrefs = new PtgRef[v.size()];
        v.toArray(colrefs);        
        return colrefs;
    }
View Full Code Here

TOP

Related Classes of com.extentech.toolkit.FastAddVector

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.