com.lyrisoft.chat.client.gui
Interface IChatGUIFactory

All Known Implementing Classes:
SwingGuiFactory, GUIFactory, AppletGUIFactory

public interface IChatGUIFactory

Interface for objects that construct GUI objects. GUI objects are never instantiated directly; they always get created via an instance of this interface and are used through their interfaces. This allows various GUI implementations to be written, plugged in, and used. To create a new GUI, implement all of the interfaces in this package.

See Also:
IChatRoom, IConsole, ILogin, IYesNo

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 rl)
          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 rl)
          Show an IConsole
 void show(ILogin login)
          Show an ILogin
 void show(IPrivateChatRoom room)
           
 

Method Detail

createAboutDialog

public java.awt.Component createAboutDialog()

setMainGui

public void setMainGui(ChatGUI mainGui)

getMainGui

public ChatGUI getMainGui()

setInputReceiver

public void setInputReceiver(IChatClientInputReceiver inputReceiver)

setChatServer

public void setChatServer(IChatServer server)

createLoginDialog

public ILogin createLoginDialog()
Construct an ILogin component
Parameters:
inputReceiver - the object that will receive input

createChatRoom

public IChatRoom createChatRoom(java.lang.String name)
Construct an IChatRoom component.
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)

createConsole

public IConsole createConsole()
Construct an IConsole component
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)

show

public void show(IPrivateChatRoom room)

hide

public void hide(IPrivateChatRoom room)

show

public void show(IChatRoom room)
Show and IChatRoom

hide

public void hide(IChatRoom room)

hide

public void hide(ILogin login)
Hide an ILogin

show

public void show(ILogin login)
Show an ILogin

hide

public void hide(IConsole rl)
Hide an IConsole

show

public void show(IConsole rl)
Show an IConsole

setApplet

public void setApplet(ChatClientApplet a)
It's ok to ignore this method unless you're implementing a factory made for Applets.

getImage

public java.awt.Image getImage(java.lang.String name)

playAudioClip

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

playSounds

public void playSounds(boolean b)

getPlaySounds

public boolean getPlaySounds()

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.Object value)

getAttribute

public java.lang.Object getAttribute(java.lang.String name)


Copyright © 2000-2002 Taso Lyristis