Java Doc for Action.java in  » IDE-Netbeans » visualweb.api.designer » org » netbeans » modules » visualweb » gravy » actions » 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 » IDE Netbeans » visualweb.api.designer » org.netbeans.modules.visualweb.gravy.actions 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.netbeans.modules.visualweb.gravy.actions.Action

All known Subclasses:   org.netbeans.modules.visualweb.gravy.actions.BuildProjectAction,  org.netbeans.modules.visualweb.gravy.actions.DeleteAction,  org.netbeans.modules.visualweb.gravy.actions.ShowDescriptionAreaAction,  org.netbeans.modules.visualweb.gravy.actions.CloseProjectAction,  org.netbeans.modules.visualweb.gravy.actions.SaveAction,  org.netbeans.modules.visualweb.gravy.actions.OptionsViewAction,  org.netbeans.modules.visualweb.gravy.websvc.actions.CreateGroupAction,  org.netbeans.modules.visualweb.gravy.actions.HelpAction,  org.netbeans.modules.visualweb.gravy.websvc.actions.AddWebServiceAction,  org.netbeans.modules.visualweb.gravy.actions.ShowProjectsAction,  org.netbeans.modules.visualweb.gravy.actions.ActionNoBlock,  org.netbeans.modules.visualweb.gravy.actions.SortByCategoryAction,  org.netbeans.modules.visualweb.gravy.actions.SortByNameAction,  org.netbeans.modules.visualweb.gravy.actions.ShowFilesAction,  org.netbeans.modules.visualweb.gravy.actions.FindAction,  org.netbeans.modules.visualweb.gravy.actions.PropertiesAction,
Action
public class Action (Code)
Ancestor class for all blocking actions.

It handles performing action through main menu (MENU_MODE), popup menu (POPUP_MODE), IDE SystemAction API call (API_MODE) or through keyboard shortcut (SHORTCUT_MODE).

Action can be performed in exact mode by calling performMenu(...), performPopup(...), performAPI(...) or performShortcut(...).

If exact mode is not supported by the action it throws UnsupportedOperationException.

Current implementation supports MENU_MODE when menuPath is defined, POPUP_MODE when popupPath is defined, API_MODE when systemActionClass is defined and SHORTCUT_MODE when shorcut is defined (see Action constructors).

Action also can be performed using runtime default mode by calling perform(...).

When default mode is not support by the action other modes are tried till supported mode found and action is performed.
Timeouts used:
Action.WaitAfterShortcutTimeout - time to sleep between shortcuts in sequence (default 0)

author:
   Adam Sotona


Inner Class :public static class Shortcut extends Object

Field Summary
final protected static  longAFTER_ACTION_WAIT_TIME
    
final public static  intAPI_MODE
    
final public static  intMENU_MODE
    
final public static  intPOPUP_MODE
    
final protected static  longSELECTION_WAIT_TIME
    
final public static  intSHORTCUT_MODE
    
final protected static  longWAIT_AFTER_SHORTCUT_TIMEOUT
    
protected  StringmenuPath
    
protected  StringpopupPath
    
protected  Shortcut[]shortcuts
    
protected  ClasssystemActionClass
    

Constructor Summary
public  Action(String menuPath, String popupPath)
    
public  Action(String menuPath, String popupPath, String systemActionClass)
    
public  Action(String menuPath, String popupPath, Shortcut[] shortcuts)
    
public  Action(String menuPath, String popupPath, Shortcut shortcut)
    
public  Action(String menuPath, String popupPath, String systemActionClass, Shortcut[] shortcuts)
    
public  Action(String menuPath, String popupPath, String systemActionClass, Shortcut shortcut)
    

Method Summary
public  StringComparatorgetComparator()
     Gets comparator set for this action instance.
public  intgetDefaultMode()
     Returns default mode in which actions are performed.
public  StringgetMenuPath()
    
public  StringgetPopupPath()
    
public  Shortcut[]getShortcuts()
    
public  ClassgetSystemActionClass()
    
