com.threerings.stage.data
Class DefaultColorUpdate

java.lang.Object
  extended by com.threerings.whirled.data.SceneUpdate
      extended by com.threerings.stage.data.DefaultColorUpdate
All Implemented Interfaces:
Streamable, Cloneable

public class DefaultColorUpdate
extends SceneUpdate

Update to change the default colorization for objects in a scene which do not define their own colorization.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.threerings.io.Streamable
Streamable.Closure
 
Field Summary
 int classId
          The class id of the colorization we're changing.
 int colorId
          The color id to set as the new default, or -1 to remove the default.
 
Fields inherited from class com.threerings.whirled.data.SceneUpdate
_dbSer, _targetId, _targetVersion
 
Constructor Summary
DefaultColorUpdate()
           
 
Method Summary
 void apply(SceneModel model)
          Applies this update to the specified scene model.
 void init(int targetId, int targetVersion, int classId, int colorId)
          Initializes this update.
 
Methods inherited from class com.threerings.whirled.data.SceneUpdate
getSceneId, getSceneVersion, getVersionIncrement, init, persistTo, readObject, toString, toString, unpersistFrom, validate, writeObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

classId

public int classId
The class id of the colorization we're changing.


colorId

public int colorId
The color id to set as the new default, or -1 to remove the default.

Constructor Detail

DefaultColorUpdate

public DefaultColorUpdate()
Method Detail

init

public void init(int targetId,
                 int targetVersion,
                 int classId,
                 int colorId)
Initializes this update.


apply

public void apply(SceneModel model)
Description copied from class: SceneUpdate
Applies this update to the specified scene model. Derived classes will want to override this method and apply updates of their own, being sure to call super.apply.

Overrides:
apply in class SceneUpdate