com.flagstone.transform
Class FSDefineObject
java.lang.Object
com.flagstone.transform.FSTransformObject
com.flagstone.transform.FSMovieObject
com.flagstone.transform.FSDefineObject
- All Implemented Interfaces:
- java.lang.Cloneable
- Direct Known Subclasses:
- FSDefineButton, FSDefineButton2, FSDefineFont, FSDefineFont2, FSDefineImage, FSDefineImage2, FSDefineJPEGImage, FSDefineJPEGImage2, FSDefineJPEGImage3, FSDefineMorphShape, FSDefineMovieClip, FSDefineShape, FSDefineShape2, FSDefineShape3, FSDefineSound, FSDefineText, FSDefineText2, FSDefineTextField, FSDefineVideo
public abstract class FSDefineObject
- extends FSMovieObject
The FSDefineObject is a base class for the different types of object used to
create images, buttons, shapes and sounds. Each such object contains a unique
identifier that is used to reference the object when performing operations
such as placing it in the display list using the FSPlaceObject class, etc.
The FSDefineObject manages the encoding and decoding of this identifier.
Identifiers are unique within a given movie. The FSMovie class is maintains
an internal counter which is used to generate the identifiers that are
assigned to classes derived from FSDefineObject.
Two accessor methods, getIdentifier() and setIdentifier() are used to
retrieve and update the unique identifier assigned to an object.
Fields inherited from class com.flagstone.transform.FSMovieObject |
ButtonColorTransform, ButtonSound, DefineBitsPtr, DefineButton, DefineButton2, DefineFont, DefineFont2, DefineImage, DefineImage2, DefineJPEGImage, DefineJPEGImage2, DefineJPEGImage3, DefineMorphShape, DefineMovieClip, DefineShape, DefineShape2, DefineShape3, DefineSound, DefineText, DefineText2, DefineTextField, DefineVideo, DoAction, EnableDebugger, EnableDebugger2, Export, extendLength, FontInfo, FontInfo2, FrameLabel, Free, Import, Initialize, JPEGTables, length, LimitScript, PathsArePostscript, PlaceObject, PlaceObject2, Protect, QuicktimeMovie, RemoveObject, RemoveObject2, SerialNumber, SetBackgroundColor, ShowFrame, SoundStreamBlock, SoundStreamHead, SoundStreamHead2, StartSound, TabOrder, type, VideoFrame |
Method Summary |
void |
appendDescription(java.lang.StringBuffer buffer,
int depth)
AppendDescription is used to present a string description of the object
including all nested objects up to a specified depth. |
void |
decode(FSCoder coder)
|
void |
encode(FSCoder coder)
|
int |
getIdentifier()
Returns the unique identifier assigned to this Define tag. |
int |
length(FSCoder coder)
|
void |
setIdentifier(int anIdentifier)
Sets the identifier used to uniquely identify the object within a given
FSMovie. |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
identifier
protected int identifier
FSDefineObject
protected FSDefineObject(FSDefineObject obj)
getIdentifier
public int getIdentifier()
- Returns the unique identifier assigned to this Define tag.
- Returns:
- the unique identifier for the object.
setIdentifier
public void setIdentifier(int anIdentifier)
- Sets the identifier used to uniquely identify the object within a given
FSMovie.
- Parameters:
anIdentifier
- a unique identifier for the object.
appendDescription
public void appendDescription(java.lang.StringBuffer buffer,
int depth)
- Description copied from class:
FSTransformObject
- AppendDescription is used to present a string description of the object
including all nested objects up to a specified depth. This method provide
a more controlled way of creating a string representation of an object
since large objects such as font or shape definitions can contain dozens
of nested objects.
The representation of the object is appended to the StringBuffer, showing
the name of the class and values of the attributes it contains. If the
object contains any attributes that are objects then the object graph
will be traversed up to the specified depth. If objects are nested at a
level less than specified depth then the full string representation of
the object is displayed. For objects at the specified depth only the name
of the class is displayed. Any objects below this depth are not
displayed.
- Overrides:
appendDescription
in class FSMovieObject
- Parameters:
buffer
- a StringBuffer to which the description of each object is
appended.depth
- the maximum level of nesting up to which objects will be
displayed.
length
public int length(FSCoder coder)
- Overrides:
length
in class FSMovieObject
encode
public void encode(FSCoder coder)
- Overrides:
encode
in class FSMovieObject
decode
public void decode(FSCoder coder)
- Overrides:
decode
in class FSMovieObject