|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.raelity.jvi.swing.CommandLine.CommandLineEntry
public abstract static class CommandLine.CommandLineEntry
The CommandLine JPanel may be embedded in a Dialog or put on a glass pane; CommandLineEntry is some common handling particularly for the ViCmdEntry interface.
Field Summary | |
---|---|
protected CommandLine |
commandLine
|
protected int |
entryType
|
protected String |
initialText
|
protected String |
lastCommand
result of last entry |
protected ActionListener |
listener
reference back to the user of this entry widget |
protected ViTextView |
tv
|
Fields inherited from interface com.raelity.jvi.ViCmdEntry |
---|
COLON_ENTRY, SEARCH_ENTRY |
Method Summary | |
---|---|
void |
actionPerformed(ActionEvent e)
|
void |
activate(String mode,
ViTextView parent)
ViCmdEntry interface |
void |
activate(String mode,
ViTextView tv,
String initialText,
boolean passThru)
Start taking input. |
void |
addActionListener(ActionListener l)
When command entry is complete, this listener is invoked. |
void |
append(char c)
This method is used to append characters to the command line. |
void |
cancel()
Stop command entry. |
protected abstract void |
finishActivate()
|
protected void |
fireEvent(ActionEvent e)
Send the event If it is a successful entry, a CR, then record the input. |
String |
getCommand()
This is used to retrieve the command that was entered. |
JTextComponent |
getTextComponent()
Retrieve the component used for the data entry. |
protected Rectangle |
positionCommandEntry(Component root,
Component entry)
Calculate the bounds for the entry component relative to the root component when placed immediately under the tv's editor. |
protected abstract void |
prepareShutdown()
|
void |
removeActionListener(ActionListener l)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String lastCommand
protected ActionListener listener
protected int entryType
protected CommandLine commandLine
protected ViTextView tv
protected String initialText
Method Detail |
---|
public final void activate(String mode, ViTextView parent)
activate
in interface ViCmdEntry
public final void activate(String mode, ViTextView tv, String initialText, boolean passThru)
activate
in interface ViCmdEntry
tv
- component associated with the entryinitialText
- text widget starts out with this textpassThru
- when true, fire action with initialText as the commandpublic void append(char c)
ViCmdEntry
append
in interface ViCmdEntry
protected abstract void finishActivate()
protected abstract void prepareShutdown()
protected Rectangle positionCommandEntry(Component root, Component entry)
root
- the root, typically a JFrameentry
- the command entry widget
public String getCommand()
ViCmdEntry
getCommand
in interface ViCmdEntry
public void cancel()
ViCmdEntry
cancel
in interface ViCmdEntry
public JTextComponent getTextComponent()
ViCmdEntry
getTextComponent
in interface ViCmdEntry
public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
protected void fireEvent(ActionEvent e)
public void addActionListener(ActionListener l) throws TooManyListenersException
ViCmdEntry
addActionListener
in interface ViCmdEntry
TooManyListenersException
public void removeActionListener(ActionListener l)
removeActionListener
in interface ViCmdEntry
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |