org.formaria.editor.netbeans.project.helper
Class EditorHelperAction

java.lang.Object
  extended by CookieAction
      extended by org.formaria.editor.netbeans.project.helper.EditorHelperAction

public class EditorHelperAction
extends CookieAction

Create a new page

Copyright(c) Formaria Ltd., 2001-2005

&Revision: $


Constructor Summary
EditorHelperAction()
           
 
Method Summary
protected  java.lang.Class[] cookieClasses()
           
protected  boolean enable(Node[] nodes)
           
 HelpCtx getHelpCtx()
          Gets action help context.
 java.lang.String getName()
          Gets action name.
protected  java.lang.String iconResource()
          Gets icon resource.
 boolean isEnabled()
          Is this action enabled?
protected  int mode()
           
protected  void performAction(javax.swing.JEditorPane pane, javax.swing.text.Document d, javax.swing.text.Caret c)
          Do something with an open document.
protected  void performAction(Node[] nodes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EditorHelperAction

public EditorHelperAction()
Method Detail

performAction

protected void performAction(javax.swing.JEditorPane pane,
                             javax.swing.text.Document d,
                             javax.swing.text.Caret c)
                      throws javax.swing.text.BadLocationException
Do something with an open document. This is the part you should write according to your needs. Please use javax.swing.text.* API.

Parameters:
d - a document open in the editor pane
c - the caret giving cursor position, selection, etc.
Throws:
javax.swing.text.BadLocationException

getName

public java.lang.String getName()
Gets action name. Implements superclass abstract method.


getHelpCtx

public HelpCtx getHelpCtx()
Gets action help context. Implemenets superclass abstract method.


iconResource

protected java.lang.String iconResource()
Gets icon resource. Overrides superclass method.


isEnabled

public boolean isEnabled()
Is this action enabled?

Returns:
true if it is enabled.

cookieClasses

protected java.lang.Class[] cookieClasses()

mode

protected int mode()

enable

protected boolean enable(Node[] nodes)

performAction

protected void performAction(Node[] nodes)