All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.mitre.cvw.mudsy.gui.MUDPanel

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----org.mitre.cvw.mudsy.gui.MUDPanel

public class MUDPanel
extends Panel
implements Runnable, ActionListener, MUDStatusListener
The MUD Panel. A JavaBean.

At run time, use connectTo to declare the host and port of the MUD server. Use run to start the connection. Use close to terminate a connection.


Constructor Index

 o MUDPanel()
Constructs a new MUD Panel.

Method Index

 o actionPerformed(ActionEvent)
Action performed when text is entered
 o addMCPMessageListener(MCPMessageListener)
Adds an MCP command listener
 o close()
Close connection to a server.
 o connected(MUDStatusEvent)
The Panel's response to a MUD connection.
 o connectTo(String, int)
Creates a communication object ready to connect to a server.
 o disconnected(MUDStatusEvent)
The Panel's response to a MUD disconnection
 o failed(MUDStatusEvent)
The Panel's response to a MUD failed connection attempt
 o getMUDLink()
Returns the object listening to the server.
 o getTextAreaColumns()
Sets the number of columns in the text area component.
 o getTextAreaRows()
Gets the number of rows in the text area component.
 o loginFailed(String)
This is invoked when login fails but the dialog continues.
 o loginTerminated(String)
This is invoked when the login dialog terminates.
 o removeMCPMessageListener(MCPMessageListener)
Removes an MCP command listener
 o run()
Runs the MUD communication object
 o setTextAreaColumns(int)
Sets the number of columns in the text area component.
 o setTextAreaRows(int)
Sets the number of rows in the text area component.

Constructors

 o MUDPanel
 public MUDPanel()
Constructs a new MUD Panel.

Methods

 o getTextAreaRows
 public int getTextAreaRows()
Gets the number of rows in the text area component.

Parameters:
rows - number of rows
 o setTextAreaRows
 public void setTextAreaRows(int rows)
Sets the number of rows in the text area component.

Parameters:
rows - number of rows
 o getTextAreaColumns
 public int getTextAreaColumns()
Sets the number of columns in the text area component.

Parameters:
columns - number of columns
 o setTextAreaColumns
 public void setTextAreaColumns(int columns)
Sets the number of columns in the text area component.

Parameters:
columns - number of columns
 o connectTo
 public void connectTo(String host,
                       int port)
Creates a communication object ready to connect to a server.

Parameters:
host - of MUD server
port - of MUD server
 o close
 public void close()
Close connection to a server. This method can be called from the server thread or the AWT thread.

 o getMUDLink
 public MUDLink getMUDLink()
Returns the object listening to the server.

 o run
 public void run()
Runs the MUD communication object

 o loginTerminated
 public void loginTerminated(String user)
This is invoked when the login dialog terminates.

Parameters:
user - the login name - null on failure.
 o loginFailed
 public void loginFailed(String user)
This is invoked when login fails but the dialog continues.

 o actionPerformed
 public void actionPerformed(ActionEvent e)
Action performed when text is entered

 o connected
 public void connected(MUDStatusEvent e)
The Panel's response to a MUD connection. It creates a login panel.

 o disconnected
 public void disconnected(MUDStatusEvent e)
The Panel's response to a MUD disconnection

 o failed
 public void failed(MUDStatusEvent e)
The Panel's response to a MUD failed connection attempt

 o addMCPMessageListener
 public void addMCPMessageListener(MCPMessageListener mcl)
Adds an MCP command listener

 o removeMCPMessageListener
 public void removeMCPMessageListener(MCPMessageListener mcl)
Removes an MCP command listener


All Packages  Class Hierarchy  This Package  Previous  Next  Index