Examples of Particle


Examples of com.eviware.soapui.impl.wadl.inference.schema.Particle

        for (QName item : sequence) {
            if (!particles.containsKey(item)) {
                if (context.getHandler().callback(ConflictHandler.Event.CREATION, ConflictHandler.Type.ELEMENT, item,
                        context.getPath() + "/" + item.getLocalPart(), "Element has undeclared child element.")) {
                    if (item.getNamespaceURI().equals(schema.getNamespace())) {
                        Particle element = Particle.Factory.newElementInstance(schema, item.getLocalPart());
                        if (completed) {
                            element.setAttribute("minOccurs", "0");
                        }
                        particles.put(item, element);
                    } else {
                        Schema otherSchema = context.getSchemaSystem().getSchemaForNamespace(item.getNamespaceURI());
                        schema.putPrefixForNamespace(item.getPrefix(), item.getNamespaceURI());
                        if (otherSchema == null) {
                            otherSchema = context.getSchemaSystem().newSchema(item.getNamespaceURI());
                        }
                        Particle ref = otherSchema.getParticle(item.getLocalPart());
                        if (ref == null) {
                            ref = otherSchema.newElement(item.getLocalPart());
                        }
                        if (completed) {
                            ref.setAttribute("minOccurs", "0");
                        }
                        particles.put(item, Particle.Factory.newReferenceInstance(schema, ref));
                    }
                } else {
                    return false;
View Full Code Here

Examples of com.eviware.soapui.impl.wadl.inference.schema.Particle

        completed = xml.getCompleted();
        mixed = xml.getMixed();
        content = Content.Factory.parse(xml.getContent(), schema);
        attributes = new HashMap<QName, Particle>();
        for (ParticleConfig item : xml.getAttributeList()) {
            Particle p = Particle.Factory.parse(item, schema);
            attributes.put(new QName("", p.getName().getLocalPart()), p);
        }
        schema.addType(this);
    }
View Full Code Here

Examples of com.eviware.soapui.impl.wadl.inference.schema.Particle

                        Schema otherSchema = context.getSchemaSystem().getSchemaForNamespace(qname.getNamespaceURI());
                        schema.putPrefixForNamespace(qname.getPrefix(), qname.getNamespaceURI());
                        if (otherSchema == null) {
                            otherSchema = context.getSchemaSystem().newSchema(qname.getNamespaceURI());
                        }
                        Particle ref = otherSchema.getParticle(qname.getLocalPart());
                        if (ref == null) {
                            ref = otherSchema.newAttribute(qname.getLocalPart());
                        }
                        if (completed) {
                            ref.setAttribute("use", "optional");
                        }
                        Particle newAttribute = Particle.Factory.newReferenceInstance(schema, ref);
                        attributes.put(qname, newAttribute);
                        newAttribute.validate(context);
                    }
                } else {
                    throw new XmlException("Illegal attribute!");
                }
                seen.add(qname);
View Full Code Here

Examples of com.eviware.soapui.impl.wadl.inference.schema.Particle

        s.append("</" + xsdns + ":complexType>");
        return s.toString();
    }

    private Particle newAttribute(QName qname) {
        Particle p = Particle.Factory.newAttributeInstance(schema, qname.getLocalPart());
        attributes.put(qname, p);
        if (completed) {
            p.setAttribute("use", "optional");
        }
        return p;
    }
View Full Code Here

