Mega Code Archive

 
Categories / Java Tutorial / SWT
 

Understanding the Shell Object

The Shell object represents a window-either a top-level window or a dialog window. Shell Styles: StyleDescription BORDERAdds a border. CLOSEAdds a close button. MINAdds a minimize button. MAXAdds a maximize button. NO_TRIMCreates a Shell that has no border and can't be moved, closed, resized, minimized, or maximized. (Useful for splash screens). RESIZEAdds a resizable border. TITLEAdds a title bar. DIALOG_TRIMConvenience style, equivalent to TITLE | CLOSE | BORDER. SHELL_TRIMConvenience style, equivalent to CLOSE | TITLE | MIN | MAX | RESIZE. APPLICATION_MODALCreates a Shell that's modal to the application. Note that you should specify only one of APPLICATION_MODAL, PRIMARY_MODAL, SYSTEM_MODAL, or MODELESS; you can specify more, but only one is applied. The order of preference is SYSTEM_MODAL, APPLICATION_MODAL, PRIMARY_MODAL, then MODELESS. PRIMARY_MODALCreates a primary modal Shell. SYSTEM_MODALCreates a Shell that's modal system-wide. MODELESSCreates a modeless Shell.