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.
-
MUDPanel()
- Constructs a new MUD Panel.
-
actionPerformed(ActionEvent)
- Action performed when text is entered
-
addMCPMessageListener(MCPMessageListener)
- Adds an MCP command listener
-
close()
- Close connection to a server.
-
connected(MUDStatusEvent)
- The Panel's response to a MUD connection.
-
connectTo(String, int)
- Creates a communication object ready to connect to a server.
-
disconnected(MUDStatusEvent)
- The Panel's response to a MUD disconnection
-
failed(MUDStatusEvent)
- The Panel's response to a MUD failed connection attempt
-
getMUDLink()
- Returns the object listening to the server.
-
getTextAreaColumns()
- Sets the number of columns in the text area component.
-
getTextAreaRows()
- Gets the number of rows in the text area component.
-
loginFailed(String)
- This is invoked when login fails but the dialog continues.
-
loginTerminated(String)
- This is invoked when the login dialog terminates.
-
removeMCPMessageListener(MCPMessageListener)
- Removes an MCP command listener
-
run()
- Runs the MUD communication object
-
setTextAreaColumns(int)
- Sets the number of columns in the text area component.
-
setTextAreaRows(int)
- Sets the number of rows in the text area component.
MUDPanel
public MUDPanel()
- Constructs a new MUD Panel.
getTextAreaRows
public int getTextAreaRows()
- Gets the number of rows in the text area component.
- Parameters:
- rows - number of rows
setTextAreaRows
public void setTextAreaRows(int rows)
- Sets the number of rows in the text area component.
- Parameters:
- rows - number of rows
getTextAreaColumns
public int getTextAreaColumns()
- Sets the number of columns in the text area component.
- Parameters:
- columns - number of columns
setTextAreaColumns
public void setTextAreaColumns(int columns)
- Sets the number of columns in the text area component.
- Parameters:
- columns - number of columns
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
close
public void close()
- Close connection to a server.
This method can be called from the server thread
or the AWT thread.
getMUDLink
public MUDLink getMUDLink()
- Returns the object listening to the server.
run
public void run()
- Runs the MUD communication object
loginTerminated
public void loginTerminated(String user)
- This is invoked when the login dialog terminates.
- Parameters:
- user - the login name - null on failure.
loginFailed
public void loginFailed(String user)
- This is invoked when login fails but the dialog continues.
actionPerformed
public void actionPerformed(ActionEvent e)
- Action performed when text is entered
connected
public void connected(MUDStatusEvent e)
- The Panel's response to a MUD connection.
It creates a login panel.
disconnected
public void disconnected(MUDStatusEvent e)
- The Panel's response to a MUD disconnection
failed
public void failed(MUDStatusEvent e)
- The Panel's response to a MUD failed connection attempt
addMCPMessageListener
public void addMCPMessageListener(MCPMessageListener mcl)
- Adds an MCP command listener
removeMCPMessageListener
public void removeMCPMessageListener(MCPMessageListener mcl)
- Removes an MCP command listener
All Packages Class Hierarchy This Package Previous Next Index