com.lyrisoft.chat.client.gui.awt102
Class GUIFactory

java.lang.Object
  |
  +--com.lyrisoft.chat.client.gui.awt102.GUIFactory
All Implemented Interfaces:
IChatGUIFactory
Direct Known Subclasses:
AppletGUIFactory

public class GUIFactory
extends java.lang.Object
implements IChatGUIFactory

An IGUIFactory implementation that creates AWT 1.0.2 compliant widgets.


Field Summary
protected  java.util.Hashtable _attributes
           
protected  ConsoleFrame _console
           
protected  java.applet.Applet _dummyApplet
           
protected  IChatClientInputReceiver _inputReceiver
           
protected  ChatGUI _mainGui
           
protected  boolean _playSounds
           
protected  IChatServer _server
           
 
Constructor Summary
GUIFactory()
           
 
Method Summary
 java.awt.Component createAboutDialog()
           
 IChatRoom createChatRoom(java.lang.String name)
          Construct an IChatRoom component.
 IConsole createConsole()
          Construct an IConsole component
 ILogin createLoginDialog()
          Construct an ILogin component
 IPrivateChatRoom createPrivateChatRoom(java.lang.String name)
           
 IQuery createQuery(java.lang.String title, java.lang.String choiceLabel, java.lang.String[] choices, boolean showTextField, java.lang.String textFieldLabel)
           
 java.lang.Object getAttribute(java.lang.String name)
           
 java.awt.Image getImage(java.lang.String name)
           
 ChatGUI getMainGui()
           
 boolean getPlaySounds()
           
 void hide(IChatRoom room)
           
 void hide(IConsole c)
          Hide an IConsole
 void hide(ILogin login)
          Hide an ILogin
 void hide(IPrivateChatRoom room)
           
 void playAudioClip(java.lang.String name)
          This method probably belongs elsewhere...
 void playSounds(boolean b)
           
 void setApplet(ChatClientApplet a)
          It's ok to ignore this method unless you're implementing a factory made for Applets.
 void setAttribute(java.lang.String name, java.lang.Object value)
           
 void setChatServer(IChatServer server)
           
 void setInputReceiver(IChatClientInputReceiver inputReceiver)
           
 void setMainGui(ChatGUI mainGui)
           
 void show(IChatRoom room)
          Show and IChatRoom
 void show(IConsole c)
          Show an IConsole
 void show(ILogin login)
          Show an ILogin
 void show(IPrivateChatRoom room)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_mainGui

protected ChatGUI _mainGui

_server

protected IChatServer _server

_inputReceiver

protected IChatClientInputReceiver _inputReceiver

_dummyApplet

protected java.applet.Applet _dummyApplet

_playSounds

protected boolean _playSounds

_attributes

protected java.util.Hashtable _attributes

_console

protected ConsoleFrame _console
Constructor Detail

GUIFactory

public GUIFactory()
Method Detail

setMainGui

public void setMainGui(ChatGUI mainGui)
Specified by:
setMainGui in interface IChatGUIFactory

getMainGui

public ChatGUI getMainGui()
Specified by:
getMainGui in interface IChatGUIFactory

setInputReceiver

public void setInputReceiver(IChatClientInputReceiver inputReceiver)
Specified by:
setInputReceiver in interface IChatGUIFactory

setChatServer

public void setChatServer(IChatServer server)
Specified by:
setChatServer in interface IChatGUIFactory

createChatRoom

public IChatRoom createChatRoom(java.lang.String name)
Description copied from interface: IChatGUIFactory
Construct an IChatRoom component.
Specified by:
createChatRoom in interface IChatGUIFactory
Following copied from interface: com.lyrisoft.chat.client.gui.IChatGUIFactory
Parameters:
name - the name of the chat room
mainGui - the ChatGui component
inputReceiver - the object that will receive input
server - the client-side view of the server

createPrivateChatRoom

public IPrivateChatRoom createPrivateChatRoom(java.lang.String name)
Specified by:
createPrivateChatRoom in interface IChatGUIFactory

createLoginDialog

public ILogin createLoginDialog()
Description copied from interface: IChatGUIFactory
Construct an ILogin component
Specified by:
createLoginDialog in interface IChatGUIFactory
Following copied from interface: com.lyrisoft.chat.client.gui.IChatGUIFactory
Parameters:
inputReceiver - the object that will receive input

createConsole

public IConsole createConsole()
Description copied from interface: IChatGUIFactory
Construct an IConsole component
Specified by:
createConsole in interface IChatGUIFactory
Following copied from interface: com.lyrisoft.chat.client.gui.IChatGUIFactory
Parameters:
inputReceiver - the object that will receive input
mainGui - the ChatGui component
server - the client-side view of the server

createQuery

public IQuery createQuery(java.lang.String title,
                          java.lang.String choiceLabel,
                          java.lang.String[] choices,
                          boolean showTextField,
                          java.lang.String textFieldLabel)
Specified by:
createQuery in interface IChatGUIFactory

createAboutDialog

public java.awt.Component createAboutDialog()
Specified by:
createAboutDialog in interface IChatGUIFactory

hide

public void hide(IChatRoom room)
Specified by:
hide in interface IChatGUIFactory

show

public void show(IChatRoom room)
Description copied from interface: IChatGUIFactory
Show and IChatRoom
Specified by:
show in interface IChatGUIFactory

hide

public void hide(ILogin login)
Description copied from interface: IChatGUIFactory
Hide an ILogin
Specified by:
hide in interface IChatGUIFactory

show

public void show(ILogin login)
Description copied from interface: IChatGUIFactory
Show an ILogin
Specified by:
show in interface IChatGUIFactory

show

public void show(IConsole c)
Description copied from interface: IChatGUIFactory
Show an IConsole
Specified by:
show in interface IChatGUIFactory

hide

public void hide(IConsole c)
Description copied from interface: IChatGUIFactory
Hide an IConsole
Specified by:
hide in interface IChatGUIFactory

show

public void show(IPrivateChatRoom room)
Specified by:
show in interface IChatGUIFactory

hide

public void hide(IPrivateChatRoom room)
Specified by:
hide in interface IChatGUIFactory

setApplet

public void setApplet(ChatClientApplet a)
Description copied from interface: IChatGUIFactory
It's ok to ignore this method unless you're implementing a factory made for Applets.
Specified by:
setApplet in interface IChatGUIFactory

getImage

public java.awt.Image getImage(java.lang.String name)
Specified by:
getImage in interface IChatGUIFactory

playAudioClip

public void playAudioClip(java.lang.String name)
Description copied from interface: IChatGUIFactory
This method probably belongs elsewhere... it's here for now because the GUIFactory implementations know how to fetch resources from the resources dir...
Specified by:
playAudioClip in interface IChatGUIFactory

playSounds

public void playSounds(boolean b)
Specified by:
playSounds in interface IChatGUIFactory

getPlaySounds

public boolean getPlaySounds()
Specified by:
getPlaySounds in interface IChatGUIFactory

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.Object value)
Specified by:
setAttribute in interface IChatGUIFactory

getAttribute

public java.lang.Object getAttribute(java.lang.String name)
Specified by:
getAttribute in interface IChatGUIFactory


Copyright © 2000-2002 Taso Lyristis