examples.chat.client.gui
Class ChatGUI

java.lang.Object
  extended by org.jdesktop.application.AbstractBean
      extended by org.jdesktop.application.Application
          extended by org.jdesktop.application.SingleFrameApplication
              extended by examples.chat.client.gui.ChatGUI
All Implemented Interfaces:
java.lang.Runnable

public class ChatGUI
extends org.jdesktop.application.SingleFrameApplication
implements java.lang.Runnable

The main class of the GUI. It implements the ChatServer interface in order to provide SCA service to the GUI.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.jdesktop.application.Application
org.jdesktop.application.Application.ExitListener
 
Field Summary
protected static java.util.logging.Logger log
          Logger for this class
protected static Chat service
          A reference to the Chat service.
 
Constructor Summary
ChatGUI()
          Default constructor.
 
Method Summary
protected  void configureWindow(java.awt.Window root)
          This method is to initialize the specified window by injecting resources.
static ChatGUI getApplication()
          A convenient static getter for the application instance.
static Chat getChatService()
          A convenient static getter for the chat service.
static void main(java.lang.String[] args)
          Main method launching the application.
 void run()
           
protected  void startup()
          At startup create and show the main frame of the application.
 
Methods inherited from class org.jdesktop.application.SingleFrameApplication
getMainFrame, getMainView, setMainFrame, show, show, show, show, shutdown
 
Methods inherited from class org.jdesktop.application.Application
addExitListener, end, exit, exit, getContext, getExitListeners, getInstance, getInstance, hide, initialize, launch, quit, ready, removeExitListener
 
Methods inherited from class org.jdesktop.application.AbstractBean
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

service

protected static Chat service
A reference to the Chat service.


log

protected static java.util.logging.Logger log
Logger for this class

Constructor Detail

ChatGUI

public ChatGUI()
Default constructor.

Method Detail

startup

protected void startup()
At startup create and show the main frame of the application.

Specified by:
startup in class org.jdesktop.application.Application

configureWindow

protected void configureWindow(java.awt.Window root)
This method is to initialize the specified window by injecting resources. Windows shown in our application come fully initialized from the GUI builder, so this additional configuration is not needed.

Overrides:
configureWindow in class org.jdesktop.application.SingleFrameApplication

getApplication

public static ChatGUI getApplication()
A convenient static getter for the application instance.

Returns:
the instance of ChatGUI

getChatService

public static Chat getChatService()
A convenient static getter for the chat service.

Returns:
the reference for the chat service.

run

public void run()
Specified by:
run in interface java.lang.Runnable

main

public static void main(java.lang.String[] args)
                 throws FactoryException,
                        FactoryInstantiationException
Main method launching the application.

Throws:
FactoryException - if the composite cannot be loaded
FactoryInstantiationException - if the SCA factory cannot be loade


Copyright © 2010 OW2 Consortium. All Rights Reserved.