|
|||||||||
| Home >> All >> org >> mitre >> [ cvw overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.mitre.cvw
Class CmdEntryPanel

java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.mitre.cvw.CmdEntryPanel
- All Implemented Interfaces:
- javax.accessibility.Accessible, java.util.EventListener, java.awt.image.ImageObserver, java.awt.event.KeyListener, java.awt.MenuContainer, java.io.Serializable
- public class CmdEntryPanel
- extends javax.swing.JPanel
- implements java.awt.event.KeyListener
- extends javax.swing.JPanel
This is the gui which presents the user with the following components: the command pull down menu, the to field, the text area, the send and cancel buttons, the public/private label, and the beep checkbox.
- Version:
| Nested Class Summary |
| Nested classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
| Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Container |
|
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
(package private) |
CmdEntryPanel(CmdEntryClient insideOf)
Constructor |
(package private) |
CmdEntryPanel(CmdEntryClient insideOf,
boolean clone)
|
| Method Summary | |
boolean |
beepCheckGetState()
Returns whether the beep check box is checked. |
void |
clearCommand()
User hit the clear button. |
void |
cmdChoiceChanged(int cmdKey)
Processes a change in the command pull down choice menu, setting up the appropriate fields as visible, in focus, etc. |
void |
cmdChoiceSet(int cmdKey)
Sets the command pull down menu given a int representing a CVWCommand. |
protected void |
createPopup(java.awt.Component source,
java.awt.Point p)
|
void |
enableEntry(boolean b)
Enables/disables the entry area depending on the parameter sent in |
void |
eraseHotKeyEmacs()
Erases emac hot keys for this window. |
java.util.Vector |
getEmacHotKeys()
|
PastCVWCmd |
getLastCommand()
Returns the last command with command used, to field values, and text in the text area. |
PastCVWCmd |
getLastCommand(boolean b)
Returns the last command with command used, to field values, and text in the text area. |
java.lang.String |
getNonDupUsers()
Return a string of user names entered in the person field with any duplications removed and surrounded by double quotes. |
java.lang.String |
getNonDupUsers(java.lang.String users)
Given a space delimited list of user names, return a string with any duplications removed and surrounded by double quotes. |
void |
init()
Initializes the gui. |
void |
initCmdChoiceMenu()
Initializes the command menu pull down and sets up the hot keys. |
void |
initEntryPanel()
Initializes the entry area. |
void |
keyPressed(java.awt.event.KeyEvent e)
This method is called when a key is pressed. |
void |
keyReleased(java.awt.event.KeyEvent e)
This method is called when a key is released. |
void |
keyTyped(java.awt.event.KeyEvent e)
This method is called when a key is typed. |
void |
makePublicOnly()
Hides the beep check box, making the entry area public |
java.lang.String |
mudEntryGetText()
Returns the text in the text area. |
void |
mudEntryGrabFocus()
|
boolean |
mudEntryHasFocus()
Returns if the mud text field has focus |
void |
mudEntryRequestFocus()
Requests focus in the text area. |
void |
mudEntrySelectAll()
Selects all text in the text area. |
void |
mudEntrySetText(java.lang.String text)
Sets the text in the text area. |
java.lang.String |
personFieldGetText()
Returns the text of the person field. |
boolean |
personFieldHasFocus()
Returns if the person field has focus |
void |
personFieldRequestFocus()
Request focus to be on the person field. |
void |
personFieldSelectAll()
Selects all the text in the person field. |
void |
personFieldSetEnabled(boolean b)
Enables the person field depending on the parameter |
void |
personFieldSetText(java.lang.String text)
Sets the text of the person field. |
void |
prevNextCommand(java.lang.String way)
|
void |
processFirstKey(java.awt.event.KeyEvent e)
|
void |
processHotKey(java.lang.String keyStroke)
Processes the hotkey given a keystroke. |
void |
processHotKeyEmacs(java.lang.String keyStroke)
|
void |
restoreCommand(PastCVWCmd cmd,
boolean error)
Restores the cmd entry area with command passed in, with command used, to field values, and text in the text area. |
void |
restoreLastCommand()
Restores the last command with command used, to field values, and text in the text area. |
void |
saveLastCommand()
Saves the last command for future in case of error. |
void |
sendCommand()
User hit the send button. |
void |
setCmdGivenMenuStr(java.lang.String menuStr)
Finds the CVW command given the selected string in the choice menu. |
void |
setPubPrvWidgets(boolean pub)
Sets up the public/private widgets to be shown depending on the current command choses. |
void |
setupHotKey(CVWCommand cvwCmd)
Sets up a hot key for this window given a CVWCommand. |
void |
setupHotKeyEmacs()
Sets up emac hot keys for this window. |
void |
setupHotKeyPrevNext()
Sets up the hot keys for prev and next CVWCommand history. |
void |
userClick(java.lang.String name)
Adds the user name to the person field, if it is not already there. |
void |
userMenu(CVWObject user,
java.lang.String function)
Process a menu command on the user, if a new command then remove any existing user name and change the command, if the same command then append this user name to the person field. |
| Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
jcvw
private CVWCoordinator jcvw
container
private CmdEntryClient container
cmdChoice
private CmdChoice cmdChoice
personField
private javax.swing.JTextField personField
personFieldEnabled
private boolean personFieldEnabled
toLabel
private javax.swing.JLabel toLabel
publicLabel
private javax.swing.JLabel publicLabel
privateLabel
private javax.swing.JLabel privateLabel
publicPanel
private javax.swing.JPanel publicPanel
textPanel
private javax.swing.JPanel textPanel
cmdUserPanel
private javax.swing.JPanel cmdUserPanel
widgetPanel
private javax.swing.JPanel widgetPanel
roomPanel
private javax.swing.JPanel roomPanel
sendButton
private javax.swing.JButton sendButton
clearButton
private javax.swing.JButton clearButton
beepCheck
private javax.swing.JCheckBox beepCheck
beepCheckState
private boolean beepCheckState
mudEntry
private javax.swing.JTextArea mudEntry
large
private java.awt.Font large
small
private java.awt.Font small
bold
private java.awt.Font bold
plain
private java.awt.Font plain
cmdMgr
private CVWCmdMgr cmdMgr
cvwCmd
int cvwCmd
newBtn
boolean newBtn
emacsBuffer
private java.lang.String emacsBuffer
emacsUser
private boolean emacsUser
emacsCmds
private java.util.Vector emacsCmds
lastCmd
int lastCmd
lastPerson
java.lang.String lastPerson
lastText
java.lang.String lastText
storedCmds
SentCVWCmds storedCmds
hotKeyAL
java.awt.event.ActionListener hotKeyAL
| Constructor Detail |
CmdEntryPanel
CmdEntryPanel(CmdEntryClient insideOf)
- Constructor
CmdEntryPanel
CmdEntryPanel(CmdEntryClient insideOf, boolean clone)
| Method Detail |
init
public void init()
- Initializes the gui.
initCmdChoiceMenu
public void initCmdChoiceMenu()
- Initializes the command menu pull down and sets up the hot keys.
setupHotKey
public void setupHotKey(CVWCommand cvwCmd)
- Sets up a hot key for this window given a CVWCommand.
setupHotKeyPrevNext
public void setupHotKeyPrevNext()
- Sets up the hot keys for prev and next CVWCommand history.
prevNextCommand
public void prevNextCommand(java.lang.String way)
setupHotKeyEmacs
public void setupHotKeyEmacs()
- Sets up emac hot keys for this window.
getEmacHotKeys
public java.util.Vector getEmacHotKeys()
eraseHotKeyEmacs
public void eraseHotKeyEmacs()
- Erases emac hot keys for this window.
initEntryPanel
public void initEntryPanel()
- Initializes the entry area.
makePublicOnly
public void makePublicOnly()
- Hides the beep check box, making the entry area public
createPopup
protected void createPopup(java.awt.Component source, java.awt.Point p)
sendCommand
public void sendCommand()
- User hit the send button.
clearCommand
public void clearCommand()
- User hit the clear button.
enableEntry
public void enableEntry(boolean b)
- Enables/disables the entry area depending on the parameter sent in
getLastCommand
public PastCVWCmd getLastCommand()
- Returns the last command with command used, to field values, and
text in the text area.
getLastCommand
public PastCVWCmd getLastCommand(boolean b)
- Returns the last command with command used, to field values, and
text in the text area.
restoreLastCommand
public void restoreLastCommand()
- Restores the last command with command used, to field values, and
text in the text area.
restoreCommand
public void restoreCommand(PastCVWCmd cmd, boolean error)
- Restores the cmd entry area with command passed in, with command used,
to field values, and text in the text area.
saveLastCommand
public void saveLastCommand()
- Saves the last command for future in case of error.
setCmdGivenMenuStr
public void setCmdGivenMenuStr(java.lang.String menuStr)
- Finds the CVW command given the selected string in the choice menu.
cmdChoiceSet
public void cmdChoiceSet(int cmdKey)
- Sets the command pull down menu given a int representing a CVWCommand.
cmdChoiceChanged
public void cmdChoiceChanged(int cmdKey)
- Processes a change in the command pull down choice menu, setting up the
appropriate fields as visible, in focus, etc.
setPubPrvWidgets
public void setPubPrvWidgets(boolean pub)
- Sets up the public/private widgets to be shown depending on the
current command choses.
personFieldHasFocus
public boolean personFieldHasFocus()
- Returns if the person field has focus
mudEntryGrabFocus
public void mudEntryGrabFocus()
mudEntryHasFocus
public boolean mudEntryHasFocus()
- Returns if the mud text field has focus
personFieldGetText
public java.lang.String personFieldGetText()
- Returns the text of the person field.
personFieldSetText
public void personFieldSetText(java.lang.String text)
- Sets the text of the person field.
personFieldSetEnabled
public void personFieldSetEnabled(boolean b)
- Enables the person field depending on the parameter
personFieldRequestFocus
public void personFieldRequestFocus()
- Request focus to be on the person field.
personFieldSelectAll
public void personFieldSelectAll()
- Selects all the text in the person field.
mudEntryGetText
public java.lang.String mudEntryGetText()
- Returns the text in the text area.
mudEntrySetText
public void mudEntrySetText(java.lang.String text)
- Sets the text in the text area.
mudEntryRequestFocus
public void mudEntryRequestFocus()
- Requests focus in the text area.
mudEntrySelectAll
public void mudEntrySelectAll()
- Selects all text in the text area.
beepCheckGetState
public boolean beepCheckGetState()
- Returns whether the beep check box is checked.
getNonDupUsers
public java.lang.String getNonDupUsers()
- Return a string of user names entered in the person field with
any duplications removed and surrounded by double quotes.
getNonDupUsers
public java.lang.String getNonDupUsers(java.lang.String users)
- Given a space delimited list of user names, return a string with any duplications
removed and surrounded by double quotes.
userClick
public void userClick(java.lang.String name)
- Adds the user name to the person field, if it is not already there.
userMenu
public void userMenu(CVWObject user, java.lang.String function)
- Process a menu command on the user, if a new command then remove any
existing user name and change the command, if the same command then append
this user name to the person field.
processFirstKey
public void processFirstKey(java.awt.event.KeyEvent e)
keyTyped
public void keyTyped(java.awt.event.KeyEvent e)
- Description copied from interface:
java.awt.event.KeyListener - This method is called when a key is typed. A key is considered typed
when it and all modifiers have been pressed and released, mapping to
a single virtual key.
- Specified by:
keyTypedin interfacejava.awt.event.KeyListener
keyReleased
public void keyReleased(java.awt.event.KeyEvent e)
- Description copied from interface:
java.awt.event.KeyListener - This method is called when a key is released.
- Specified by:
keyReleasedin interfacejava.awt.event.KeyListener
keyPressed
public void keyPressed(java.awt.event.KeyEvent e)
- Description copied from interface:
java.awt.event.KeyListener - This method is called when a key is pressed.
- Specified by:
keyPressedin interfacejava.awt.event.KeyListener
processHotKey
public void processHotKey(java.lang.String keyStroke)
- Processes the hotkey given a keystroke.
processHotKeyEmacs
public void processHotKeyEmacs(java.lang.String keyStroke)
|
|||||||||
| Home >> All >> org >> mitre >> [ cvw overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC