Java Doc for ActionProvider.java in  » IDE-Netbeans » performance » org » netbeans » actions » spi » 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 » performance » org.netbeans.actions.spi 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.netbeans.actions.spi.ActionProvider

All known Subclasses:   org.netbeans.actions.spi.ProxyActionProvider,  org.netbeans.actions.simple.SimpleActionProvider,
ActionProvider
abstract public class ActionProvider (Code)
The heart of the actions framework from the application author's perspective - the implementation of this class supplies the available actions in a given context. Note that this class neither constructs Action objects, nor menu items or other visual components - these are only needed when something needs to be shown or updated, and the engine will provide items to display them as needed.

This works as follows: When menus or toolbars need to be displayed/created/ updated, the Engine will ask its master ActionProvider for the actionNames for each container context. A container context is simply a programmatic name for a menu, toolbar, etc. It will then iterate those names, calling the other methods like getDisplayName, to get the relevant data that is needed by the presenter to display them, and use that information to correctly configure the presenters.

The programmatic names that will be passed in are a private contract between an implementation and its method of registering actions in the system. For example, an implementation may allow components to register menus and toolbars in an XML file; so the names for, e.g., menus will be provided there. An application's documentation will specify how to register actions, contexts, etc. and its implementation of ActionProvider will use this registry to look up information about actions.

The only method that is passed any state information about the application is getState(). This call is used to determine if a presenter is visible and enabled or disabled, which is all the information that is needed to display a presenter correctly. It is passed a Map which contains all the available information about the current user context (what object is selected, what window is focused, etc.) The implementation can query the map, to decide what to display and its state. The actual contents of this map are a private contract with a given implementation. For example, in NetBeans, the Map will probably be a wrapper for the selected node and its Lookup.
author:
   Tim Boudreau



Field Summary
final public static  intACTION_TYPE_ITEM
    
final public static  intACTION_TYPE_SUBCONTEXT
    
final public static  intACTION_TYPE_TOGGLE
    
final public static  intSTATE_ENABLED
    
final public static  intSTATE_SELECTED
    
final public static  intSTATE_VISIBLE
    


Method Summary
abstract public  String[]getActionNames(String containerCtx)
     Get the programmatic names (not display names) for all of the actions in a given context.
abstract public  intgetActionType(String actionName, String containerCtx)
     Get the action type.
abstract public  StringgetDescription(String actionName, String containerCtx)
     Get a description for an action appropriate for use in a tooltip.
abstract public  StringgetDisplayName(String actionName, String containerCtx)
    
abstract public  IcongetIcon(String actionName, String containerCtx, int type)
     Get the icon, if any, for a given action.
abstract public  intgetMnemonic(String actionName, String containerCtx)
    
abstract public  intgetMnemonicIndex(String actionName, String containerCtx)
    
abstract public  intgetState(String actionName, String containerCtx, Map context)
     Get the enablement/visibility state of the named action, given the passed user context map.

Field Detail
ACTION_TYPE_ITEM
final public static int ACTION_TYPE_ITEM(Code)



ACTION_TYPE_SUBCONTEXT
final public static int ACTION_TYPE_SUBCONTEXT(Code)



ACTION_TYPE_TOGGLE
final public static int ACTION_TYPE_TOGGLE(Code)



STATE_ENABLED
final public static int STATE_ENABLED(Code)



STATE_SELECTED
final public static int STATE_SELECTED(Code)



STATE_VISIBLE
final public static int STATE_VISIBLE(Code)





Method Detail
getActionNames
abstract public String[] getActionNames(String containerCtx)(Code)
Get the programmatic names (not display names) for all of the actions in a given context. The result should include all actions registered for that context whether or not they're enabled/displayed/etc. getState() will be called later for each to decide if they should be presented currently, or hidden.



getActionType
abstract public int getActionType(String actionName, String containerCtx)(Code)
Get the action type. This will not be called for toolbars, but will be called for menus to determine if a submenu presenter or a menu item presenter is needed



getDescription
abstract public String getDescription(String actionName, String containerCtx)(Code)
Get a description for an action appropriate for use in a tooltip. Used for toolbar presenters.



getDisplayName
abstract public String getDisplayName(String actionName, String containerCtx)(Code)
Get the display name for a given action name returned from getActionNames, in a given logical action container (toolbar, menu, etc)



getIcon
abstract public Icon getIcon(String actionName, String containerCtx, int type)(Code)
Get the icon, if any, for a given action. The type argument is as defined in BeanInfo



getMnemonic
abstract public int getMnemonic(String actionName, String containerCtx)(Code)
Get the mnemonic to be used for action text



getMnemonicIndex
abstract public int getMnemonicIndex(String actionName, String containerCtx)(Code)
Get the displayed mnemonic index for action text



getState
abstract public int getState(String actionName, String containerCtx, Map context)(Code)
Get the enablement/visibility state of the named action, given the passed user context map.



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.