anecho.JamochaMUD
Class MuckMain

java.lang.Object
  extended by anecho.JamochaMUD.MuckMain
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.ComponentListener, java.awt.event.ItemListener, java.awt.event.KeyListener, java.awt.event.WindowListener, java.util.EventListener

public final class MuckMain
extends java.lang.Object
implements java.awt.event.ActionListener, java.awt.event.ComponentListener, java.awt.event.KeyListener, java.awt.event.ItemListener, java.awt.event.WindowListener

Main Muck Output Window, heart of the program, containing most of the menus and logistics of JamochaMUD


Field Summary
static int COMBINED
           
static int SPLIT
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
           
 void addPlugin(PlugInterface plug)
          Add a new plugin to our plugins menu
 void checkDisconnectMenu()
          We've received notification from one of our connections that it has either terminated.
 void componentHidden(java.awt.event.ComponentEvent event)
           
 void componentMoved(java.awt.event.ComponentEvent event)
           
 void componentResized(java.awt.event.ComponentEvent event)
           
 void componentShown(java.awt.event.ComponentEvent event)
           
 void connectMenu()
          The user has chosen to connect to a MUD/MUCK, so we set the menu items as appropriate, and give the a visual identifier that we are actually trying to make the connection
 void disconnectMenu()
          Methods called when disconnected from the MUD/MUCK Here, we reset some of the menu flags to the appropriate status and give the user visual notification that they have been disconnected (This is not always called just by the user's 'Disconnect' action)
 JMFancyTabbedPane getFancyTextPanel()
          Returns the textPanel pre-cast to a JMFancyTabbedPane
static MuckMain getInstance()
          This method returns the running instance of MuckMain, or creates it if we do not yet have one.
 JMTabPanel getLegacyTextPanel()
          Returns the textPanel pre-cast to the older legacy JMTabPanel
 java.awt.Frame getMainFrame()
          Return the main frame to the calling method
 java.awt.Component getTextPanel()
          Returns the "generic" Component version of TextPanel
 void itemStateChanged(java.awt.event.ItemEvent event)
           
 void keyPressed(java.awt.event.KeyEvent event)
           
 void keyReleased(java.awt.event.KeyEvent event)
           
 void keyTyped(java.awt.event.KeyEvent event)
           
 void pauseText()
          Set the 'pause' status on the Main window.
 void rebuildPlugInMenu()
          Rebuild the plug-in menu to reflect its current state.
 void removeAllPlugins()
          Clear all the plugins from our current menu
 void setActiveMU(java.lang.String muName)
          This method is used to make sure all the classes properly identify the active MU*
 void setConnectionMenu()
          Set the state of our connection menu based on our active MU*'s condition
 void setMainLayout()
          This method sets up the lay-out of the main JamochaMUD window
 void setVisibleMU()
          Change the shown MU* to our new selection
 void setWindowTitle()
          This method sets the title for the main JamochaMUD frame.
 void setWindowTitle(java.lang.String title)
          A specific instance of setting the MU* title if the MU* is minimised
 void showWhatsNew()
          Show a dialogue box showing the latest changes/fixes in JamochaMUD
 void windowActivated(java.awt.event.WindowEvent event)
           
 void windowClosed(java.awt.event.WindowEvent event)
           
 void windowClosing(java.awt.event.WindowEvent event)
           
 void windowDeactivated(java.awt.event.WindowEvent event)
           
 void windowDeiconified(java.awt.event.WindowEvent event)
           
 void windowIconified(java.awt.event.WindowEvent event)
           
 void windowOpened(java.awt.event.WindowEvent event)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMBINED

public static final int COMBINED
See Also:
Constant Field Values

SPLIT

public static final int SPLIT
See Also:
Constant Field Values
Method Detail

getInstance

public static MuckMain getInstance()
This method returns the running instance of MuckMain, or creates it if we do not yet have one.

Returns:
The current instance of MuckMain

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
event -

keyPressed

public void keyPressed(java.awt.event.KeyEvent event)
Specified by:
keyPressed in interface java.awt.event.KeyListener
Parameters:
event -

keyTyped

public void keyTyped(java.awt.event.KeyEvent event)
Specified by:
keyTyped in interface java.awt.event.KeyListener
Parameters:
event -

keyReleased

public void keyReleased(java.awt.event.KeyEvent event)
Specified by:
keyReleased in interface java.awt.event.KeyListener
Parameters:
event -

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent event)
Specified by:
itemStateChanged in interface java.awt.event.ItemListener
Parameters:
event -

windowActivated

