DefaultTextAction Class

com.bea.ide.actions
DefaultTextAction Class

public abstract class DefaultTextAction

    extends DefaultAction

Action class that is useful for working in text components. It provides a default means of using the action event to determine the text component that fired the event.


Hierarchy
Object
  DefaultAction
    DefaultTextAction
All Implemented Interfaces

ActionListener, EventListener, IAction, PropertyChangeListener

Field Summary

   
Fields from  com.bea.ide.actions.DefaultAction
_proxy
 

Constructor Summary

DefaultTextAction()

 

Method Summary

protected final JTextComponent
getFocusedComponent()
Gets the last text component that had focus, though it may not currently have it.
protected final JTextComponent
getTextComponent(ActionEvent e)
Attempts to identify a text action associated with the given event.
 
Methods from  com.bea.ide.actions.DefaultAction
getProxy, propertyChange
 
Methods from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
   
Methods from interface java.awt.event.ActionListener
actionPerformed
 
Methods from interface com.bea.ide.actions.IAction
actionPerformed, propertyChange
 
Methods from interface java.beans.PropertyChangeListener
propertyChange
 

Constructor Detail

DefaultTextAction

public DefaultTextAction()
 

Method Detail

getFocusedComponent() Method

protected final JTextComponent getFocusedComponent()
Gets the last text component that had focus, though it may not currently have it.

Returns

JTextComponent that last had focus, or null.

getTextComponent(ActionEvent) Method

protected final JTextComponent getTextComponent(ActionEvent e)
Attempts to identify a text action associated with the given event. If the event is null, or no text component can be identified, this method returns the focused JTextComponent.

Parameters

e
The event that fired this action.

Returns

The text component this action should run on.