Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.cult3d.world
Class Property

    java.lang.Object
      |
      +--com.cult3d.world.Property

public class Property
extends java.lang.Object

This class provides a representation of a property in a node, sound, or event.
Use the methods getEventProperty, getNodeProperty and getSoundProperty to get an instance of this class.

Since:
  Cult3D 5.2

Field Summary
`static int` | `BOOLEAN`
`static int` | `CURRENT`
`static int` | `FLOAT`
`static int` | `INITIAL`
`static int` | `INTEGER`
`static int` | `MATRIX`
`static int` | `ORIENTATION`
`static int` | `PREVIOUS`
`static int` | `STRING`
`static int` | `UNKNOWN`
`static int` | `VECTOR3D`

Method Summary
`boolean` | `getBoolean()` Returns the current value of this property as an boolean.
`boolean` | `getBoolean(int state)` Returns the property as a boolean.
`static Property` | `getEventProperty(java.lang.String event, java.lang.String name)` Returns a property for an existing event.
`float` | `getFloat()` Returns the current value of this property as an float.
`float` | `getFloat(int state)` Returns the property as a float.
`java.lang.String` | `getInfo()` This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations and versions of Cult3D.
`int` | `getInteger()` Returns the current value of this property as an integer.
`int` | `getInteger(int state)` Returns the property as an integer.
`static Property` | `getNodeProperty(Node node, java.lang.String name)` Returns a property for an exisiting node.
`static Property` | `getSoundProperty(java.lang.String sound, java.lang.String name)` Returns a property for an existing sound.
`java.lang.String` | `getString()` Returns the current value of this property as a string.
`java.lang.String` | `getString(int state)` Return the value as a string.
`int` | `getType()` Returns the type of a property.
`boolean` | `isEditable()` Returns whether the property can be changed.
`void` | `setBoolean(boolean num)` Sets this property the given boolean.
`void` | `setFloat(float num)` Sets this property to the given float.
`void` | `setInteger(int num)` Sets this property the given integer.
`void` | `setString(java.lang.String str)` Sets this property the given string.
`java.lang.String` | `toString()` Returns a string representation of the values of this object.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### UNKNOWN

    public static final int UNKNOWN

  Since:
    Cult3D 5.2

### STRING

    public static final int STRING

  Since:
    Cult3D 5.2

### INTEGER

    public static final int INTEGER

  Since:
    Cult3D 5.2

### BOOLEAN

    public static final int BOOLEAN

  Since:
    Cult3D 5.2

### FLOAT

    public static final int FLOAT

  Since:
    Cult3D 5.2

### VECTOR3D

    public static final int VECTOR3D

  Since:
    Cult3D 5.2

### ORIENTATION

    public static final int ORIENTATION

  Since:
    Cult3D 5.2

### MATRIX

    public static final int MATRIX

  Since:
    Cult3D 5.2

### INITIAL

    public static final int INITIAL

  Since:
    Cult3D 5.2

### PREVIOUS

    public static final int PREVIOUS

  Since:
    Cult3D 5.2

### CURRENT

    public static final int CURRENT

  Since:
    Cult3D 5.2

Method Detail

### getNodeProperty

    public static Property getNodeProperty(Node node,
                                           java.lang.String name)

  Returns a property for an exisiting node.
  Parameters:
    `node` - existing node
    `name` - property name
  Throws:
    NameNotFoundException - if the node or property wasn't found.
  Since:
    Cult3D 5.2

### getSoundProperty

    public static Property getSoundProperty(java.lang.String sound,
                                            java.lang.String name)

  Returns a property for an existing sound.
  Parameters:
    `sound` - sound name
    `name` - property name
  Throws:
    NameNotFoundException - if the sound or property wasn't found.
  Since:
    Cult3D 5.2

### getEventProperty

    public static Property getEventProperty(java.lang.String event,
                                            java.lang.String name)

  Returns a property for an existing event.
  Parameters:
    `event` - event name
    `name` - property name
  Throws:
    NameNotFoundException - if the event or property wasn't found.
  Since:
    Cult3D 5.2

