| java.lang.Object org.openlaszlo.iv.flash.util.CommandExecutor
CommandExecutor | public class CommandExecutor (Code) | | Standard executor of context commands.
To add new command you have to add new method to this class
or to one of its subclasses. Name of the command will be name of the method.
If command was invoked without parameters then method without parameters will be
called, if command was invoked with several parameters then method with corresponding
number of parameters will be called. If none of these was succeded then method with
parameter Vector will be called.
author: Dmitry Skavish See Also: CommandContext |
Method Summary | |
public String | alpha(Context context, String s) | public String | blue(Context context, String s) | public String | color2web(Context context, String s) | public String | d2b(Context context, String s) | public String | d2h(Context context, String s) | public String | date(Context context) | public String | date(Context context, String format) | public String | execute(Context context, String name, Vector parms) Executes command. | public FlashFile | getFlashFile() | public String | green(Context context, String s) | public String | h2d(Context context, String s) | public String | js(Context context, String fileName) | public String | len(Context context, String s) | public String | red(Context context, String s) | public void | setFlashFile(FlashFile flashFile) | public String | substr(Context context, String s, String from) | public String | substr(Context context, String s, String from, String to) | public String | version(Context context) |
CommandExecutor | public CommandExecutor(FlashFile flashFile)(Code) | | Create executor in environment of given flash file.
Parameters: file - environment for executor |
CommandExecutor | public CommandExecutor()(Code) | | |
alpha | public String alpha(Context context, String s)(Code) | | Returns alpha component of specified color in decimal
Parameters: s - specified color either by its name or by web color alpha component |
blue | public String blue(Context context, String s)(Code) | | Returns blue component of specified color in decimal
Parameters: s - specified color either by its name or by web color blue component |
color2web | public String color2web(Context context, String s)(Code) | | Converts color to its web color representation
For example:
red -> #ffff0000
green -> #ff00ff00
Parameters: s - color specified either by name or by webcolor web representation of color |
d2b | public String d2b(Context context, String s)(Code) | | Converts decimal to binary: 4 -> 100
Parameters: s - string in decimal representation binary representation |
d2h | public String d2h(Context context, String s)(Code) | | Converts decimal to hex: 32 -> 20
Parameters: s - string in decimal representation hex representation |
date | public String date(Context context)(Code) | | Returns current time and date
current time and date |
date | public String date(Context context, String format)(Code) | | Returns current time and date formatted according to given template.
Examples:
Parameters: format - date format current formatted date |
execute | public String execute(Context context, String name, Vector parms)(Code) | | Executes command.
Parameters: context - context from which the command was called Parameters: name - name fo the command Parameters: parms - parameters or null result of the command execution |
green | public String green(Context context, String s)(Code) | | Returns green component of specified color in decimal
Parameters: s - specified color either by its name or by web color green component |
h2d | public String h2d(Context context, String s)(Code) | | Converts hex to decimal: 20 -> 32
Parameters: s - string in hex representation decimal representation |
js | public String js(Context context, String fileName)(Code) | | Loads and executes javascript file
Parameters: fileName - file with javascript whatever was printed during execution of javascript |
len | public String len(Context context, String s)(Code) | | Returns length of the specified string
Parameters: s - specified string length of the specified string |
red | public String red(Context context, String s)(Code) | | Returns red component of specified color in decimal
Parameters: s - specified color either by its name or by web color red component |
substr | public String substr(Context context, String s, String from)(Code) | | Returns substring of specified string
Parameters: s - specified string Parameters: from - start index substring |
substr | public String substr(Context context, String s, String from, String to)(Code) | | Returns substring of specified string
Parameters: s - specified string Parameters: from - start index Parameters: to - to index substring |
version | public String version(Context context)(Code) | | Return JGenerator version
JGenerator version |
|
|