Java Doc for GenericCommand.java in  » Ajax » Laszlo-4.0.10 » org » openlaszlo » iv » flash » commands » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Ajax » Laszlo 4.0.10 » org.openlaszlo.iv.flash.commands 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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.


Field Summary
final public static  intTYPE_BUTTON
    
final public static  intTYPE_GLOBAL
    
final public static  intTYPE_GRAPHICS
    
final public static  intTYPE_MOVIE
    

Constructor Summary
public  GenericCommand()
    

Method Summary
protected  voidaddMask(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  voidaddMask(Script script, int frameNum, Instance inst, Rectangle2D maskRect)
    
public  voidaddParameter(String name, String value)
    
public static  GenericCommandcheckAndParseMX(Instance instance)
    
protected  FlashItemcopyInto(FlashItem item, ScriptCopier copier)
    
public  voiddoCommand(FlashFile file, Context context, Script parent, int frame)
    
protected  intfindColumn(String columnName, String[][] data)
    
public  booleangetBoolParameter(String name)
    
public  booleangetBoolParameter(String name, boolean def)
    
public  booleangetBoolParameter(Context context, String name, boolean def)
    
public  AlphaColorgetColorParameter(Context context, String name, AlphaColor def)
    
public  InstancegetCommandInstance(FlashFile file, Context context, Script parent, int frameNum)
     Returns an instance which is associated with commands modifying instances (like Replicate)

  1. if this command is MX component then
    1. get parameter "instancename"
    2. if this parameter is specified then search for an instance in the file with this name
    3. if found then use it
    4. if not found search in parent script for an instance which encloses this command.
public  StringgetCommandName()
    
public  FlashItemgetCopy(ScriptCopier copier)
    
public  intgetDepth()
    
public  doublegetDoubleParameter(Context context, String name, double def)
    
public  intgetFlags()
    
protected  FontgetFont(FlashFile file, String fontName)
    
public  intgetFrameNum()
    
public  InstancegetInstance()
    
public  intgetIntParameter(Context context, String name, int def)
    
protected  ShapegetMask(Rectangle2D r)
     Creates rectangular shape with default fill&line styles.
public  StringgetParameter(String name)
    
public  StringgetParameter(String name, String defaultValue)
    
public  StringgetParameter(Context context, String name, String def)
    
public  StringgetParameter(Context context, String name)
    
public  IVVectorgetParameterNames()
    
public  intgetTag()
    
public  intgetType()
    
public  booleanisComponent()
    
protected  booleanisDefault(String s)
    
public  booleanisGlobal()
    
protected  ContextmakeContext(Context context, String[][] data, int row)
    
protected  LazyTextnewSimpleText(String txt, Font font, int height, AlphaColor color)
    
protected  TextnewText(FlashFile file, String msg, Font font, int size, AlphaColor color, Rectangle2D rect)
    
protected  TextnewText(FlashFile file, String msg, Font font, int size, AlphaColor color, int width, int height)
    
protected  TextnewText(FlashFile file, String msg, String fontName, int size, AlphaColor color, Rectangle2D rect)
    
public static  GenericCommandparse(Parser p)
    
public  voidprintContent(PrintStream out, String indent)
    
protected  voidprocessFlashDef(Instance inst, FlashFile file, Context context)
    
public  voidsetDepth(int depth)
    
public  voidsetFlags(int flags)
    
public  voidsetFrameNum(int frameNum)
    
public  voidsetInstance(Instance instance)
    
public  voidsetIsComponent(boolean isComponent)
    
public  voidsetParameter(String name, String value)
    
public  voidsetType(int type)
    
public  voidwrite(FlashOutput fob)
    

Field Detail
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)




Constructor Detail
GenericCommand
public GenericCommand()(Code)




Method Detail
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




addMask
protected void addMask(Script script, int frameNum, Instance inst, Rectangle2D maskRect)(Code)



addParameter
public void addParameter(String name, String value)(Code)



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



copyInto
protected FlashItem copyInto(FlashItem item, ScriptCopier copier)(Code)



