Examples of apply()


Examples of org.zkoss.poi.ss.format.CellFormat.apply()

        return new FormatTextImpl(cell.getRichStringCellValue());
      }
    }
 
    final CellFormat format = CellFormat.getInstance(formatStr == null ? "" : formatStr, ZssContext.getCurrent().getLocale()); //ZSS-68
    return new FormatTextImpl(format.apply(cell));
  }

  //Return simple String form of the cell
  public static String getCellText(Cell cell) {
    final FormatTextImpl ft = getFormatText(cell);
View Full Code Here

Examples of play.mvc.results.Error.apply()

      String type = contentElement.get("type").getAsString();
      String source = contentElement.get("source").getAsString();
      Long id = contentElement.get("id") != null ? contentElement.get("id").getAsLong() : null;
      if(type==null) {
        Error error = new Error("Type field is empty.");
        error.apply(request, response);
        return;
      }
      Content.ContentType contentType = Content.ContentType.valueOf(type.toUpperCase());
      if(contentType == null) {
        Error error = new Error(type + " is not a correct type value.");
View Full Code Here

Examples of processing.core.PMatrix3D.apply()

   * anew.)
   */
  public void calculateMatrix() {
    synchronized (this) {
      PMatrix3D invMatrix = new PMatrix3D();
      invMatrix.apply(matrix);
      invMatrix.invert();

      float originalCenterX = invMatrix.multX(transformationCenter.x, transformationCenter.y);
      float originalCenterY = invMatrix.multY(transformationCenter.x, transformationCenter.y);

View Full Code Here

Examples of pspdash.data.compiler.node.PValue.apply()

        CompiledScript script = null;
        if (expression != null) try {
            // normalize "unvarying" references - that is,
            // references marked with braces like [{this}]
            PValue expr = (PValue) expression.clone();
            expr.apply(new NormalizeReferences(data, prefix));

            // compile the expression into a script.
            script = Compiler.compile(expr);
            script = Compiler.exprAndDefined(script, tag);
        } catch (CompilationException ce) {
View Full Code Here

Examples of pspdash.data.compiler.node.Start.apply()

        // Parse the file.
        Start tree = p.parse();

        // Apply the file loader.
        tree.apply(loader);

      } catch (ParserException pe) {
        String message = "Could not parse " +filename+ "; " + pe.getMessage();
        TemplateLoader.logTemplateError(message);
        throw new InvalidDatafileFormat(message);
View Full Code Here

Examples of ptolemy.data.FunctionToken.apply()

        while (ports.hasNext()) {
            TypedIOPort port = (TypedIOPort) ports.next();
            arguments[i++] = port.get(0);
        }

        Token t = functionValue.apply(arguments);
        output.broadcast(t);
    }

    /** Return true if the actor either of its input port has token.
     *  @exception IllegalActionException Not thrown in this base class.
View Full Code Here

Examples of purrpackagedemo.Transformation.apply()

public class TestIntersection extends TestCase {

  @Test
  public void testContains() {
    Transformation t = new Transformation.Translation( 0.5, 0.5 );
    Intersection r = new Intersection( Polygon.UNIT_SQUARE, t.apply( Polygon.UNIT_SQUARE ) );
    assertFalse( r.contains( Point.ORIGIN ));
    assertTrue( r.contains( new Point( 0.75, 0.75 )));
    assertFalse( r.contains( new Point( .75, .25 )));
    assertFalse( r.contains( new Point( .25, .25 )));
    assertFalse( r.contains( new Point( .25, .65 )));
View Full Code Here

Examples of purrpackagedemo.Transformation.Expansion.apply()

    Rotation r = new Rotation( Math.PI / 2.0 );
    assertPointEquals( new Point( 0, 1 ), r.apply( new Point( 1, 0 )) );
    assertPointEquals( new Point( -2, 0 ), r.apply( r.apply( new Point( 2, 0 ))) );
   
    Expansion z = new Expansion( -2 );
    assertPointEquals( new Point( 14, -16 ), z.apply( new Point( -7, 8 )) );
  }

  @Test
  public void testTransformationsOnRegions() {
    Point[] ps = new Point[] { Point.ORIGIN, new Point( 0.5, -0.5 ), new Point( 1, 1 ) };
View Full Code Here

Examples of purrpackagedemo.Transformation.Rotation.apply()

    Translation t = new Translation( 3, -2.5 );
    assertPointEquals( new Point( 3, -2.5 ), t.apply( Point.ORIGIN ));
    assertPointEquals( new Point( 4, -1.5 ), t.apply( new Point( 1, 1 ) ) );
   
    Rotation r = new Rotation( Math.PI / 2.0 );
    assertPointEquals( new Point( 0, 1 ), r.apply( new Point( 1, 0 )) );
    assertPointEquals( new Point( -2, 0 ), r.apply( r.apply( new Point( 2, 0 ))) );
   
    Expansion z = new Expansion( -2 );
    assertPointEquals( new Point( 14, -16 ), z.apply( new Point( -7, 8 )) );
  }
View Full Code Here

Examples of purrpackagedemo.Transformation.Translation.apply()

  }
 
  @Test
  public void testTransformationsOnPoints() {
    Translation t = new Translation( 3, -2.5 );
    assertPointEquals( new Point( 3, -2.5 ), t.apply( Point.ORIGIN ));
    assertPointEquals( new Point( 4, -1.5 ), t.apply( new Point( 1, 1 ) ) );
   
    Rotation r = new Rotation( Math.PI / 2.0 );
    assertPointEquals( new Point( 0, 1 ), r.apply( new Point( 1, 0 )) );
    assertPointEquals( new Point( -2, 0 ), r.apply( r.apply( new Point( 2, 0 ))) );
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.