Examples of Initializer


Examples of org.sonar.api.batch.Initializer

    // End of maven phase
    profiler.onMavenPhase(mavenEvent(false));
  }

  private void initializerPhase(PhasesSumUpTimeProfiler profiler) throws InterruptedException {
    Initializer initializer = new FakeInitializer();
    // Start of initializer phase
    profiler.onInitializersPhase(initializersEvent(true));
    // Start of an initializer
    profiler.onInitializerExecution(initializerEvent(initializer, true));
    clock.sleep(7);
View Full Code Here

Examples of org.waveprotocol.wave.model.adt.docbased.Initializer

    }

    @Override
    public Initializer createInitializer(
        final WantedEvaluation wantedEvaluation) {
      return new Initializer() {
        @Override
        public void initialize(Map<String, String> target) {
          target.put(
              WAVELET_ID_ATTR,
              WaveletIdSerializer.INSTANCE.toString(wantedEvaluation.getWaveletId()));
View Full Code Here

Examples of org.wso2.carbon.identity.provider.Initializer

    protected void activate(ComponentContext ctxt) {
        if (log.isDebugEnabled()) {
            log.info("Identity Provider bundle is activated");
        }
        try {
            new Initializer().init();
            ctxt.getBundleContext().registerService(IdentityProviderUtil.class.getName(),
                    new IdentityProviderUtil(), null);
        } catch (Throwable e) {
            log.error("Failed to initialize Identity Provider", e);
        }
View Full Code Here

Examples of tripleplay.particle.Initializer

     * Returns an initializer that configures a particle with a constant transform.
     */
    public static Initializer constant (float scale, float rot, final float tx, final float ty) {
        float sina = FloatMath.sin(rot), cosa = FloatMath.cos(rot);
        final float m00 = cosa * scale, m01 = sina * scale, m10 = -sina * scale, m11 = cosa * scale;
        return new Initializer() {
            @Override public void init (int index, float[] data, int start) {
                data[start + ParticleBuffer.M00] = m00;
                data[start + ParticleBuffer.M01] = m01;
                data[start + ParticleBuffer.M10] = m10;
                data[start + ParticleBuffer.M11] = m11;
View Full Code Here

Examples of tripleplay.particle.Initializer

    /**
     * Returns an initializer that scales its previously assigned transform.
     */
    public static Initializer scale (final float scale)
    {
        return new Initializer() {
            @Override public void init (int index, float[] data, int start) {
                data[start + ParticleBuffer.M00] *= scale;
                data[start + ParticleBuffer.M01] *= scale;
                data[start + ParticleBuffer.M10] *= scale;
                data[start + ParticleBuffer.M11] *= scale;
View Full Code Here

Examples of tripleplay.particle.Initializer

     * random amount within the specified range.
     */
    public static Initializer randomScale (final Randoms rando, final float minScale,
                                           final float maxScale)
    {
        return new Initializer() {
            @Override public void init (int index, float[] data, int start) {
                float scale = rando.getInRange(minScale, maxScale);

                data[start + ParticleBuffer.M00] *= scale;
                data[start + ParticleBuffer.M01] *= scale;
View Full Code Here

Examples of tripleplay.particle.Initializer

     * Returns an initializer that configures a particle with the same transform (scale, rotation,
     * position) as the supplied layer. This will the the fully computed transform, not the layer's
     * local transform.
     */
    public static Initializer layer (final Layer layer) {
        return new Initializer() {
            @Override public void willInit (int count) {
                // concatenate the transform of all layers above our target layer
                xform.setTransform(1, 0, 0, 1, 0, 0);
                Layer xlayer = layer;
                while (xlayer != null) {
View Full Code Here

Examples of tripleplay.particle.Initializer

     * Returns an initializer that configures a particle's position in a random region. The scale
     * and rotation are not initialized, so this should be used with {@link #identity}.
     */
    public static Initializer randomPos (final Randoms rando, final float x, final float y,
                                         final float width, final float height) {
        return new Initializer() {
            @Override public void init (int index, float[] data, int start) {
                data[start + ParticleBuffer.TX] = x + rando.getFloat(width);
                data[start + ParticleBuffer.TY] = y + rando.getFloat(height);
            }
        };
View Full Code Here

Examples of tripleplay.particle.Initializer

    /**
     * Returns an initializer that adjusts the particle's position randomly from its current
     * location by up to noise units in both x & y.
     */
    public static Initializer randomOffset (final Randoms rando, final float noise) {
        return new Initializer() {
            @Override public void init (int index, float[] data, int start) {
                data[start + ParticleBuffer.TX] += rando.getInRange(-noise, noise);
                data[start + ParticleBuffer.TY] += rando.getInRange(-noise, noise);
            }
        };
View Full Code Here

Examples of tripleplay.particle.Initializer

{
    /**
     * Returns an initializer that provides a constant lifespan.
     */
    public static Initializer constant (final float lifespan) {
        return new Initializer() {
            @Override public void init (int index, float[] data, int start) {
                data[start+ParticleBuffer.LIFESPAN] = lifespan;
            }
        };
    }
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.