com.threerings.config
Class Parameter.Choice

java.lang.Object
  extended by com.threerings.util.DeepObject
      extended by com.threerings.config.Parameter
          extended by com.threerings.config.Parameter.Choice
All Implemented Interfaces:
Exportable, Copyable, Inner, Cloneable
Enclosing class:
Parameter

public static class Parameter.Choice
extends Parameter
implements Inner

A parameter that allows choosing between several options.


Nested Class Summary
 class Parameter.Choice.Option
          An option available for selection.
 
Nested classes/interfaces inherited from class com.threerings.config.Parameter
Parameter.Choice, Parameter.Direct, Parameter.Translated
 
Field Summary
 String choice
          The selected option.
 Parameter.Direct[] directs
          The direct controls for each option.
 Parameter.Choice.Option[] options
          The options available for selection.
 
Fields inherited from class com.threerings.config.Parameter
name
 
Constructor Summary
Parameter.Choice(ParameterizedConfig outer)
           
 
Method Summary
 String[] getChoiceOptions()
          Returns the names of the options available for selection.
 Object getOuter()
          Returns a reference to the outer object.
 void invalidateProperties()
          Invalidates the properties, forcing them to be recreated.
 void setOuter(Object outer)
          Sets the outer object reference.
 void validateOuters(String where, ParameterizedConfig outer)
          Validates the parameter's outer object references.
 boolean validatePaths(String where, ParameterizedConfig reference, PrintStream out)
          Validates the parameter's paths.
 
Methods inherited from class com.threerings.config.Parameter
getArgumentProperty, getProperty
 
Methods inherited from class com.threerings.util.DeepObject
clone, copy, copy, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

directs

@Editable
public Parameter.Direct[] directs
The direct controls for each option.


options

@Editable(depends="directs")
public Parameter.Choice.Option[] options
The options available for selection.


choice

@Editable(editor="choice",
          depends="options")
public String choice
The selected option.

Constructor Detail

Parameter.Choice

public Parameter.Choice(ParameterizedConfig outer)
Method Detail

getChoiceOptions

public String[] getChoiceOptions()
Returns the names of the options available for selection.


setOuter

public void setOuter(Object outer)
Description copied from interface: Inner
Sets the outer object reference.

Specified by:
setOuter in interface Inner

getOuter

public Object getOuter()
Description copied from interface: Inner
Returns a reference to the outer object.

Specified by:
getOuter in interface Inner

invalidateProperties

public void invalidateProperties()
Description copied from class: Parameter
Invalidates the properties, forcing them to be recreated.

Overrides:
invalidateProperties in class Parameter

validatePaths

public boolean validatePaths(String where,
                             ParameterizedConfig reference,
                             PrintStream out)
Description copied from class: Parameter
Validates the parameter's paths.

Specified by:
validatePaths in class Parameter
Returns:
true if the paths are valid.

validateOuters

public void validateOuters(String where,
                           ParameterizedConfig outer)
Description copied from class: Parameter
Validates the parameter's outer object references.

Overrides:
validateOuters in class Parameter


Copyright © 2011. All Rights Reserved.