com.flagstone.transform.coder
Class DecoderRegistry

java.lang.Object
  extended by com.flagstone.transform.coder.DecoderRegistry
All Implemented Interfaces:
Copyable<DecoderRegistry>

public final class DecoderRegistry
extends Object
implements Copyable<DecoderRegistry>

The DecoderRegistry is used to maintain a table of objects that can be used to decode the different types of object encountered in a Flash file.


Constructor Summary
DecoderRegistry()
          Creates a DecoderRegistry with no decoders yet registered.
DecoderRegistry(DecoderRegistry registry)
          Create a new registry and initialize it with the decoders from an existing registry.
 
Method Summary
 DecoderRegistry copy()
          Creates a complete copy of this object.
 SWFFactory<Action> getActionDecoder()
          Get the decoder that will be used for actions.
static DecoderRegistry getDefault()
          Get the default registry.
 SWFFactory<FillStyle> getFillStyleDecoder()
          Get the decoder that will be used for FillStyle objects.
 SWFFactory<Filter> getFilterDecoder()
          Get the decoder that will be used for Filter objects.
 SWFFactory<FillStyle> getMorphFillStyleDecoder()
          Get the decoder that will be used for FillStyle objects used in morphing shapes.
 SWFFactory<MovieTag> getMovieDecoder()
          Get the decoder that will be used for movie objects.
 SWFFactory<ShapeRecord> getShapeDecoder()
          Get the decoder that will be used for ShapeRecords.
 void setActionDecoder(SWFFactory<Action> factory)
          Set the decoder that will be used for actions.
static void setDefault(DecoderRegistry registry)
          Set the registry that will be used as the default.
 void setFillStyleDecoder(SWFFactory<FillStyle> factory)
          Set the decoder that will be used for fill styles in a shape.
 void setFilterDecoder(SWFFactory<Filter> factory)
          Set the decoder that will be used for filters.
 void setMorphFillStyleDecoder(SWFFactory<FillStyle> factory)
          Set the decoder that will be used for fill styles in a morphing shape.
 void setMovieDecoder(SWFFactory<MovieTag> factory)
          Set the decoder that will be used for movie objects.
 void setShapeDecoder(SWFFactory<ShapeRecord> factory)
          Set the decoder that will be used for shapes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DecoderRegistry

public DecoderRegistry()
Creates a DecoderRegistry with no decoders yet registered.


DecoderRegistry

public DecoderRegistry(DecoderRegistry registry)
Create a new registry and initialize it with the decoders from an existing registry.

Parameters:
registry - the DeocderRegistry to copy.
Method Detail

getDefault

public static DecoderRegistry getDefault()
Get the default registry.

Returns:
a registry with a default set of decoders.

setDefault

public static void setDefault(DecoderRegistry registry)
Set the registry that will be used as the default.

Parameters:
registry - the DecoderRegistry that will replace the existing default.

copy

public DecoderRegistry copy()
Creates a complete copy of this object.

Specified by:
copy in interface Copyable<DecoderRegistry>
Returns:
a deep-copy of this object. New instances of mutable objects are copied and immutable instances are shared.

getFilterDecoder

public SWFFactory<Filter> getFilterDecoder()
Get the decoder that will be used for Filter objects.

Returns:
the decoder for filters.

setFilterDecoder

public void setFilterDecoder(SWFFactory<Filter> factory)
Set the decoder that will be used for filters.

Parameters:
factory - an instance of the class that will be used to decode the filters defined in Place3 or ButtonShape objects.

getFillStyleDecoder

public SWFFactory<FillStyle> getFillStyleDecoder()
Get the decoder that will be used for FillStyle objects.

Returns:
the decoder for fill styles.

setFillStyleDecoder

public void setFillStyleDecoder(SWFFactory<FillStyle> factory)
Set the decoder that will be used for fill styles in a shape.

Parameters:
factory - an instance of the class that will be used to decode the fill styles in a shape.

getMorphFillStyleDecoder

public SWFFactory<FillStyle> getMorphFillStyleDecoder()
Get the decoder that will be used for FillStyle objects used in morphing shapes.

Returns:
the decoder for morphing fill styles.

setMorphFillStyleDecoder

public void setMorphFillStyleDecoder(SWFFactory<FillStyle> factory)
Set the decoder that will be used for fill styles in a morphing shape.

Parameters:
factory - an instance of the class that will be used to decode the fill styles in a morphing shape.

getShapeDecoder

public SWFFactory<ShapeRecord> getShapeDecoder()
Get the decoder that will be used for ShapeRecords.

Returns:
the decoder for the objects in Shapes.

setShapeDecoder

public void setShapeDecoder(SWFFactory<ShapeRecord> factory)
Set the decoder that will be used for shapes.

Parameters:
factory - an instance of the class that will be used to decode the shape records in a movie.

getActionDecoder

public SWFFactory<Action> getActionDecoder()
Get the decoder that will be used for actions.

Returns:
the decoder for actions.

setActionDecoder

public void setActionDecoder(SWFFactory<Action> factory)
Set the decoder that will be used for actions.

Parameters:
factory - an instance of the class that will be used to decode the actions in a movie.

getMovieDecoder

public SWFFactory<MovieTag> getMovieDecoder()
Get the decoder that will be used for movie objects.

Returns:
the decoder for the main objects decoded in a Flash file.

setMovieDecoder

public void setMovieDecoder(SWFFactory<MovieTag> factory)
Set the decoder that will be used for movie objects.

Parameters:
factory - an instance of the class that will be used to decode the main objects in a movie.


Copyright © 2002-2010 Flagstone Software Ltd.. All Rights Reserved.