Package edu.cmu.cs.stage3.alice.core

Examples of edu.cmu.cs.stage3.alice.core.Element$ObjectArrayProperty_Value_Index


  protected abstract Object getValue( Array array );
    public Class getValueClass() {
        return array.getArrayValue().valueClass.getClassValue();
    }
  public Object getValue() {
    Array arrayValue = array.getArrayValue();
    if( arrayValue!=null ) {
            return getValue( arrayValue );
    } else {
      return null;
    }
View Full Code Here


  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

  }
  public class RuntimeMoveAnimation extends RuntimeDirectionAmountTransformAnimation {
    private javax.vecmath.Vector3d m_vector;
    private javax.vecmath.Vector3d m_vectorPrev;
    protected javax.vecmath.Vector3d getVector() {
      Direction directionValue = MoveAnimation.this.direction.getDirectionValue();
      double amountValue = MoveAnimation.this.amount.doubleValue();
      if( directionValue!=null && !Double.isNaN( amountValue ) ) {
        javax.vecmath.Vector3d v = edu.cmu.cs.stage3.math.MathUtilities.multiply( directionValue.getMoveAxis(), amountValue );
        if( MoveAnimation.this.isScaledBySize.booleanValue() ) {
          javax.vecmath.Vector3d subjectSize = m_subject.getSize();
          v.x *= subjectSize.x;
          v.y *= subjectSize.y;
          v.z *= subjectSize.z;
View Full Code Here

public class ChildNamed extends Question {
  public final ElementProperty parent = new ElementProperty( this, "parent", null );
  public final StringProperty name = new StringProperty( this, "name", "" );
  public final BooleanProperty ignoreCase = new BooleanProperty( this, "ignoreCase", Boolean.TRUE );
  public Object getValue() {
    Element parentValue = parent.getElementValue();
    String nameValue = name.getStringValue();
    if( ignoreCase.booleanValue() ) {
      return parentValue.getChildNamed( nameValue );
    } else {
      return parentValue.getChildNamedIgnoreCase( nameValue );
    }
  }
View Full Code Here

        Element[] src = getElementArrayValue();
        Element[] dst = (Element[])java.lang.reflect.Array.newInstance( getComponentType(), src.length );
        System.arraycopy( src, 0, dst, 0, dst.length );
        java.util.Arrays.sort( dst, new java.util.Comparator() {
            public int compare( Object o1, Object o2 ) {
                Element e1 = (Element)o1;
                Element e2 = (Element)o2;
                String n1 = e1.name.getStringValue();
                String n2 = e2.name.getStringValue();
                if( n1 != null ) {
                    if( n2 != null ) {
                        if( ignoreCase ) {
View Full Code Here

  }
  private Model ascend( Model part ) {
    if( part.doEventsStopAscending() ) {
      return part;
    }
    Element parent = part.getParent();
    if( parent instanceof Model ) {
      return ascend( (Model)parent );
    } else {
      return part;
    }
View Full Code Here

  private void updateOverrideValueClasses() {
    Class elementOverrideValueClass = null;
    Class valueOverrideValueClass = null;
    String propertyNameValue = propertyName.getStringValue();
    if( propertyNameValue!=null ) {
      Element elementValue = element.getElementValue();
      if( elementValue!=null ) {
        edu.cmu.cs.stage3.alice.core.Property property = elementValue.getPropertyNamed( propertyNameValue );
        if( property != null ) {
          elementOverrideValueClass = property.getDeclaredClass();
          valueOverrideValueClass = property.getValueClass();
        } else {
          if( elementValue instanceof Expression ) {
View Full Code Here

  public final StringProperty propertyName = new StringProperty( this, "propertyName", null );
  private void updateOverrideValueClass() {
    Class elementOverrideValueClass = null;
    String propertyNameValue = propertyName.getStringValue();
    if( propertyNameValue!=null ) {
      Element elementValue = element.getElementValue();
      if( elementValue!=null ) {
        Property property = elementValue.getPropertyNamed( propertyNameValue );
        if( property != null ) {
          elementOverrideValueClass = property.getDeclaredClass();
        } else {
          if( elementValue instanceof Expression ) {
            Class cls = ((Expression)elementValue).getValueClass();
View Full Code Here

  }
  private Property getPropertyValue() {
    if( element.getOverrideValueClass() == null ) {
      updateOverrideValueClass();
    }
    Element elementValue = element.getElementValue();
    String propertyNameValue = propertyName.getStringValue();
    if( elementValue != null && propertyNameValue != null ) {
      return elementValue.getPropertyNamed( propertyNameValue );
//      Property property = elementValue.getPropertyNamed( propertyNameValue );
//      if( property == null ) {
//        if( elementValue instanceof Expression ) {
//          Expression expression = (Expression)elementValue;
//          if( Element.class.isAssignableFrom( expression.getValueClass() ) ) {
View Full Code Here

  private void updateOverrideValueClasses() {
    Class elementOverrideValueClass = null;
    Class valueOverrideValueClass = null;
    String propertyNameValue = propertyName.getStringValue();
    if( propertyNameValue!=null ) {
      Element elementValue = element.getElementValue();
      if( elementValue!=null ) {
        Property property = elementValue.getPropertyNamed( propertyNameValue );
        if( property != null ) {
          elementOverrideValueClass = property.getDeclaredClass();
          valueOverrideValueClass = property.getValueClass();
        } else {
          if( elementValue instanceof Expression ) {
View Full Code Here

TOP

Related Classes of edu.cmu.cs.stage3.alice.core.Element$ObjectArrayProperty_Value_Index

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.