doCommand
public void doCommand(FlashFile file, Context context, Script parent, int frame) throws IVException(Code)



findColumn
protected int findColumn(String columnName, String[][] data)(Code)



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)



getColorParameter
public AlphaColor getColorParameter(Context context, String name, AlphaColor 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)

  1. if this command is MX component then
    1. get parameter "instancename"
    2. if this parameter is specified then search for an instance in the file with this name
    3. if found then use it
    4. 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
  2. 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



getCopy
public FlashItem getCopy(ScriptCopier copier)(Code)



getDepth
public int getDepth()(Code)



getDoubleParameter
public double getDoubleParameter(Context context, String name, double def)(Code)



getFlags
public int getFlags()(Code)



getFont
protected Font getFont(FlashFile file, String fontName)(Code)



getFrameNum
public int getFrameNum()(Code)



getInstance
public Instance getInstance()(Code)
Returns instance



getIntParameter
public int getIntParameter(Context context, String name, int def)(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



getParameter
public String getParameter(String name)(Code)



getParameter
public String getParameter(String name, String defaultValue)(Code)



getParameter
public String getParameter(Context context, String name, String def)(Code)



getParameter
public String getParameter(Context context, String name)(Code)



getParameterNames
public IVVector getParameterNames()(Code)



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



isDefault
protected boolean isDefault(String s)(Code)



isGlobal
public boolean isGlobal()(Code)



makeContext
protected Context makeContext(Context context, String[][] data, int row) throws IVException(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




newText
protected Text newText(FlashFile file, String msg, Font font, int size, AlphaColor color, Rectangle2D rect)(Code)



newText
protected Text newText(FlashFile file, String msg, Font font, int size, AlphaColor color, int width, int height)(Code)



newText
protected Text newText(FlashFile file, String msg, String fontName, int size, AlphaColor color, Rectangle2D rect)(Code)



parse
public static GenericCommand parse(Parser p)(Code)



printContent
public void printContent(PrintStream out, String indent)(Code)



processFlashDef
protected void processFlashDef(Instance inst, FlashFile file, Context context) throws IVException(Code)



setDepth
public void setDepth(int depth)(Code)



setFlags
public void setFlags(int flags)(Code)



setFrameNum
public void setFrameNum(int frameNum)(Code)



setInstance
public void setInstance(Instance instance)(Code)



setIsComponent
public void setIsComponent(boolean isComponent)(Code)
Sets the isComponent flag
Parameters:
  isComponent - boolean



setParameter
public void setParameter(String name, String value)(Code)



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



write
public void write(FlashOutput fob)(Code)



Methods inherited from org.openlaszlo.iv.flash.api.FlashObject
protected boolean _isConstant()(Code)(Java Doc)
public void apply(Context context)(Code)(Java Doc)
public void collectDeps(DepsCollector dc)(Code)(Java Doc)
public void collectFonts(FontsCollector fc)(Code)(Java Doc)
protected FlashItem copyInto(FlashItem item, ScriptCopier copier)(Code)(Java Doc)
public void generate(FlashOutput fob, DepsCollector dc)(Code)(Java Doc)
public Rectangle2D getBounds()(Code)(Java Doc)
abstract public int getTag()(Code)(Java Doc)
public boolean isConstant()(Code)(Java Doc)
public boolean isProcessed()(Code)(Java Doc)
public void printContent(PrintStream out, String indent)(Code)(Java Doc)
public void process(FlashFile file, Context context) throws IVException(Code)(Java Doc)
protected void setConstant(boolean is_const)(Code)(Java Doc)
public void setProcessed()(Code)(Java Doc)

Methods inherited from org.openlaszlo.iv.flash.api.FlashItem
protected FlashItem copyInto(FlashItem item, ScriptCopier copier)(Code)(Java Doc)
public FlashItem getCopy(ScriptCopier copier)(Code)(Java Doc)
abstract public void printContent(PrintStream out, String indent)(Code)(Java Doc)
public String toString()(Code)(Java Doc)
abstract public void write(FlashOutput fob)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.