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

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


public abstract class ListNumberQuestion extends edu.cmu.cs.stage3.alice.core.question.NumberQuestion {
  public final ListProperty list = new ListProperty( this, "list", null );
  //protected abstract double getValue( List list );
  protected abstract int getValue( List list );
  public Object getValue() {
    List listValue = list.getListValue();
    if( listValue!=null ) {
            return new Integer( getValue( listValue ) );
    } else {
      return null;
    }
View Full Code Here


public abstract class ListObjectQuestion extends edu.cmu.cs.stage3.alice.core.Question {
  public final ListProperty list = new ListProperty( this, "list", null );
  protected abstract Object getValue( List list );
    public Class getValueClass() {
     List listValue = list.getListValue();
    if( listValue!=null ) {
            return listValue.valueClass.getClassValue();
    } else {
            //todo?
      return Object.class;
View Full Code Here

            //todo?
      return Object.class;
    }
    }
  public Object getValue() {
    List listValue = list.getListValue();
    if( listValue!=null ) {
            return getValue( listValue );
    } else {
      return null;
    }
View Full Code Here

public abstract class ListBooleanQuestion extends edu.cmu.cs.stage3.alice.core.question.BooleanQuestion {
  public final ListProperty list = new ListProperty( this, "list", null );
  protected abstract boolean getValue( List list );
  public Object getValue() {
    List listValue = list.getListValue();
    if( listValue!=null ) {
            if( getValue( listValue ) ) {
                return Boolean.TRUE;
            } else {
                return Boolean.FALSE;
View Full Code Here

            Transformable onWhatValue = onWhat.getTransformableValue();
            boolean success;
            if( onWhatValue!=null ) {
              edu.cmu.cs.stage3.alice.scenegraph.renderer.PickInfo pickInfo = RenderTarget.pick( mouseEvent );
              if( pickInfo.getCount()>0 ) {
                Model model = (Model)( pickInfo.getVisualAt( 0 ).getBonus() );
                success = onWhatValue == model || onWhatValue.isAncestorOf( model );
              } else {
                success = false;
              }
            } else {
View Full Code Here

        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

TOP

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

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.