|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensubsystems.core.application.swt.SWTThickClientGui
public class SWTThickClientGui
Implementation of ThickClientGui using SWT library.
| Field Summary | |
|---|---|
static int |
DEFAULT_MODULE_ICON_HEIGHT
Default height of the icon to access modules. |
static int |
DEFAULT_MODULE_ICON_TEXT
Default size of the text under icon to access modules. |
static int |
DEFAULT_MODULE_ICON_WIDTH
Default width of the icon to access modules. |
protected org.eclipse.swt.graphics.Image |
m_blueImage
Blue image to use in module toolbar. |
protected ThickClient |
m_client
Client for which to display the gui. |
protected org.eclipse.swt.widgets.Composite |
m_clientArea
Control representing client area of the application. |
protected org.eclipse.swt.widgets.Display |
m_display
Display object used to render on the screen. |
protected org.eclipse.swt.graphics.Image |
m_grayImage
Gray image to use in module toolbar. |
protected org.eclipse.swt.graphics.Image |
m_greenImage
Green image to use in module toolbar. |
protected org.eclipse.swt.graphics.Image |
m_iconImage
Icon to use for the application.or null if no icon was defined. |
protected int |
m_iMainWindowStyle
Style used to construct the main window. |
protected org.eclipse.swt.graphics.Image |
m_logoImage
Logo of the customer to display when the application is starting. |
protected org.eclipse.swt.widgets.CoolBar |
m_mainToolBar
Main toolbar of the application |
protected java.util.Map |
m_mapModuleToolItems
Toolbar buttons created for individual modules. |
protected org.eclipse.swt.widgets.ToolBar |
m_moduleBar
Toolbar containing buttons representing modules allowing user to switch from module to module. |
protected org.eclipse.swt.graphics.Font |
m_moduleBarFont
Font used by buttons at module bar. |
protected org.eclipse.swt.widgets.CoolItem |
m_moduleBarItem
Toolbar item containing module toolbar. |
protected org.eclipse.swt.graphics.Image |
m_redImage
Red image to use in module toolbar. |
protected org.eclipse.swt.widgets.Shell |
m_shell
Main window shell. |
protected org.eclipse.swt.graphics.Image |
m_splashImage
Splash image to display when the application is starting. |
protected org.eclipse.swt.graphics.Image |
m_yellowImage
Yellow image to use in module toolbar. |
static java.lang.String |
SWT_GUI_TECHNOLOGY
Name of GUI technology used to build the thick client. |
static int |
SWT_MESSAGE_ERROR
Flags required to display error message. |
static int |
SWT_MESSAGE_INFO
Flags required to display information message. |
static int |
SWT_MESSAGE_YES_NO_QUESTION
Flags required to display message with yes/no question. |
| Fields inherited from interface org.opensubsystems.core.application.ThickClientGui |
|---|
GUI_ANYWHERE, GUI_FULLSCREEN, GUI_LEFTSCREEN, GUI_RIGHTSCREEN, MESSAGE_ANSWER_YES, MESSAGE_STYLE_ERROR, MESSAGE_STYLE_INFO, MESSAGE_STYLE_YES_NO_QUESTION, MESSAGE_TITLE_ERROR, MESSAGE_TITLE_INFO, MESSAGE_TITLE_QUESTION |
| Constructor Summary | |
|---|---|
SWTThickClientGui()
Construct instance of the thick client gui. |
|
| Method Summary | |
|---|---|
void |
activateModule(ThickClientModule module)
Activate specified module so that it is available for user interaction. |
protected void |
addModule(ThickClientModule module)
Add module to the gui |
void |
createClientArea()
Create client area of the application. |
void |
createDisplayResources(boolean bHideCursor)
Initialize any resources which are required by gui. |
void |
createMainWindow()
Create the main window of the application with all the default elements, such as toolbar and main client area. |
void |
createModules(java.util.Map mapModules)
Create graphical representation of specified modules |
void |
destroyClientArea()
Release and destroy resources allocated for the client area. |
void |
destroyDisplayResources()
Release resources allocated by GUI. |
void |
destroyMainWindow()
Destroy all resources allocated when main window was created. |
void |
destroyModules(java.util.Map mapModules)
Destroy graphical representation of specified modules |
org.eclipse.swt.graphics.Rectangle |
determineClientArea(org.eclipse.swt.widgets.Display display,
int iScreenPosition,
boolean bFixedSize)
Determine the client area which should be occupied by the GUI. |
void |
displayMainWindow(int iScreenPosition,
boolean bFixedSize)
Display the main application window. |
protected int |
displayMessage(org.eclipse.swt.widgets.Shell shell,
java.lang.String strTitle,
java.lang.String strMessage,
int iStyle)
Display message to user. |
java.lang.Object |
displayMessage(org.eclipse.swt.widgets.Shell shell,
java.lang.String strTitle,
java.lang.String strMessage,
java.lang.Object additionalInfo)
Display message to user. |
java.lang.Object |
displayMessage(java.lang.String strTitle,
java.lang.String strMessage,
java.lang.Object additionalInfo)
Display message to user. |
protected java.lang.Object |
getAnswer(int iAnswer)
Convert the passed in SWT answer into a predefined answer |
org.eclipse.swt.widgets.Composite |
getClientArea()
Get client area of the application |
org.eclipse.swt.widgets.Display |
getDisplay()
Get display device used by the aplication. |
java.lang.String |
getGuiTechnology()
Return String identifier for the GUI technology used by the instance of thick client. |
org.eclipse.swt.graphics.Image |
getIconImage()
Get icon to use for this application. |
org.eclipse.swt.widgets.Shell |
getShell()
Get main shell of the aplication. |
org.eclipse.swt.graphics.Image[] |
getSolidColorImages()
Get images representing solid colors |
protected int |
getStyle(java.lang.Object objStyle)
Convert the passed in style into valid SWT style. |
void |
init(ThickClient client)
Initialize the gui for a give client |
void |
interactWithUser()
Main message loop which processes messages for the application caused by user actions such as typing or mouse clicks. |
void |
pasivateModule(ThickClientModule module)
Pasivate the specified module so that it is not available for user interaction anymore. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String SWT_GUI_TECHNOLOGY
public static final int DEFAULT_MODULE_ICON_WIDTH
public static final int DEFAULT_MODULE_ICON_HEIGHT
public static final int DEFAULT_MODULE_ICON_TEXT
public static final int SWT_MESSAGE_YES_NO_QUESTION
public static final int SWT_MESSAGE_ERROR
public static final int SWT_MESSAGE_INFO
protected ThickClient m_client
protected int m_iMainWindowStyle
protected org.eclipse.swt.graphics.Image m_iconImage
protected org.eclipse.swt.graphics.Image m_blueImage
protected org.eclipse.swt.graphics.Image m_redImage
protected org.eclipse.swt.graphics.Image m_greenImage
protected org.eclipse.swt.graphics.Image m_yellowImage
protected org.eclipse.swt.graphics.Image m_grayImage
protected org.eclipse.swt.widgets.Display m_display
protected org.eclipse.swt.widgets.Shell m_shell
protected org.eclipse.swt.graphics.Font m_moduleBarFont
protected org.eclipse.swt.widgets.Composite m_clientArea
protected org.eclipse.swt.widgets.CoolBar m_mainToolBar
protected org.eclipse.swt.widgets.ToolBar m_moduleBar
protected org.eclipse.swt.widgets.CoolItem m_moduleBarItem
protected org.eclipse.swt.graphics.Image m_splashImage
protected org.eclipse.swt.graphics.Image m_logoImage
protected java.util.Map m_mapModuleToolItems
| Constructor Detail |
|---|
public SWTThickClientGui()
| Method Detail |
|---|
public org.eclipse.swt.widgets.Display getDisplay()
public org.eclipse.swt.widgets.Shell getShell()
public org.eclipse.swt.widgets.Composite getClientArea()
public org.eclipse.swt.graphics.Image getIconImage()
public org.eclipse.swt.graphics.Image[] getSolidColorImages()
public void init(ThickClient client)
init in interface ThickClientGuiclient - - client to initialize the gui forpublic void createDisplayResources(boolean bHideCursor)
createDisplayResources in interface ThickClientGuibHideCursor - - hide cursor since it might be distractingpublic void destroyDisplayResources()
destroyDisplayResources in interface ThickClientGuipublic void createMainWindow()
createMainWindow in interface ThickClientGuipublic void destroyMainWindow()
destroyMainWindow in interface ThickClientGui
public void createModules(java.util.Map mapModules)
throws OSSException
createModules in interface ThickClientGuimapModules - - key is module identification and value is the module
itself (ThickClientModule).
OSSException - - an error has occuredpublic void destroyModules(java.util.Map mapModules)
destroyModules in interface ThickClientGuimapModules - - key is module identification and value is the module
itself (ThickClientModule).public void pasivateModule(ThickClientModule module)
pasivateModule in interface ThickClientGuimodule - - module to pasivatepublic void activateModule(ThickClientModule module)
activateModule in interface ThickClientGuimodule - - module to activatepublic void createClientArea()
createClientArea in interface ThickClientGuipublic void destroyClientArea()
destroyClientArea in interface ThickClientGui
public void displayMainWindow(int iScreenPosition,
boolean bFixedSize)
displayMainWindow in interface ThickClientGuiiScreenPosition - - screen position where to display the guibFixedSize - - should the gui be fixed sizepublic void interactWithUser()
interactWithUser in interface ThickClientGuipublic java.lang.String getGuiTechnology()
getGuiTechnology in interface ThickClientGui
public org.eclipse.swt.graphics.Rectangle determineClientArea(org.eclipse.swt.widgets.Display display,
int iScreenPosition,
boolean bFixedSize)
display - - display which is used to display GUIiScreenPosition - - screen position for which to determine the area,
one of the GUI constantsbFixedSize - - should the gui be fixed size
public java.lang.Object displayMessage(java.lang.String strTitle,
java.lang.String strMessage,
java.lang.Object additionalInfo)
displayMessage in interface ThickClientGuistrTitle - - title of the message, look at constants in this interfacestrMessage - - message to displayadditionalInfo - - additional information to pass in, this may be
implementation specific, look at constants in this
interface
public java.lang.Object displayMessage(org.eclipse.swt.widgets.Shell shell,
java.lang.String strTitle,
java.lang.String strMessage,
java.lang.Object additionalInfo)
shell - - shell which should display the messagestrTitle - - title of the message, look at constants in this interfacestrMessage - - message to displayadditionalInfo - - additional information to pass in, this may be
implementation specific, look at constants in this
interface
protected int displayMessage(org.eclipse.swt.widgets.Shell shell,
java.lang.String strTitle,
java.lang.String strMessage,
int iStyle)
shell - - shell which should display the messagestrTitle - - title of the messagestrMessage - - message to displayiStyle - - style of the message box to display
protected void addModule(ThickClientModule module)
module - - module to addprotected int getStyle(java.lang.Object objStyle)
objStyle - - one of the style constants in ThickClientGui
protected java.lang.Object getAnswer(int iAnswer)
iAnswer - - SWT answer
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||