public  booleanisEnabled()
     Checks whether this action is enabled.
public  booleanisEnabled(Node[] nodes)
     Checks whether this action on given nodes is enabled.
public  booleanisEnabled(Node node)
     Checks whether this action on given node is enabled.
public  booleanisEnabled(ComponentOperator componentOperator)
     Checks whether this action is enabled for given ComponentOperator.
public  voidperform()
    
public  voidperform(Node node)
    
public  voidperform(Node[] nodes)
    
public  voidperform(ComponentOperator component)
    
public  voidperformAPI()
    
public  voidperformAPI(Node node)
    
public  voidperformAPI(Node[] nodes)
    
public  voidperformAPI(ComponentOperator component)
    
public  voidperformMenu()
    
public  voidperformMenu(Node node)
    
public  voidperformMenu(Node[] nodes)
    
public  voidperformMenu(ComponentOperator component)
    
public  voidperformPopup()
    
public  voidperformPopup(Node node)
    
public  voidperformPopup(Node[] nodes)
    
public  voidperformPopup(ComponentOperator component)
    
public  voidperformShortcut()
    
public  voidperformShortcut(Node node)
    
public  voidperformShortcut(Node[] nodes)
    
public  voidperformShortcut(ComponentOperator component)
    
public  voidsetComparator(StringComparator comparator)
     Sets comparator fot this action.
public  intsetDefaultMode(int mode)
     Sets default mode in which actions are performed.
protected  voidtestNodes(Node[] nodes)
    

Field Detail
AFTER_ACTION_WAIT_TIME
final protected static long AFTER_ACTION_WAIT_TIME(Code)
sleep time after action execution



API_MODE
final public static int API_MODE(Code)
through API action performing mode



MENU_MODE
final public static int MENU_MODE(Code)
through menu action performing mode



POPUP_MODE
final public static int POPUP_MODE(Code)
through popup menu action performing mode



SELECTION_WAIT_TIME
final protected static long SELECTION_WAIT_TIME(Code)
sleep time between nodes selection and action execution



SHORTCUT_MODE
final public static int SHORTCUT_MODE(Code)
through shortcut action performing mode



WAIT_AFTER_SHORTCUT_TIMEOUT
final protected static long WAIT_AFTER_SHORTCUT_TIMEOUT(Code)
sleep time between sequence of shortcuts



menuPath
protected String menuPath(Code)
menu path of current action or null when MENU_MODE is not supported



popupPath
protected String popupPath(Code)
popup menu path of current action or null when POPUP_MODE is not supported



shortcuts
protected Shortcut[] shortcuts(Code)
array of shortcuts of current action or null when SHORTCUT_MODE is not supported



systemActionClass
protected Class systemActionClass(Code)
SystemAction class of current action or null when API_MODE is not supported




Constructor Detail
Action
public Action(String menuPath, String popupPath)(Code)
creates new Action instance without API_MODE and SHORTCUT_MODE support
Parameters:
  menuPath - action path in main menu (use null value if menu mode is not supported)
Parameters:
  popupPath - action path in popup menu (use null value if popup mode shell is not supported)



Action
public Action(String menuPath, String popupPath, String systemActionClass)(Code)
creates new Action instance without SHORTCUT_MODE support
Parameters:
  menuPath - action path in main menu (use null value if menu mode is not supported)
Parameters:
  popupPath - action path in popup menu (use null value if popup mode is not supported)
Parameters:
  systemActionClass - String class name of SystemAction (use null value if API mode is not supported)



Action
public Action(String menuPath, String popupPath, Shortcut[] shortcuts)(Code)
creates new Action instance without API_MODE support
Parameters:
  shortcuts - array of Shortcut instances (use null value if shorcut mode is not supported)
Parameters:
  menuPath - action path in main menu (use null value if menu mode is not supported)
Parameters:
  popupPath - action path in popup menu (use null value if popup mode shell is not supported)



Action
public Action(String menuPath, String popupPath, Shortcut shortcut)(Code)
creates new Action instance without API_MODE support
Parameters:
  shortcut - Shortcut (use null value if menu mode is not supported)
