Package org.spoutcraft.api.property

Examples of org.spoutcraft.api.property.Property


    setText(text);
    setIconUrl(iconUrl);
  }

  private void initProperties() {
    addProperty("title", new Property() {
      public void set(Object value) {
        setTitle((String) value);
      }

      public Object get() {
        return getTitle();
      }
    });
    addProperty("text", new Property() {
      public void set(Object value) {
        setText((String) value);
      }

      public Object get() {
        return getText();
      }
    });
    addProperty("iconurl", new Property() {
      public void set(Object value) {
        setIconUrl((String) value);
      }

      public Object get() {
View Full Code Here


    initProperties();
  }

  private void initProperties() {
    addProperty("x", new Property() {
      public void set(Object value) {
        setX((Integer) value);
      }

      public Object get() {
        return getX();
      }
    });
    addProperty("y", new Property() {
      public void set(Object value) {
        setY((Integer) value);
      }

      public Object get() {
        return getY();
      }
    });
    addProperty("width", new Property() {
      public void set(Object value) {
        setWidth((Integer) value);
      }

      public Object get() {
        return getWidth();
      }
    });
    addProperty("height", new Property() {
      public void set(Object value) {
        setHeight((Integer) value);
      }

      public Object get() {
View Full Code Here

  public GenericWidget() {
    initProperties();
  }

  private void initProperties() {
    addProperty("geometry", new Property() {
      public void set(Object value) {
        setGeometry((Rectangle) value);
      }

      public Object get() {
View Full Code Here

    if (newheightMap != heightMap) {
      chunks.clear();
      heightMap = newheightMap;
    }

    addProperty("scale", new Property() {
      @Override
      public void set(Object value) {
        setScale((double)(Double) value);
      }

      @Override
      public Object get() {
        return getScale();
      }
    });

    addProperty("scrollpos", new Property() {
      @Override
      public void set(Object value) {
        Point p = (Point) value;
        scrollTo(p, false, 0);
      }
View Full Code Here

  public CraftEntity(FixedLocation location) {
  }

  public CraftEntity(net.minecraft.src.Entity handle) {
    this.handle = handle;
    addProperty("location", new Property() {
      public void set(Object value) {
        teleport((Location)value);
      }
      public Object get() {
        return getLocation();
      }
    });
    addProperty("velocity", new Property() {
      public void set(Object value) {
        setVelocity((Vector)value);
      }
      public Object get() {
        return getVelocity();
View Full Code Here

public class CraftCameraEntity extends CraftEntity  {
  public CraftCameraEntity(FixedLocation location) {
    super(location);
    handle = new EntityCamera(this);
    teleport(location);
    addProperty("location", new Property() {
      public void set(Object value) {
        teleport((Location)value);
      }
      public Object get() {
        return getLocation();
      }
    });
    addProperty("velocity", new Property() {
      public void set(Object value) {
        setVelocity((Vector)value);
      }
      public Object get() {
        return getVelocity();
View Full Code Here

TOP

Related Classes of org.spoutcraft.api.property.Property

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.