com.raelity.jvi.swing
Class DefaultCmdEntry

java.lang.Object
  extended by com.raelity.jvi.swing.DefaultCmdEntry
All Implemented Interfaces:
ViCmdEntry, ActionListener, EventListener

public class DefaultCmdEntry
extends Object
implements ViCmdEntry, ActionListener

This class provides shared access to a CommandLine entry widget.


Field Summary
 
Fields inherited from interface com.raelity.jvi.ViCmdEntry
COLON_ENTRY, SEARCH_ENTRY
 
Constructor Summary
DefaultCmdEntry(CommandLine cmdLine)
           
 
Method Summary
 void actionPerformed(ActionEvent e)
          This is invoked when the command line entry is stopped by the user.
 void activate(String mode, ViTextView parent)
          ViCmdEntry interface
 void activate(String mode, ViTextView parent, String initialText, boolean passThru)
          ViCmdEntry interface
 void addActionListener(ActionListener l)
          ViCmdEntry interface
 void append(String s)
          ViCmdEntry interface
 void cancel()
          ViCmdEntry interface
 String getCommand()
          ViCmdEntry interface
 JTextComponent getTextComponent()
          Retrieve the component used for the data entry.
 void removeActionListener(ActionListener l)
          ViCmdEntry interface
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultCmdEntry

public DefaultCmdEntry(CommandLine cmdLine)
Method Detail

getCommand

public String getCommand()
ViCmdEntry interface

Specified by:
getCommand in interface ViCmdEntry

append

public void append(String s)
ViCmdEntry interface

Specified by:
append in interface ViCmdEntry

activate

public void activate(String mode,
                     ViTextView parent)
ViCmdEntry interface

Specified by:
activate in interface ViCmdEntry

activate

public void activate(String mode,
                     ViTextView parent,
                     String initialText,
                     boolean passThru)
ViCmdEntry interface

Specified by:
activate in interface ViCmdEntry
parent - component associated with the entry
initialText - text widget starts out with this text
passThru - when true, fire action with initialText as the command

actionPerformed

public void actionPerformed(ActionEvent e)
This is invoked when the command line entry is stopped by the user. pass the event on. ActionListener interface.

Specified by:
actionPerformed in interface ActionListener

cancel

public void cancel()
ViCmdEntry interface

Specified by:
cancel in interface ViCmdEntry

addActionListener

public void addActionListener(ActionListener l)
                       throws TooManyListenersException
ViCmdEntry interface

Specified by:
addActionListener in interface ViCmdEntry
Throws:
TooManyListenersException

removeActionListener

public void removeActionListener(ActionListener l)
ViCmdEntry interface

Specified by:
removeActionListener in interface ViCmdEntry

getTextComponent

public JTextComponent getTextComponent()
Description copied from interface: ViCmdEntry
Retrieve the component used for the data entry.

Specified by:
getTextComponent in interface ViCmdEntry