org.jext
Class MenuAction

java.lang.Object
  extended by org.jext.MenuAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener
Direct Known Subclasses:
BeginLine, BoxComment, CompleteWord, CompleteWordAll, CreateTemplate, CsWord, EndLine, IndentOnEnter, IndentOnTab, JoinAllLines, JoinLines, LeftIndent, NextLineIndent, OneClickAction, OpenUrl, PrevLineIndent, Print, PythonAction, RemoveWhitespace, RightIndent, ScrollDown, ScrollPageDown, ScrollPageUp, ScrollUp, SimpleComment, SimpleUnComment, SpacesToTabs, TabsToSpaces, TabSwitcher, ToLowerCase, ToUpperCase, WingComment, WordCount

public abstract class MenuAction
extends java.lang.Object
implements java.awt.event.ActionListener

This class implements an ActionListener and handles action events fired by . This class also provides two new methods which can be used to get the window which has fired the event and the associated text area.


Field Summary
protected  java.lang.String name
           
 
Constructor Summary
MenuAction(java.lang.String name)
          Creates a new menu action designed by its name.
 
Method Summary
static JextFrame getJextParent(java.awt.Component comp)
           
static JextFrame getJextParent(java.util.EventObject evt)
          Returns the window which fired the event.
 java.lang.String getName()
          Returns the associated action name.
static JextTextArea getNSTextArea(java.awt.Component c)
           
static JextTextArea getNSTextArea(java.util.EventObject evt)
          This methods returns the selected text area in the window which fired the event, excluding the splitted one.
static JextTextArea getTextArea(java.awt.Component c)
           
static JextTextArea getTextArea(java.util.EventObject evt)
          This methods returns the selected text area in the window which fired the event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.awt.event.ActionListener
actionPerformed
 

Field Detail

name

protected java.lang.String name
Constructor Detail

MenuAction

public MenuAction(java.lang.String name)
Creates a new menu action designed by its name. This name is internally used by Jext to handles scripts, correctly build menu bar and tool bar.

Parameters:
name - Internal action name
Method Detail

getName

public java.lang.String getName()
Returns the associated action name.


getTextArea

public static JextTextArea getTextArea(java.util.EventObject evt)
This methods returns the selected text area in the window which fired the event.

Parameters:
evt - The source event

getNSTextArea

public static JextTextArea getNSTextArea(java.util.EventObject evt)
This methods returns the selected text area in the window which fired the event, excluding the splitted one.

Parameters:
evt - The source event

getJextParent

public static JextFrame getJextParent(java.util.EventObject evt)
Returns the window which fired the event.

Parameters:
evt - The source event

getTextArea

public static JextTextArea getTextArea(java.awt.Component c)

getNSTextArea

public static JextTextArea getNSTextArea(java.awt.Component c)

getJextParent

public static JextFrame getJextParent(java.awt.Component comp)


Copyright ? 2002 Romain Guy.