### getType

    public int getType()

  Returns the type of a property.
  Since:
    Cult3D 5.2

### isEditable

    public boolean isEditable()

  Returns whether the property can be changed.
  Since:
    Cult3D 5.2

### getFloat

    public float getFloat()

  Returns the current value of this property as an float.
  Throws:
    PropertyFormatException - if the property can't be converted to a float.
  Since:
    Cult3D 5.2

### getBoolean

    public boolean getBoolean()

  Returns the current value of this property as an boolean.
  Throws:
    PropertyFormatException - if the property can't be converted to a boolean.
  Since:
    Cult3D 5.2

### getInteger

    public int getInteger()

  Returns the current value of this property as an integer.
  Throws:
    PropertyFormatException - if the property can't be converted to an integer.
  Since:
    Cult3D 5.2

### getString

    public java.lang.String getString()

  Returns the current value of this property as a string.
  Throws:
    PropertyFormatException - if the property can't be converted to a string.
  Since:
    Cult3D 5.2

### getFloat

    public float getFloat(int state)

  Returns the property as a float.
  Parameters:
    `state` - is indicating what state value is returned
  Throws:
    java.lang.IllegalArgumentException - if an invalid state is given.
    PropertyFormatException - if the property can't be converted to a float.
  Since:
    Cult3D 5.2

### getInteger

    public int getInteger(int state)

  Returns the property as an integer.
  Parameters:
    `state` - is indicating what state value is returned
  Throws:
    java.lang.IllegalArgumentException - if an invalid state is given.
    PropertyFormatException - if the property can't be converted to an integer.
  Since:
    Cult3D 5.2

### getBoolean

    public boolean getBoolean(int state)

  Returns the property as a boolean.
  Parameters:
    `state` - is indicating what state value is returned
  Throws:
    java.lang.IllegalArgumentException - if an invalid state is given.
    PropertyFormatException - if the property can't be converted to a boolean.
  Since:
    Cult3D 5.2

### getString

    public java.lang.String getString(int state)

  Return the value as a string.
  Parameters:
    `state` - is indicating what state value is returned
  Throws:
    java.lang.IllegalArgumentException - if an invalid state is given.
    PropertyFormatException - if the property can't be converted to a string.
  Since:
    Cult3D 5.2

### setFloat

    public void setFloat(float num)

  Sets this property to the given float.
  Parameters:
    `num` - is the float value to be set.
  Throws:
    PropertyFormatException - if the the value can't be converted to the properties type.
    ReadOnlyException - if the property is set to be read-only.
  Since:
    Cult3D 5.2

### setInteger

    public void setInteger(int num)

  Sets this property the given integer.
  Parameters:
    `num` - is the integer value to be set.
  Throws:
    PropertyFormatException - if the the value can't be converted to the properties type.
    ReadOnlyException - if the property is set to be read-only.
  Since:
    Cult3D 5.2

### setBoolean

    public void setBoolean(boolean num)

  Sets this property the given boolean.
  Parameters:
    `num` - is the boolean value to be set.
  Throws:
    PropertyFormatException - if the the value can't be converted to the properties type.
    ReadOnlyException - if the property is set to be read-only.
  Since:
    Cult3D 5.2

### setString

    public void setString(java.lang.String str)

  Sets this property the given string.
  Throws:
    PropertyFormatException - if the the value can't be converted to the properties type.
    ReadOnlyException - if the property is set to be read-only.
  Since:
    Cult3D 5.2

### getInfo

    public java.lang.String getInfo()

  This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations and versions of Cult3D.

  Returns:
    A string representing this object.
  Since:
    Cult3D 5.3

### toString

    public java.lang.String toString()

  Returns a string representation of the values of this object.

  The string contains the name of this class.

  This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations and versions of Cult3D.

  Overrides:
    toString in class java.lang.Object
  Returns:
    A string representing this object.

Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD