org.opensubsystems.core.application.swt
Class SWTThickClientDialogGuiImpl

java.lang.Object
  extended by org.opensubsystems.core.application.swt.SWTThickClientDialogGuiImpl
All Implemented Interfaces:
ThickClientDialogGui

public abstract class SWTThickClientDialogGuiImpl
extends java.lang.Object
implements ThickClientDialogGui

Base class for SWT Thick Client dialogs.

Version:
$Id: SWTThickClientDialogGuiImpl.java,v 1.10 2007/01/07 06:14:22 bastafidli Exp $
Author:
Miro Halas
Code reviewer:
Miro Halas
Code reviewed:
1.7 2006/04/05 04:57:36 bastafidli

Field Summary
protected  ThickClient m_client
          Client application displaying this dialog.
protected  org.eclipse.swt.graphics.Point m_oldClientLocation
          If not null then original location of the dialog parent.
protected  org.eclipse.swt.graphics.Rectangle m_outsideBoundingArea
          If this parameter is set it represents the area to which the parent dialog and this dialog should be bound.
protected  org.eclipse.swt.widgets.Shell m_parent
          Parent shell of this dialog which can be null if the dialog is a top level window.
protected  org.eclipse.swt.widgets.Shell m_shell
          Shell representing this dialog.
 
Constructor Summary
SWTThickClientDialogGuiImpl()
           
 
Method Summary
protected  void createDialogWindow(ThickClientDialog dialog, java.lang.String strTitle, int iStyle)
          Create the shell for this child dialog.
protected  void createDialogWindow(ThickClient client, org.eclipse.swt.widgets.Shell parentShell, java.lang.String strTitle, int iStyle)
          Create the shell for this dialog.
protected  void createDialogWindow(ThickClient client, java.lang.String strTitle, int iStyle)
          Create the shell for this top level dialog.
protected  void displayDialogWindow(org.eclipse.swt.graphics.Point ptSize)
          Display the dialog window.
 java.lang.Object displayMessage(java.lang.String strTitle, java.lang.String strMessage, java.lang.Object additionalInfo)
          Display message to the user.
 ThickClient getClient()
          Get client displaying this dialog.
 org.eclipse.swt.widgets.Shell getShell()
          Get shell of this dialog.
protected  void interactWithUser()
          Main message loop which processes messages for the dialog caused by user actions such as typing or mouse clicks.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_client

protected ThickClient m_client
Client application displaying this dialog.


m_shell

protected org.eclipse.swt.widgets.Shell m_shell
Shell representing this dialog.


m_parent

protected org.eclipse.swt.widgets.Shell m_parent
Parent shell of this dialog which can be null if the dialog is a top level window.


m_outsideBoundingArea

protected org.eclipse.swt.graphics.Rectangle m_outsideBoundingArea
If this parameter is set it represents the area to which the parent dialog and this dialog should be bound. In that case this dialog will position the parent and itself so that both are visible, otherwise if this parameter is not set ans is null, then this dialog will be centered on top of the parent shell.


m_oldClientLocation

protected org.eclipse.swt.graphics.Point m_oldClientLocation
If not null then original location of the dialog parent.

Constructor Detail

SWTThickClientDialogGuiImpl

public SWTThickClientDialogGuiImpl()
Method Detail

displayMessage

public java.lang.Object displayMessage(java.lang.String strTitle,
                                       java.lang.String strMessage,
                                       java.lang.Object additionalInfo)
Display message to the user.

Specified by:
displayMessage in interface ThickClientDialogGui
Parameters:
strTitle - - title of the message, look at MESSAGE_TITLE_XXX constants in ThickClienGui interface
strMessage - - message to display
additionalInfo - - additional information to pass in, this may be implementation specific, look at MESSAGE_STYLE_XXX constants in ThickClienGui interface
Returns:
Object - result of the message, this may be implementation specific

getClient

public ThickClient getClient()
Get client displaying this dialog.

Returns:
ThickClient - client displaying this dialog

getShell

public org.eclipse.swt.widgets.Shell getShell()
Get shell of this dialog.

Returns:
Shell - shell of this dialog

createDialogWindow

protected void createDialogWindow(ThickClient client,
                                  java.lang.String strTitle,
                                  int iStyle)
Create the shell for this top level dialog.

Parameters:
client - - client application displaying this dialog
strTitle - - title of the shell
iStyle - - style of the shell

createDialogWindow

protected void createDialogWindow(ThickClientDialog dialog,
                                  java.lang.String strTitle,
                                  int iStyle)
Create the shell for this child dialog.

Parameters:
dialog - - dialog for which the window is being created
strTitle - - title of the shell
iStyle - - style of the shell

createDialogWindow

protected void createDialogWindow(ThickClient client,
                                  org.eclipse.swt.widgets.Shell parentShell,
                                  java.lang.String strTitle,
                                  int iStyle)
Create the shell for this dialog.

Parameters:
client - - client application displaying this dialog
parentShell - - parent shell of this dialog
strTitle - - title of the shell
iStyle - - style of the shell

displayDialogWindow

protected void displayDialogWindow(org.eclipse.swt.graphics.Point ptSize)
Display the dialog window. This method should be called when the dialog is ready to be displayed on the screen and interact with the user.

Parameters:
ptSize - - size of the dialog or null if the dialog should have it's natural size

interactWithUser

protected void interactWithUser()
Main message loop which processes messages for the dialog caused by user actions such as typing or mouse clicks.



Copyright © 2003 - 2006 OpenSubsystems s.r.o.