|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.flagstone.transform.button.DefineButton
public final class DefineButton
DefineButton defines the appearance of a button and the actions performed when the button is clicked.
DefineButton must contain at least one ButtonShape object. If more than one button shape is defined for a given button state then each shape will be displayed by the button. The order in which the shapes are displayed is determined by the layer assigned to each ButtonShape object.
ButtonShape
Constructor Summary | |
---|---|
DefineButton(DefineButton object)
Creates and initialises a DefineButton object using the values copied from another DefineButton object. |
|
DefineButton(int uid,
List<ButtonShape> buttons,
List<Action> script)
Creates a DefineButton object with the identifier, button shapes and actions. |
|
DefineButton(SWFDecoder coder,
Context context)
Creates and initialises a DefineButton object using values encoded in the Flash binary format. |
Method Summary | |
---|---|
DefineButton |
add(Action obj)
Adds the action to the list of actions. |
DefineButton |
add(ButtonShape obj)
Adds the button shape to the list of button shapes. |
DefineButton |
copy()
Creates a complete copy of this object. |
void |
encode(SWFEncoder coder,
Context context)
Encode an object to the Flash binary format. |
List<Action> |
getActions()
Get the list of actions that will be executed when the button is clicked and released. |
int |
getIdentifier()
Get the unique identifier assigned to this object. |
List<ButtonShape> |
getShapes()
Get the list of button shapes. |
int |
prepareToEncode(Context context)
Prepare an object for encoding, returning the expected size of an object when it is encoded. |
void |
setActions(List<Action> list)
Sets the list of actions that will be executed when the button is clicked and released. |
void |
setIdentifier(int uid)
Sets the unique identifier for an object within a given Movie. |
void |
setShapes(List<ButtonShape> list)
Sets the list of button shapes defined for this button. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DefineButton(SWFDecoder coder, Context context) throws IOException
coder
- an SWFDecoder object that contains the encoded Flash data.context
- a Context object used to manage the decoders for different
type of object and to pass information on how objects are
decoded.
IOException
- if an error occurs while decoding the data.public DefineButton(int uid, List<ButtonShape> buttons, List<Action> script)
uid
- the unique identifier for this button.buttons
- a list of ButtonShapes that are used to draw the button.script
- a list of actions that are executed when the button is
clicked.public DefineButton(DefineButton object)
object
- a DefineButton object from which the values will be
copied.Method Detail |
---|
public int getIdentifier()
getIdentifier
in interface DefineTag
public void setIdentifier(int uid)
setIdentifier
in interface DefineTag
uid
- a unique identifier for the object. Must be in the range
1..65535.public DefineButton add(ButtonShape obj)
obj
- an ButtonShape object. Must not be null.
public DefineButton add(Action obj)
obj
- an action object. Must not be null.
public List<ButtonShape> getShapes()
public List<Action> getActions()
public void setShapes(List<ButtonShape> list)
list
- a list of Button objects. Must not be null.public void setActions(List<Action> list)
list
- a list of action objects. Must not be null.public DefineButton copy()
copy
in interface Copyable<MovieTag>
public String toString()
toString
in class Object
public int prepareToEncode(Context context)
prepareToEncode
in interface SWFEncodeable
context
- an Context that allows information to be passed between
objects to control how they are initialised for encoding.
public void encode(SWFEncoder coder, Context context) throws IOException
encode
in interface SWFEncodeable
coder
- an SWFEncoder object.context
- an Context that allows information to be passed between
objects to control how they are initialised for encoding.
IOException
- if an error occurs while encoding the object.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |