Java Doc for ActionSet.java in  » Swing-Library » jEdit » org » gjt » sp » jedit » 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 » Swing Library » jEdit » org.gjt.sp.jedit 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.gjt.sp.jedit.ActionSet

ActionSet
public class ActionSet (Code)
A set of actions, either loaded from an XML file, or constructed at runtime by a plugin.

Action sets loaded from XML files

Action sets are read from these files inside the plugin JAR:
  • actions.xml - actions made available for use in jEdit views, including the view's Plugins menu, the tool bar, etc.
  • browser.actions.xml - actions for the file system browser's Plugins menu.
An action definition file has the following form:
<?xml version="1.0"?>
 <!DOCTYPE ACTIONS SYSTEM "actions.dtd">
 <ACTIONS>
 <ACTION NAME="some-action">
 <CODE>
 // BeanShell code evaluated when the action is invoked
 </CODE>
 </ACTION>
 <ACTION NAME="some-toggle-action">
 <CODE>
 // BeanShell code evaluated when the action is invoked
 </CODE>
 <IS_SELECTED>
 // BeanShell code that should evaluate to true or false
 </IS_SELECTED>
 </ACTION>
 </ACTIONS>
The following elements are valid:
  • ACTIONS is the top-level element and refers to the set of actions used by the plugin.
  • An ACTION contains the data for a particular action. It has three attributes: a required NAME; an optional NO_REPEAT, which is a flag indicating whether the action should not be repeated with the C+ENTER command; and an optional NO_RECORD which is a a flag indicating whether the action should be recorded if it is invoked while the user is recording a macro. The two flag attributes can have two possible values, "TRUE" or "FALSE". In both cases, "FALSE" is the default if the attribute is not specified.
  • An ACTION can have two child elements within it: a required CODE element which specifies the BeanShell code that will be executed when the action is invoked, and an optional IS_SELECTED element, used for checkbox menu items. The IS_SELECTED element contains BeanShell code that returns a boolean flag that will determine the state of the checkbox.
Each action must have a property name.label containing the action's menu item label.

View actions

Actions defined in actions.xml can be added to the view's Plugins menu; see EditPlugin . The action code may use any standard predefined BeanShell variable; see BeanShell .

File system browser actions

Actions defined in actions.xml can be added to the file system browser's Plugins menu; see EditPlugin . The action code may use any standard predefined BeanShell variable, in addition to a variable browser which contains a reference to the current org.gjt.sp.jedit.browser.VFSBrowser instance.

File system browser actions should not define <IS_SELECTED> blocks.

Custom action sets

Call jEdit.addActionSet(ActionSet) to add a custom action set to jEdit's action context. You must also call ActionSet.initKeyBindings() for new action sets. Don't forget to call jEdit.removeActionSet(ActionSet) before your plugin is unloaded, too.
See Also:   jEdit.getActionContext
See Also:   org.gjt.sp.jedit.browser.VFSBrowser.getActionContext
See Also:   ActionContext.getActionNames
See Also:   ActionContext.getAction(String)
See Also:   jEdit.addActionSet(ActionSet)
See Also:   jEdit.removeActionSet(ActionSet)
See Also:   PluginJAR.getActionSet
See Also:   BeanShell
See Also:   View
author:
   Slava Pestov
author:
   John Gellene (API documentation)
version:
   $Id: ActionSet.java 9529 2007-05-12 15:06:52Z ezust $
since:
   jEdit 4.0pre1


Field Summary
 ActionContextcontext
    

Constructor Summary
public  ActionSet()
     Creates a new action set.
public  ActionSet(PluginJAR plugin, String[] cachedActionNames, boolean[] cachedActionToggleFlags, URL uri)
     Creates a new action set.
public  ActionSet(String label)
     Creates a new action set.

Method Summary
public  voidaddAction(EditAction action)
     Adds an action to the action set.
public  booleancontains(String action)
     Returns if this action set contains the specified action.
public  EditActiongetAction(String name)
     Returns an action with the specified name.

Deferred loading: this will load the action set if necessary.

public  intgetActionCount()
     Returns the number of actions in the set.
public  String[]getActionNames()
     Returns an array of all action names in this action set.
 voidgetActionNames(List vec)
    
public  EditAction[]getActions()
     Returns an array of all actions in this action set.

Deferred loading: this will load the action set if necessary.

public  String[]getCacheableActionNames()
     Returns an array of all action names in this action set that should be cached; namely, BeanShellActions.
public  StringgetLabel()
     Return the action source label.
public  PluginJARgetPluginJAR()
     Return the plugin this action set was loaded from, or null.
public  voidinitKeyBindings()
     Initializes the action set's key bindings.
public  voidload()
     Forces the action set to be loaded.
public  voidremoveAction(String name)
     Removes an action from the action set.
public  voidremoveAllActions()
     Removes all actions from the action set.
public  voidsetLabel(String label)
     Sets the action source label.
public  intsize()
     Returns the number of actions in this action set.
public  StringtoString()
    

Field Detail
context
ActionContext context(Code)




Constructor Detail
ActionSet
public ActionSet()(Code)
Creates a new action set.
since:
   jEdit 4.0pre1



ActionSet
public ActionSet(PluginJAR plugin, String[] cachedActionNames, boolean[] cachedActionToggleFlags, URL uri)(Code)
Creates a new action set.
Parameters:
  plugin - The plugin
Parameters:
  cachedActionNames - The list of cached action names
Parameters:
  cachedActionToggleFlags - The list of cached action toggle flags
Parameters:
  uri - The actions.xml URI
since:
   jEdit 4.2pre2



ActionSet
public ActionSet(String label)(Code)
Creates a new action set.
Parameters:
  label - The label, shown in the shortcuts option pane
since:
   jEdit 4.0pre1




Method Detail
addAction
public void addAction(EditAction action)(Code)
Adds an action to the action set.
Parameters:
  action - The action
since:
   jEdit 4.0pre1



contains
public boolean contains(String action)(Code)
Returns if this action set contains the specified action.
Parameters:
  action - The action
since:
   jEdit 4.2pre1



getAction
public EditAction getAction(String name)(Code)
Returns an action with the specified name.

Deferred loading: this will load the action set if necessary.
Parameters:
  name - The action name
since:
   jEdit 4.0pre1




getActionCount
public int getActionCount()(Code)
Returns the number of actions in the set.
since:
   jEdit 4.0pre1



getActionNames
public String[] getActionNames()(Code)
Returns an array of all action names in this action set.
since:
   jEdit 4.2pre1



getActionNames
void getActionNames(List vec)(Code)



getActions
public EditAction[] getActions()(Code)
Returns an array of all actions in this action set.

Deferred loading: this will load the action set if necessary.
since:
   jEdit 4.0pre1




getCacheableActionNames
public String[] getCacheableActionNames()(Code)
Returns an array of all action names in this action set that should be cached; namely, BeanShellActions.
since:
   jEdit 4.2pre1



getLabel
public String getLabel()(Code)
Return the action source label.
since:
   jEdit 4.0pre1



getPluginJAR
public PluginJAR getPluginJAR()(Code)
Return the plugin this action set was loaded from, or null.
since:
   jEdit 4.2pre13



initKeyBindings
public void initKeyBindings()(Code)
Initializes the action set's key bindings. jEdit calls this method for all registered action sets when the user changes key bindings in the Global Options dialog box.

Note if your plugin adds a custom action set to jEdit's collection, it must also call this method on the action set after adding it.
since:
   jEdit 4.2pre1




load
public void load()(Code)
Forces the action set to be loaded. Plugins and macros should not call this method.
since:
   jEdit 4.2pre1



removeAction
public void removeAction(String name)(Code)
Removes an action from the action set.
Parameters:
  name - The action name
since:
   jEdit 4.0pre1



removeAllActions
public void removeAllActions()(Code)
Removes all actions from the action set.
since:
   jEdit 4.0pre1



setLabel
public void setLabel(String label)(Code)
Sets the action source label.
Parameters:
  label - The label
since:
   jEdit 4.0pre1



size
public int size()(Code)
Returns the number of actions in this action set.
since:
   jEdit 4.2pre2



toString
public String toString()(Code)



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.