Parameters:
  menuPath - action path in main menu (use null value if menu mode is not supported)
Parameters:
  popupPath - action path in popup menu (use null value if popup mode shell is not supported)



Action
public Action(String menuPath, String popupPath, String systemActionClass, Shortcut[] shortcuts)(Code)
creates new Action instance
Parameters:
  shortcuts - array of Shortcut instances (use null value if shortcut mode is not supported)
Parameters:
  menuPath - action path in main menu (use null value if menu mode is not supported)
Parameters:
  popupPath - action path in popup menu (use null value if popup mode is not supported)
Parameters:
  systemActionClass - String class name of SystemAction (use null value if API mode is not supported)



Action
public Action(String menuPath, String popupPath, String systemActionClass, Shortcut shortcut)(Code)
creates new Action instance
Parameters:
  shortcut - Shortcut String (use null value if menu mode is not supported)
Parameters:
  menuPath - action path in main menu (use null value if menu mode is not supported)
Parameters:
  popupPath - action path in popup menu (use null value if popup mode is not supported)
Parameters:
  systemActionClass - String class name of SystemAction (use null value if API mode is not supported)




Method Detail
getComparator
public StringComparator getComparator()(Code)
Gets comparator set for this action instance. comparator set for this action instance.



getDefaultMode
public int getDefaultMode()(Code)
Returns default mode in which actions are performed. default mode in which actions are performed
See Also:   Action.POPUP_MODE
See Also:   Action.MENU_MODE
See Also:   Action.API_MODE
See Also:   Action.SHORTCUT_MODE



getMenuPath
public String getMenuPath()(Code)
getter for main menu path String main menu path (or null if not suported)



getPopupPath
public String getPopupPath()(Code)
getter for popup menu path String popup menu path (or null if not suported)



getShortcuts
public Shortcut[] getShortcuts()(Code)
getter for array of shortcuts Shortcut[] (or null if not suported)



getSystemActionClass
public Class getSystemActionClass()(Code)
getter for system action class Class of system action (or null if not suported)



isEnabled
public boolean isEnabled()(Code)
Checks whether this action is enabled. If IDE system action class is defined, it calls its isEnabled() method else if main menu path is defined, it checks menu item is enabled. Otherwise it throws UnsupportedOperationException. true if this action is enabled; false otherwise



isEnabled
public boolean isEnabled(Node[] nodes)(Code)
Checks whether this action on given nodes is enabled. If IDE system action class is defined, it calls its isEnabled() method. Nodes are selected first. Else if popup menu path is defined, it checks menu item is enabled. Otherwise it throws UnsupportedOperationException.
Parameters:
  nodes - array of nodes to be selected before a check true if this action is enabled; false otherwise



isEnabled
public boolean isEnabled(Node node)(Code)
Checks whether this action on given node is enabled. If IDE system action class is defined, it calls its isEnabled() method. Node is selected first. Else if popup menu path is defined, it checks menu item is enabled. Otherwise it throws UnsupportedOperationException.
Parameters:
  node - node to be selected before a check true if this action is enabled; false otherwise



isEnabled
public boolean isEnabled(ComponentOperator componentOperator)(Code)
Checks whether this action is enabled for given ComponentOperator. First it makes component visible and focused. If IDE system action class is defined, it calls its isEnabled() method. Else if main menu path is defined, it checks menu item is enabled. Otherwise it throws UnsupportedOperationException.
Parameters:
  componentOperator - instance of ComponentOperator true if this action is enabled; false otherwise



perform
public void perform()(Code)
performs action depending on default mode,
calls performPopup(), performMenu() or performAPI(),
when default mode is not supported, others are tried



perform
public void perform(Node node)(Code)
performs action depending on default mode,
calls performPopup(), performMenu() or performAPI(),
when default mode is not supported, others are tried
Parameters:
  node - node to be action performed on



perform
public void perform(Node[] nodes)(Code)
performs action depending on default mode,
calls performPopup(), performMenu() or performAPI(),
when default mode is not supported, others are tried
Parameters:
  nodes - nodes to be action performed on