Examples of com.fluidsimulator.gameobjects.fluid.Particle

    // On Android populate directly
    if (!IS_DESKTOP) {
      for (float j = INITIAL_HEIGHT + hpadding + 2; j < WORLD_HEIGHT - 2; j += 1.0f) {
        for (float i = -WORLD_WIDTH / 3; i < WORLD_WIDTH / 3; i += 1.0f) {
          particles.add(new Particle(i, j));
          tempParticle = particles.get(particles.size() - 1);
          tempParticle.type = (emitType);
          if (particles.size() >= ANDROID_SIZE)
            return;
        }
View Full Code Here

Examples of com.fluidsimulator.gameobjects.fluid.Particle

        isRepulsing = false;
        if (particles.size() < SIZE - 1) {
          if ((testPoint2D.x < (-WORLD_WIDTH / 2 + wpadding) || testPoint2D.x > (WORLD_WIDTH / 2 - wpadding))
              || (testPoint2D.y < (INITIAL_HEIGHT + hpadding) || testPoint2D.y > (WORLD_HEIGHT - hpadding)))
            return false;
          particles.add(new Particle(testPoint2D));
          particles.get(particles.size() - 1).type = (emitType);
          if (viscoElasticityEnabled)
            springPresenceTable.put(
                particles.get(particles.size() - 1).hashCode(),
                new ArrayList<Integer>(SIZE));
View Full Code Here

Examples of com.fluidsimulator.gameobjects.fluid.Particle

          || (testPoint2D.y < (INITIAL_HEIGHT + hpadding) || testPoint2D.y > (WORLD_HEIGHT - hpadding)))
        return false;
      for (float i = -5; i < 5; i += 0.5f) {
        if (particles.size() >= SIZE - 1)
          break;
        particles.add(new Particle(testPoint2D.x + i, testPoint2D.y));
        tempParticle = particles.get(particles.size() - 1);
        tempParticle.type = (emitType);
        if (viscoElasticityEnabled)
          springPresenceTable.put(tempParticle.hashCode(),
              new ArrayList<Integer>(SIZE));
View Full Code Here

Examples of com.matis_digital.simulation.gui.utils.Particle

    public void animate()
    {
        for (int idx = 0; idx < size(); idx++)
        {
            final Particle particleA = get(idx);
            for (int nidx = idx + 1; nidx < size(); nidx++)
            {
                final Particle particleB = get(nidx);
                particleA.interact(particleB);
            }
        }
        for (int idx = 0; idx < size(); idx++)
        {
            final Particle particle = get(idx);
            particle.move();
        }
        if (Constants.MUSH == true)
        {
            for (int idx = 0; idx < size(); idx++)
            {
                final Particle particle = get(idx);
                if (particle.isDelete() == true)
                {
                    remove(idx);
                }
            }
        }
View Full Code Here

Examples of com.matis_digital.simulation.gui.utils.Particle

            final double m = (rand.nextDouble() * 1.0f) + 1.0f;
            final double radius = (rand.nextDouble() * 1.0f) + 1.0f;
            final double sx = (rand.nextDouble() * Constants.SPEED) - (0.5f * Constants.SPEED);
            final double sy = (rand.nextDouble() * Constants.SPEED)- (0.5f * Constants.SPEED);
            /* Add particle to queue */
            final Particle particle = new Particle(_main, size(), color, x, y, m, radius, sx, sy);
            add(particle);
        }
        System.out.printf("Added %d particels \n", size());
    }
View Full Code Here

Examples of com.matis_digital.simulation.gui.utils.Particle

                _bbGraphics.clearRect(getDisplayX(), getDisplayY(), getDisplayWidth(), getDisplayHeight());
                if (trace == true)
                {
                    for (int idx = 0; idx < _particles.size(); idx++)
                    {
                        final Particle particle = _particles.get(idx);
                        particle.drawTrace(_bbGraphics);
                    }
                }
                for (int idx = 0; idx < _particles.size(); idx++)
                {
                    final Particle particle = _particles.get(idx);
                    particle.draw(_bbGraphics, false);
                    if (info == true)
                    {
                        final FontRenderContext frc = _bbGraphics.getFontRenderContext();
                        final String infoString = particle.toString();
                        final Rectangle2D rect = _bbGraphics.getFont().getStringBounds(infoString, frc);
                        double x = particle.x;
                        double y = particle.y;
                        if (x < getDisplayX())
                        {
                            x = getDisplayX();
                        }
                        if ((x + rect.getWidth()) > getDisplayWidth())
                        {
                            x = getDisplayWidth() - rect.getWidth();
                        }
                        if (y < getDisplayY())
                        {
                            y = getDisplayY() + rect.getHeight();
                        }
                        if ((y + rect.getHeight()) > getDisplayHeight())
                        {
                            y = getDisplayHeight();
                        }
                        _bbGraphics.setPaint(particle.getColor());
                        _bbGraphics.drawString(infoString, (int) x, (int) y);
                    }
                }
            }
            if (stats == true)
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.