public void windowActivated(java.awt.event.WindowEvent event)
Specified by:
windowActivated in interface java.awt.event.WindowListener
Parameters:
event -

windowClosed

public void windowClosed(java.awt.event.WindowEvent event)
Specified by:
windowClosed in interface java.awt.event.WindowListener
Parameters:
event -

windowClosing

public void windowClosing(java.awt.event.WindowEvent event)
Specified by:
windowClosing in interface java.awt.event.WindowListener
Parameters:
event -

windowDeactivated

public void windowDeactivated(java.awt.event.WindowEvent event)
Specified by:
windowDeactivated in interface java.awt.event.WindowListener
Parameters:
event -

windowDeiconified

public void windowDeiconified(java.awt.event.WindowEvent event)
Specified by:
windowDeiconified in interface java.awt.event.WindowListener
Parameters:
event -

windowIconified

public void windowIconified(java.awt.event.WindowEvent event)
Specified by:
windowIconified in interface java.awt.event.WindowListener
Parameters:
event -

windowOpened

public void windowOpened(java.awt.event.WindowEvent event)
Specified by:
windowOpened in interface java.awt.event.WindowListener
Parameters:
event -

componentHidden

public void componentHidden(java.awt.event.ComponentEvent event)
Specified by:
componentHidden in interface java.awt.event.ComponentListener
Parameters:
event -

componentResized

public void componentResized(java.awt.event.ComponentEvent event)
Specified by:
componentResized in interface java.awt.event.ComponentListener
Parameters:
event -

componentMoved

public void componentMoved(java.awt.event.ComponentEvent event)
Specified by:
componentMoved in interface java.awt.event.ComponentListener
Parameters:
event -

componentShown

public void componentShown(java.awt.event.ComponentEvent event)
Specified by:
componentShown in interface java.awt.event.ComponentListener
Parameters:
event -

setWindowTitle

public void setWindowTitle()
This method sets the title for the main JamochaMUD frame. If the client is connected to a MU, the title will be "JamochaMUD (MU* Name)". If the client is connected but output is paused, the title will read "JamochaMUD (Output Paused)" If the client is not connected, it will read "JamochaMUD (Not Connected)".


setWindowTitle

public void setWindowTitle(java.lang.String title)
A specific instance of setting the MU* title if the MU* is minimised

Parameters:
title -

disconnectMenu

public void disconnectMenu()
Methods called when disconnected from the MUD/MUCK Here, we reset some of the menu flags to the appropriate status and give the user visual notification that they have been disconnected (This is not always called just by the user's 'Disconnect' action)


checkDisconnectMenu

public void checkDisconnectMenu()
We've received notification from one of our connections that it has either terminated. We'll query the muck* and see if it is the active one. If so, we'll update our connection menu.


connectMenu

public void connectMenu()
The user has chosen to connect to a MUD/MUCK, so we set the menu items as appropriate, and give the a visual identifier that we are actually trying to make the connection


pauseText

public void pauseText()
Set the 'pause' status on the Main window. Usually done by a single mouse-click, it will stop the text from scrolling, and set the DataBar's title to alert the user that the text is paused


setVisibleMU

public void setVisibleMU()
Change the shown MU* to our new selection


setConnectionMenu

public void setConnectionMenu()
Set the state of our connection menu based on our active MU*'s condition


removeAllPlugins

public void removeAllPlugins()
Clear all the plugins from our current menu


addPlugin

public void addPlugin(PlugInterface plug)
Add a new plugin to our plugins menu

Parameters:
plug -

setActiveMU

public void setActiveMU(java.lang.String muName)
This method is used to make sure all the classes properly identify the active MU*

Parameters:
muName -

setMainLayout

public void setMainLayout()
This method sets up the lay-out of the main JamochaMUD window


getTextPanel

public java.awt.Component getTextPanel()
Returns the "generic" Component version of TextPanel

Returns:

getFancyTextPanel

public JMFancyTabbedPane getFancyTextPanel()
Returns the textPanel pre-cast to a JMFancyTabbedPane

Returns:

getLegacyTextPanel

public JMTabPanel getLegacyTextPanel()
Returns the textPanel pre-cast to the older legacy JMTabPanel

Returns:

rebuildPlugInMenu

public void rebuildPlugInMenu()
Rebuild the plug-in menu to reflect its current state. This is usually called after activating/deactivating plug-ins


getMainFrame

public java.awt.Frame getMainFrame()
Return the main frame to the calling method

Returns:

showWhatsNew

public void showWhatsNew()
Show a dialogue box showing the latest changes/fixes in JamochaMUD