perform
public void perform(ComponentOperator component)(Code)
performs action depending on default mode,
calls performPopup(), performMenu() or performAPI(),
when default mode is not supported, others are tried
Parameters:
  component - component to be action performed on



performAPI
public void performAPI()(Code)
performs action through API
throws:
  UnsupportedOperationException - when action does not support API mode



performAPI
public void performAPI(Node node)(Code)
performs action through API
Parameters:
  node - node to be action performed on
throws:
  UnsupportedOperationException - when action does not support API mode



performAPI
public void performAPI(Node[] nodes)(Code)
performs action through API
Parameters:
  nodes - nodes to be action performed on
throws:
  UnsupportedOperationException - when action does not support API mode



performAPI
public void performAPI(ComponentOperator component)(Code)
performs action through API
Parameters:
  component - component to be action performed on
throws:
  UnsupportedOperationException - when action does not support API mode



performMenu
public void performMenu()(Code)
performs action through main menu
throws:
  UnsupportedOperationException - when action does not support menu mode



performMenu
public void performMenu(Node node)(Code)
performs action through main menu
Parameters:
  node - node to be action performed on
throws:
  UnsupportedOperationException - when action does not support menu mode



performMenu
public void performMenu(Node[] nodes)(Code)
performs action through main menu
Parameters:
  nodes - nodes to be action performed on
throws:
  UnsupportedOperationException - when action does not support menu mode



performMenu
public void performMenu(ComponentOperator component)(Code)
performs action through main menu
Parameters:
  component - component to be action performed on
throws:
  UnsupportedOperationException - when action does not support menu mode



performPopup
public void performPopup()(Code)
performs action through popup menu
throws:
  UnsupportedOperationException -



performPopup
public void performPopup(Node node)(Code)
performs action through popup menu
Parameters:
  node - node to be action performed on
throws:
  UnsupportedOperationException - when action does not support popup mode



performPopup
public void performPopup(Node[] nodes)(Code)
performs action through popup menu
Parameters:
  nodes - nodes to be action performed on
throws:
  UnsupportedOperationException - when action does not support popup mode



performPopup
public void performPopup(ComponentOperator component)(Code)
performs action through popup menu
Parameters:
  component - component to be action performed on
throws:
  UnsupportedOperationException - when action does not support popup mode



performShortcut
public void performShortcut()(Code)
performs action through shortcut
throws:
  UnsupportedOperationException - if no shortcut is defined



performShortcut
public void performShortcut(Node node)(Code)
performs action through shortcut
Parameters:
  node - node to be action performed on
throws:
  UnsupportedOperationException - when action does not support shortcut mode



performShortcut
public void performShortcut(Node[] nodes)(Code)
performs action through shortcut
Parameters:
  nodes - nodes to be action performed on
throws:
  UnsupportedOperationException - when action does not support shortcut mode



performShortcut
public void performShortcut(ComponentOperator component)(Code)
performs action through shortcut
Parameters:
  component - component to be action performed on
throws:
  UnsupportedOperationException - when action does not support shortcut mode



setComparator
public void setComparator(StringComparator comparator)(Code)
Sets comparator fot this action. Comparator is used for all actions after this method is called.
Parameters:
  comparator - new comparator to be set (e.g.new Operator.DefaultStringComparator(true, true);to search string item exactly and case sensitive)



setDefaultMode
public int setDefaultMode(int mode)(Code)
Sets default mode in which actions are performed. If given mode value is not valid, it sets Action.POPUP_MODE as default.
Parameters:
  mode - mode to be set previous value
See Also:   Action.POPUP_MODE
See Also:   Action.MENU_MODE
See Also:   Action.API_MODE
See Also:   Action.SHORTCUT_MODE



testNodes
protected void testNodes(Node[] nodes)(Code)
tests if nodes are all from the same tree
Parameters:
  nodes - nodes
throws:
  IllegalArgumentException - when given nodes does not pass



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.