Examples of Behavior


Examples of aspect.entity.behavior.Behavior

        RigidBody rb = rigidBody();
       
        rb.vel = Vector2.fromAngle((float)Math.random() * 360, 200).asXY();
       
       
        addBehavior(new Behavior() {
            @Override
            public void update() {
                RigidBody rb = ent.rigidBody();
                if (ent.pos.x > getCanvasWidth() || ent.pos.x < 0) {
                    rb.vel.x *= -1;
View Full Code Here

Examples of edu.cmu.cs.stage3.alice.core.Behavior

  public final UserDefinedQuestionProperty userDefinedQuestion = new UserDefinedQuestionProperty( this, "userDefinedQuestion", null );
  public final ElementArrayProperty requiredActualParameters = new ElementArrayProperty( this, "requiredActualParameters", null, Variable[].class );
  public final ElementArrayProperty keywordActualParameters = new ElementArrayProperty( this, "keywordActualParameters", null, Variable[].class );
    public Object getValue() {
        UserDefinedQuestion userDefinedQuestionValue = userDefinedQuestion.getUserDefinedQuestionValue();
        Behavior currentBehavior = null;
        World world = getWorld();
        if( world != null ) {
            Sandbox sandbox = world.getCurrentSandbox();
            if( sandbox!=null ) {
                currentBehavior = sandbox.getCurrentBehavior();
            } else {
                //System.err.println( "current sandbox is null" );
            }
        } else {
            //System.err.println( "world is null" );
        }
    if( currentBehavior != null ) {
      currentBehavior.pushStack(
        (Variable[])CallToUserDefinedQuestion.this.requiredActualParameters.getArrayValue(),
        (Variable[])CallToUserDefinedQuestion.this.keywordActualParameters.getArrayValue(),
        (Variable[])userDefinedQuestionValue.requiredFormalParameters.getArrayValue(),
        (Variable[])userDefinedQuestionValue.keywordFormalParameters.getArrayValue(),
        (Variable[])userDefinedQuestionValue.localVariables.getArrayValue(),
        true
      );
      Object returnValue = userDefinedQuestionValue.getValue();
      currentBehavior.popStack();
      return returnValue;
    } else {
      return null;
    }
    }
View Full Code Here

Examples of it.freedomotic.model.object.Behavior

            if (st.getAttribute().equalsIgnoreCase("object.currentRepresentation")) {
                if (obj.getCurrentRepresentationIndex() != Integer.parseInt(st.getValue())) {
                    obj.setCurrentRepresentation(Integer.parseInt(st.getValue()));
                }
            } else if (st.getAttribute().startsWith("object.behavior")) {
                Behavior bh = obj.getBehavior(st.getAttribute().split("object.behavior.")[1]);
                if (bh instanceof BooleanBehavior) {
                    boolean bl = Boolean.parseBoolean(st.getValue());
                    if (bl != ((BooleanBehavior) bh).getValue()) {
                        ((BooleanBehavior) bh).setValue(bl);
                        //Window.alert(obj.toString());
View Full Code Here

Examples of javax.faces.component.behavior.Behavior

    public void apply(FaceletContext ctx, UIComponent parent) throws IOException {

        if (owner.isWrapping()) {

            Application application = ctx.getFacesContext().getApplication();
            Behavior behavior = application.createBehavior(this.behaviorId);

            if (behavior instanceof ClientBehavior) {
                ClientBehavior clientBehavior = (ClientBehavior) behavior;
                owner.setAttributes(ctx, clientBehavior);
View Full Code Here

Examples of javax.faces.component.behavior.Behavior

            throw new FacesException("Could not find any registered behavior-class for behaviorId : " + behaviorId);
        }

        try
        {
            Behavior behavior = behaviorClass.newInstance();

            _handleAttachedResourceDependencyAnnotations(FacesContext.getCurrentInstance(), behavior);

            if (behavior instanceof ClientBehaviorBase)
            {
View Full Code Here

Examples of javax.faces.component.behavior.Behavior

        // Retrieve the current FaceletContext from FacesContext object
        FaceletContext faceletContext = (FaceletContext) context.getAttributes().get(
                FaceletContext.FACELET_CONTEXT_KEY);
       
        ValueExpression ve = null;
        Behavior behavior = null;
        if (_delegate.getBinding() != null)
        {
            ve = _delegate.getBinding().getValueExpression(faceletContext, Behavior.class);
            behavior = (Behavior) ve.getValue(faceletContext);
        }
View Full Code Here

Examples of javax.faces.component.behavior.Behavior

            throw new FacesException("Could not find any registered behavior-class for behaviorId : " + behaviorId);
        }
       
        try
        {
            Behavior behavior = (Behavior)behaviorClass.newInstance();

            _handleAttachedResourceDependencyAnnotations(FacesContext.getCurrentInstance(), behavior);

            if (behavior instanceof ClientBehaviorBase)
            {
View Full Code Here

Examples of javax.faces.component.behavior.Behavior

        }
        try
        {
            if (event instanceof BehaviorEvent && event.getComponent() == this)
            {
                Behavior behavior = ((BehaviorEvent) event).getBehavior();
                behavior.broadcast((BehaviorEvent) event);
            }
           
            if (_facesListeners == null)
            {
                return;
View Full Code Here

Examples of javax.media.j3d.Behavior

/*     */     }
/*     */
/* 516 */     this.objectBehavior = new Vector();
/* 517 */     if (loadBehaviors != 0) {
/* 518 */       this.motion.createJava3dBehaviors(this.objectTransform);
/* 519 */       Behavior b = this.motion.getBehaviors();
/* 520 */       if (b != null)
/* 521 */         this.objectBehavior.addElement(b);
/*     */     }
/*     */   }
View Full Code Here

Examples of org.apache.myfaces.config.impl.digester.elements.Behavior

                if (log.isLoggable(Level.FINEST))
                {
                    log.finest("addBehavior(" + facesBehavior.value() + ", " + clazz.getName() + ")");
                }

                Behavior behavior = new Behavior();
                behavior.setBehaviorId(facesBehavior.value());
                behavior.setBehaviorClass(clazz.getName());
                facesConfig.addBehavior(behavior);
            }

        }
    }
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.