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

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


        private ModelVisualization m_subject;
        private Model m_value;
    public void prologue( double t ) {
            m_subject = subject.getModelVisualizationValue();
            m_value = item.getModelValue();
            Model prev = m_subject.getItem();
            if( prev != null && prev != m_value ) {
                prev.visualization.set( null );
            }
            if( m_value != null ) {
View Full Code Here


  public Object getValue() {
    edu.cmu.cs.stage3.alice.scenegraph.renderer.PickInfo pickInfo = RenderTarget.pick( m_mouseEvent );
    if( pickInfo != null && pickInfo.getCount()>0 ) {
      Object o = pickInfo.getVisualAt( 0 ).getBonus();
      if( o instanceof Model  ) {
        Model part = (Model)o;
        if( ascend.booleanValue() ) {
          return ascend( part );
        } else {
          return part;
        }
View Full Code Here

    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();
            if( cls != null ) {
              elementOverrideValueClass = cls;
View Full Code Here

      return null;
    }
  }

  public Object getValue() {
    Property property = getPropertyValue();
    if( property != null ) {
      return property.getValue();
    } else {
      throw new RuntimeException();
      //return null;
    }
  }
View Full Code Here

      throw new RuntimeException();
      //return null;
    }
  }
  public Class getValueClass() {
    Property property = getPropertyValue();
    if( property != null ) {
      return property.getValueClass();
    } else {
            String propertyNameValue = propertyName.getStringValue();
            if( propertyNameValue != null ) {
                Class cls = element.getValueClass();
                if( edu.cmu.cs.stage3.alice.core.Element.class.isAssignableFrom( cls ) ) {
View Full Code Here

    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 ) {
            Class cls = ((Expression)elementValue).getValueClass();
            if( cls != null ) {
              elementOverrideValueClass = cls;
View Full Code Here

  public long m_clickTimeThreshold = 300;
  public int m_clickDistanceThresholdSquared = 100;

  public void manufactureAnyNecessaryDetails() {
    if( details.size()==2 ) {
      Question what = new PickQuestion();
      what.name.set( "what" );
      what.setParent( this );
      details.add( what );
    }
    for( int i=0; i<details.size(); i++ ) {
      Object o = details.get( i );
      if( o instanceof PickQuestion ) {
View Full Code Here

public abstract class QueueBooleanQuestion extends edu.cmu.cs.stage3.alice.core.question.BooleanQuestion {
  public final QueueProperty queue = new QueueProperty( this, "queue", null );
  protected abstract boolean getValue( Queue queue );
  public Object getValue() {
    Queue queueValue = queue.getQueueValue();
    if( queueValue!=null ) {
            if( getValue( queueValue ) ) {
                return Boolean.TRUE;
            } else {
                return Boolean.FALSE;
View Full Code Here

  protected abstract Object getValue( Queue queue );
    public Class getValueClass() {
        return queue.getQueueValue().valueClass.getClassValue();
    }
  public Object getValue() {
    Queue queueValue = queue.getQueueValue();
    if( queueValue!=null ) {
            return getValue( queueValue );
    } else {
      return null;
    }
View Full Code Here

public abstract class QueueNumberQuestion extends edu.cmu.cs.stage3.alice.core.question.NumberQuestion {
  public final QueueProperty queue = new QueueProperty( this, "queue", null );
  //protected abstract double getValue( Queue queue );
  protected abstract int getValue( Queue queue );
  public Object getValue() {
    Queue queueValue = queue.getQueueValue();
    if( queueValue!=null ) {
            return new Integer( getValue( queueValue ) );
    } else {
      return null;
    }
View Full Code Here

TOP

Related Classes of edu.cmu.cs.stage3.alice.core.Variable

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.