| java.lang.Object org.openlaszlo.iv.flash.api.FlashItem org.openlaszlo.iv.flash.api.FlashObject org.openlaszlo.iv.flash.commands.GenericCommand
All known Subclasses: org.openlaszlo.iv.flash.commands.MultipageListCommand, org.openlaszlo.iv.flash.commands.SetCustomColorCommand, org.openlaszlo.iv.flash.commands.GenericXMLCommand, org.openlaszlo.iv.flash.commands.MP3SoundCommand, org.openlaszlo.iv.flash.commands.InsertMovieFileCommand, org.openlaszlo.iv.flash.commands.SetEnvironment2Command, org.openlaszlo.iv.flash.commands.InsertMediaCommand, org.openlaszlo.iv.flash.commands.SetBrightnessCommand, org.openlaszlo.iv.flash.commands.ReplicateMovieClipCommand, org.openlaszlo.iv.flash.commands.InsertTextCommand, org.openlaszlo.iv.flash.commands.ReplaceSymbolCommand, org.openlaszlo.iv.flash.commands.FOPCommand, org.openlaszlo.iv.flash.commands.AddExternalMediaCommand, org.openlaszlo.iv.flash.commands.TableCommand, org.openlaszlo.iv.flash.commands.SetEnvironmentCommand, org.openlaszlo.iv.flash.commands.MovieSetCommand, org.openlaszlo.iv.flash.commands.InsertPngFileCommand, org.openlaszlo.iv.flash.commands.SetScaleCommand, org.openlaszlo.iv.flash.commands.TreeMenuCommand, org.openlaszlo.iv.flash.commands.InsertJpegFileCommand, org.openlaszlo.iv.flash.commands.SetAlphaCommand, org.openlaszlo.iv.flash.commands.SetTintCommand, org.openlaszlo.iv.flash.commands.InsertMovieClipCommand, org.openlaszlo.iv.flash.commands.InsertGifFileCommand, org.openlaszlo.iv.flash.commands.GeneralListCommand,
GenericCommand | public class GenericCommand extends FlashObject (Code) | | Generic Generator command. All commands have to subclass it.
|
Method Summary | |
protected void | addMask(Script script, int frameNum, Instance inst, int width, int height) Adds mask for specified instance to specified script
Shifts all layers of all instances beginning from specified one,
then adds mask to specified frame and then searches when specified
instance gets removed from the timeline and if found removes the mask
in the same frame. | protected void | addMask(Script script, int frameNum, Instance inst, Rectangle2D maskRect) | public void | addParameter(String name, String value) | public static GenericCommand | checkAndParseMX(Instance instance) | protected FlashItem | copyInto(FlashItem item, ScriptCopier copier) | public void | doCommand(FlashFile file, Context context, Script parent, int frame) | protected int | findColumn(String columnName, String[][] data) | public boolean | getBoolParameter(String name) | public boolean | getBoolParameter(String name, boolean def) | public boolean | getBoolParameter(Context context, String name, boolean def) | public AlphaColor | getColorParameter(Context context, String name, AlphaColor def) | public Instance | getCommandInstance(FlashFile file, Context context, Script parent, int frameNum) Returns an instance which is associated with commands modifying instances (like Replicate)
- if this command is MX component then
- get parameter "instancename"
- if this parameter is specified then search for an instance in the file with this name
- if found then use it
- if not found search in parent script for an instance which encloses this command.
| public String | getCommandName() | public FlashItem | getCopy(ScriptCopier copier) | public int | getDepth() | public double | getDoubleParameter(Context context, String name, double def) | public int | getFlags() | protected Font | getFont(FlashFile file, String fontName) | public int | getFrameNum() | public Instance | getInstance() | public int | getIntParameter(Context context, String name, int def) | protected Shape | getMask(Rectangle2D r) Creates rectangular shape with default fill&line styles. | public String | getParameter(String name) | public String | getParameter(String name, String defaultValue) | public String | getParameter(Context context, String name, String def) | public String | getParameter(Context context, String name) | public IVVector | getParameterNames() | public int | getTag() | public int | getType() | public boolean | isComponent() | protected boolean | isDefault(String s) | public boolean | isGlobal() | protected Context | makeContext(Context context, String[][] data, int row) | protected LazyText | newSimpleText(String txt, Font font, int height, AlphaColor color) | protected Text | newText(FlashFile file, String msg, Font font, int size, AlphaColor color, Rectangle2D rect) | protected Text | newText(FlashFile file, String msg, Font font, int size, AlphaColor color, int width, int height) | protected Text | newText(FlashFile file, String msg, String fontName, int size, AlphaColor color, Rectangle2D rect) | public static GenericCommand | parse(Parser p) | public void | printContent(PrintStream out, String indent) | protected void | processFlashDef(Instance inst, FlashFile file, Context context) | public void | setDepth(int depth) | public void | setFlags(int flags) | public void | setFrameNum(int frameNum) | public void | setInstance(Instance instance) | public void | setIsComponent(boolean isComponent) | public void | setParameter(String name, String value) | public void | setType(int type) | public void | write(FlashOutput fob) |
TYPE_BUTTON | final public static int TYPE_BUTTON(Code) | | |
TYPE_GLOBAL | final public static int TYPE_GLOBAL(Code) | | |
TYPE_GRAPHICS | final public static int TYPE_GRAPHICS(Code) | | |
TYPE_MOVIE | final public static int TYPE_MOVIE(Code) | | |
GenericCommand | public GenericCommand()(Code) | | |
addMask | protected void addMask(Script script, int frameNum, Instance inst, int width, int height)(Code) | | Adds mask for specified instance to specified script
Shifts all layers of all instances beginning from specified one,
then adds mask to specified frame and then searches when specified
instance gets removed from the timeline and if found removes the mask
in the same frame.
The mask inherits transformation of the specified instance.
Parameters: script - script to insert the mask to Parameters: frameNum - frame number to put the mask in Parameters: inst - instance to be masked Parameters: width - width of the mask Parameters: height - height of the mask |
checkAndParseMX | public static GenericCommand checkAndParseMX(Instance instance)(Code) | | Check the ClipActions to retrieve variable of Commands
if JGeneratorCommand variable exists in the clipEvent action
Parameters: actions - ClipActions the ClipActions of the instance to test java.util.Hashtable the variables |
getBoolParameter | public boolean getBoolParameter(String name)(Code) | | |
getBoolParameter | public boolean getBoolParameter(String name, boolean def)(Code) | | |
getBoolParameter | public boolean getBoolParameter(Context context, String name, boolean def)(Code) | | |
getCommandInstance | public Instance getCommandInstance(FlashFile file, Context context, Script parent, int frameNum) throws IVException(Code) | | Returns an instance which is associated with commands modifying instances (like Replicate)
- if this command is MX component then
- get parameter "instancename"
- if this parameter is specified then search for an instance in the file with this name
- if found then use it
- if not found search in parent script for an instance which encloses this command.
by enclosing I mean that its bounds encloses the comamnd bounds
- if this command is not an MX component then just use this command instance as an instance
Parameters: file - current flash file Parameters: context - current context Parameters: parent - parent script (where the command is placed) Parameters: frameNum - frame number where the command is instantiated the instance to which this command has to be applied exception: IVException - |
getCommandName | public String getCommandName()(Code) | | Returns command name
command name |
getDepth | public int getDepth()(Code) | | |
getDoubleParameter | public double getDoubleParameter(Context context, String name, double def)(Code) | | |
getFlags | public int getFlags()(Code) | | |
getFrameNum | public int getFrameNum()(Code) | | |
getMask | protected Shape getMask(Rectangle2D r)(Code) | | Creates rectangular shape with default fill&line styles.
Parameters: r - rectangle to be used for the shape rectangular shape |
getTag | public int getTag()(Code) | | |
getType | public int getType()(Code) | | Returns command type
One of the following:
- TYPE_MOVIE
- TYPE_BUTTON
- TYPE_GRAPHICS
- TYPE_GLOBAL
command type |
isComponent | public boolean isComponent()(Code) | | Gets the isComponent flag
|
isGlobal | public boolean isGlobal()(Code) | | |
newSimpleText | protected LazyText newSimpleText(String txt, Font font, int height, AlphaColor color)(Code) | | Creates simple text and calculates its bounds
Text should not contain newlines
Parameters: txt - text Parameters: font - font Parameters: height - font height Parameters: color - text color created text |
setDepth | public void setDepth(int depth)(Code) | | |
setFlags | public void setFlags(int flags)(Code) | | |
setFrameNum | public void setFrameNum(int frameNum)(Code) | | |
setIsComponent | public void setIsComponent(boolean isComponent)(Code) | | Sets the isComponent flag
Parameters: isComponent - boolean |
setType | public void setType(int type)(Code) | | Sets command type
One of the following:
- TYPE_MOVIE
- TYPE_BUTTON
- TYPE_GRAPHICS
- TYPE_GLOBAL
Parameters: type - command type |
|
|