From: GiWoong Kim Date: Wed, 24 Jul 2013 12:56:56 +0000 (+0900) Subject: menu: modified Detail Info Dialog X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~879 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cec81d29d24c5164a0997cab8ff25d38e378e7cd;p=sdk%2Femulator%2Fqemu.git menu: modified Detail Info Dialog deleted SD Card feature, added Skin Name feature, added GPU Virtualization feature Change-Id: I1b7f4dc1e9782d579fc718897e47389a27ae229f Signed-off-by: GiWoong Kim --- diff --git a/tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkin.java b/tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkin.java index 2d6791d1a0..32c96fd7de 100644 --- a/tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkin.java +++ b/tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkin.java @@ -1028,7 +1028,7 @@ public class EmulatorSkin { String emulatorName = SkinUtil.makeEmulatorName(config); DetailInfoDialog detailInfoDialog = new DetailInfoDialog( - shell, emulatorName, communicator, config); + shell, emulatorName, communicator, config, skinInfo); detailInfoDialog.open(); } }; diff --git a/tizen/src/skin/client/src/org/tizen/emulator/skin/dialog/AboutDialog.java b/tizen/src/skin/client/src/org/tizen/emulator/skin/dialog/AboutDialog.java index 17acbf7d0a..9b8b2a3ac0 100644 --- a/tizen/src/skin/client/src/org/tizen/emulator/skin/dialog/AboutDialog.java +++ b/tizen/src/skin/client/src/org/tizen/emulator/skin/dialog/AboutDialog.java @@ -57,7 +57,6 @@ import org.tizen.emulator.skin.util.StringUtil; import org.tizen.emulator.skin.util.SwtUtil; public class AboutDialog extends SkinDialog { - public static final String ABOUT_PROP_FILENAME = "about.properties"; public static final String PROP_KEY_VERSION = "version"; @@ -72,9 +71,12 @@ public class AboutDialog extends SkinDialog { private Image aboutImage; private EmulatorConfig config; - + /** + * Constructor + */ public AboutDialog(Shell parent, EmulatorConfig config) { - super(parent, "About Tizen Emulator", SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL); + super(parent, "About Tizen Emulator", + SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL); this.config = config; } @@ -293,10 +295,12 @@ public class AboutDialog extends SkinDialog { return properties; } + @Override protected void setShellSize() { shell.setSize(436, shell.getSize().y); } + @Override protected void close() { logger.info("close the about dialog"); aboutImage.dispose(); diff --git a/tizen/src/skin/client/src/org/tizen/emulator/skin/dialog/DetailInfoDialog.java b/tizen/src/skin/client/src/org/tizen/emulator/skin/dialog/DetailInfoDialog.java index 3718d46366..b50b37b542 100644 --- a/tizen/src/skin/client/src/org/tizen/emulator/skin/dialog/DetailInfoDialog.java +++ b/tizen/src/skin/client/src/org/tizen/emulator/skin/dialog/DetailInfoDialog.java @@ -37,13 +37,10 @@ import java.util.logging.Level; import java.util.logging.Logger; import org.eclipse.swt.SWT; -import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.layout.GridData; import org.eclipse.swt.program.Program; -import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Table; @@ -54,6 +51,7 @@ import org.tizen.emulator.skin.comm.sock.SocketCommunicator; import org.tizen.emulator.skin.comm.sock.SocketCommunicator.DataTranfer; import org.tizen.emulator.skin.config.EmulatorConfig; import org.tizen.emulator.skin.config.EmulatorConfig.ArgsConstants; +import org.tizen.emulator.skin.info.SkinInformation; import org.tizen.emulator.skin.log.SkinLogger; import org.tizen.emulator.skin.util.SkinUtil; import org.tizen.emulator.skin.util.StringUtil; @@ -64,67 +62,84 @@ import org.tizen.emulator.skin.util.SwtUtil; * */ public class DetailInfoDialog extends SkinDialog { - public final static String DATA_DELIMITER = "#"; - public final static String KEY_SDCARD_PATH = "SD Card Path"; + + public final static String KEY_VM_NAME = "VM Name"; + public final static String KEY_SKIN_NAME = "Skin Name"; + public final static String KEY_CPU_ARCH = "CPU"; + public final static String KEY_RAM_SIZE = "RAM Size"; + public final static String KEY_DISPLAY_RESOLUTION = "Display Resolution"; + public final static String KEY_DISPLAY_DENSITY = "Display Density"; + public final static String KEY_FILESHARING = "File Sharing"; public final static String KEY_FILESHARED_PATH = "File Shared Path"; + public final static String KEY_CPU_VIRTUALIZATION = "CPU Virtualization"; + public final static String KEY_GPU_VIRTUALIZATION = "GPU Virtualization"; public final static String KEY_IMAGE_PATH = "Image Path"; public final static String KEY_LOG_PATH = "Log Path"; + public final static String VALUE_NONE = "None"; public final static String VALUE_SUPPORTED = "Supported"; public final static String VALUE_NOTSUPPORTED = "Not Supported"; + public final static String VALUE_ENABLED = "Enabled"; + public final static String VALUE_DISABLED = "Disabled"; private Logger logger = SkinLogger.getSkinLogger(DetailInfoDialog.class).getLogger(); private SocketCommunicator communicator; private EmulatorConfig config; + private SkinInformation skinInfo; private Table table; private LinkedHashMap refinedData; - public DetailInfoDialog( Shell parent, String emulatorName, SocketCommunicator communicator, EmulatorConfig config ) { - super( parent, "Detail Info" + " - " + emulatorName, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL | SWT.RESIZE - | SWT.MAX ); + /** + * Constructor + */ + public DetailInfoDialog(Shell parent, String emulatorName, + SocketCommunicator communicator, EmulatorConfig config, SkinInformation skinInfo) { + super(parent, "Detail Info" + " - " + emulatorName, + SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL | SWT.RESIZE | SWT.MAX); + this.communicator = communicator; this.config = config; + this.skinInfo = skinInfo; } @Override - protected Composite createArea( Composite parent ) { - + protected Composite createArea(Composite parent) { String infoData = queryData(); - if ( StringUtil.isEmpty( infoData ) ) { + if (StringUtil.isEmpty(infoData)) { return null; } - Composite composite = new Composite( parent, SWT.NONE ); - composite.setLayout( new FillLayout() ); + Composite composite = new Composite(parent, SWT.NONE); + composite.setLayout(new FillLayout()); - table = new Table( composite, SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION ); - table.setHeaderVisible( true ); - table.setLinesVisible( true ); + table = new Table(composite, + SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION); + table.setHeaderVisible(true); + table.setLinesVisible(true); TableColumn[] column = new TableColumn[2]; - column[0] = new TableColumn( table, SWT.LEFT ); - column[0].setText( "Feature" ); + column[0] = new TableColumn(table, SWT.LEFT); + column[0].setText("Feature"); - column[1] = new TableColumn( table, SWT.LEFT ); - column[1].setText( "Value" ); + column[1] = new TableColumn(table, SWT.LEFT); + column[1].setText("Value"); int index = 0; - refinedData = composeAndParseData( infoData ); - Iterator> iterator = refinedData.entrySet().iterator(); - - while ( iterator.hasNext() ) { + refinedData = composeAndParseData(infoData); + Iterator> iterator = + refinedData.entrySet().iterator(); + while (iterator.hasNext()) { Entry entry = iterator.next(); - TableItem tableItem = new TableItem( table, SWT.NONE, index ); - tableItem.setText( new String[] { entry.getKey(), entry.getValue() } ); + TableItem tableItem = new TableItem(table, SWT.NONE, index); + tableItem.setText(new String[] { entry.getKey(), entry.getValue() }); index++; - } column[0].pack(); @@ -135,7 +150,7 @@ public class DetailInfoDialog extends SkinDialog { table.addSelectionListener(new SelectionListener() { @Override public void widgetSelected(SelectionEvent event) { - //do nothing + /* do nothing */ } @Override @@ -153,17 +168,16 @@ public class DetailInfoDialog extends SkinDialog { openPath = refinedData.get(KEY_IMAGE_PATH); } else if (tableItem.getText().compareTo(KEY_FILESHARED_PATH) == 0) { openPath = refinedData.get(KEY_FILESHARED_PATH); - } else if (tableItem.getText().compareTo(KEY_SDCARD_PATH) == 0) { - openPath = refinedData.get(KEY_SDCARD_PATH); } try { openPath = StringUtil.getCanonicalPath(openPath); } catch (IOException e) { - logger.warning( "Invalid path" ); + logger.warning("Invalid path"); } - if (openPath.compareTo(VALUE_NONE) == 0 || openPath.compareTo("") == 0) { + if (openPath.compareTo(VALUE_NONE) == 0 || + openPath.compareTo("") == 0) { return; } @@ -176,8 +190,7 @@ public class DetailInfoDialog extends SkinDialog { } else if (SwtUtil.isWindowsPlatform()) { procBrowser.command("explorer", "\"" + openPath + "\""); } else if (SwtUtil.isMacPlatform()) { - //TODO: - logger.warning( "not supported yet" ); + logger.warning("not supported yet"); } if (procBrowser.command().isEmpty() == false) { @@ -192,149 +205,143 @@ public class DetailInfoDialog extends SkinDialog { }); return composite; - } @Override protected void setShellSize() { - if( SwtUtil.isLinuxPlatform() ) { - shell.setSize( (int) ( 402 * 1.618 ), 402 ); + if (SwtUtil.isLinuxPlatform()) { + shell.setSize((int) (402 * 1.618/* golden ratio */), 402); } else { - shell.setSize( (int) ( 372 * 1.618 ), 372 ); + shell.setSize((int) (372 * 1.618), 372); } } private String queryData() { - String infoData = null; DataTranfer dataTranfer = communicator.sendDataToQEMU(SendCommand.DETAIL_INFO, null, true); byte[] receivedData = communicator.getReceivedData(dataTranfer); - if ( null != receivedData ) { - infoData = new String( receivedData ); + if (null != receivedData) { + infoData = new String(receivedData); } else { - logger.severe( "Fail to get detail info." ); - SkinUtil.openMessage( shell, null, "Fail to get detail info.", SWT.ICON_ERROR, config ); + logger.severe("Fail to get detail info"); + SkinUtil.openMessage(shell, null, + "Fail to get detail info", SWT.ICON_ERROR, config); } return infoData; - } - private LinkedHashMap composeAndParseData( String infoData ) { - - logger.info( "Received infoData:" + infoData ); + private LinkedHashMap composeAndParseData(String infoData) { + logger.info("Received infoData : " + infoData); String cpu = ""; - String ram = ""; + String ramSize = ""; String dpi = ""; - String sdPath = ""; String imagePath = ""; - boolean isFirstDrive = true; String sharedPath = ""; - boolean isHwVirtual = false; - String hwVirtualCompare = ""; + boolean isCpuVirtual = false; + boolean isGpuVirtual = false; + String cpuVirtualCompare = ""; + String gpuVirtualCompare = ""; String logPath = ""; boolean isHaxError = false; - - if ( SwtUtil.isLinuxPlatform() ) { - hwVirtualCompare = "-enable-kvm"; - } else if ( SwtUtil.isWindowsPlatform() ) { - hwVirtualCompare = "-enable-hax"; - } - - String[] split = infoData.split( DATA_DELIMITER ); - for ( int i = 0; i < split.length; i++ ) { + if (SwtUtil.isLinuxPlatform()) { + cpuVirtualCompare = "-enable-kvm"; + } else if (SwtUtil.isWindowsPlatform()) { + cpuVirtualCompare = "-enable-hax"; + } + gpuVirtualCompare = "-enable-gl"; - if ( 0 == i ) { + String[] split = infoData.split(DATA_DELIMITER); + for (int i = 0; i < split.length; i++) { + if (0 == i) { String exec = split[i].trim().toLowerCase(); - if ( SwtUtil.isWindowsPlatform() ) { - if ( 4 <= exec.length() ) { - // remove '.exe' in Windows - exec = exec.substring( 0, exec.length() - 4 ); + if (SwtUtil.isWindowsPlatform()) { + if (4 <= exec.length()) { + /* remove '.exe' in Windows */ + exec = exec.substring(0, exec.length() - 4); } } - - if ( exec.endsWith( "x86" ) ) { + + // TODO: + if (exec.endsWith("x86")) { cpu = "x86"; - } else if ( exec.endsWith( "arm" ) ) { + } else if (exec.endsWith("arm")) { cpu = "ARM"; } - } else { - - if ( i + 1 <= split.length ) { - + if (i + 1 <= split.length) { String arg = split[i].trim(); - if ( "-m".equals( arg ) ) { - - ram = split[i + 1].trim(); - - } else if ( "-drive".equals( arg ) ) { - - // arg : file=/home/xxx/tizen-sdk-data/emulator-vms/vms/xxx/emulimg-xxx.x86 + if ("-m".equals(arg)) + { + ramSize = split[i + 1].trim(); + } + else if ("-drive".equals(arg)) + { + /* arg : file=/path/emulimg.x86,... */ arg = split[i + 1].trim(); - if ( arg.startsWith( "file=" ) ) { - - String[] sp = arg.split( "," ); - String[] sp2 = sp[0].split( "=" ); + if (arg.startsWith("file=")) { + String[] sp = arg.split(","); + String[] sp2 = sp[0].split("="); String drivePath = sp2[sp2.length - 1]; - if ( isFirstDrive ) { - imagePath = drivePath; - isFirstDrive = false; - } else { - sdPath = drivePath; - } - + imagePath = drivePath; } - - } else if ( "-virtfs".equals( arg ) ) { - - // arg : local,path=/home/xxx/xxx/xxx,security_model=none,mount_tag=fileshare + } + else if ("-virtfs".equals(arg)) + { + /* arg : local,path=/path,... */ arg = split[i + 1].trim(); - String[] sp = arg.split( "," ); + String[] sp = arg.split(","); - if ( 1 < sp.length ) { - int spIndex = sp[1].indexOf( "=" ); - sharedPath = sp[1].substring( spIndex + 1, sp[1].length() ); + if (1 < sp.length) { + int spIndex = sp[1].indexOf("="); + sharedPath = sp[1].substring(spIndex + 1, sp[1].length()); } - - } else if ( "-append".equals( arg ) ) { - + } + else if ("-append".equals(arg)) + { arg = split[i + 1].trim(); + String[] splitSub = arg.split(" "); - int idx = arg.indexOf( "dpi" ); + for (int j = 0; j < splitSub.length; j++) { + String parameterKernel = splitSub[j].trim(); - if ( -1 != idx ) { - if ( idx + 7 <= arg.length() ) { - - dpi = arg.substring( idx, idx + 7 ); // end index is not 8, remove last '0' - - String[] sp = dpi.split( "=" ); - if ( 1 < sp.length ) { - dpi = sp[1]; + if (parameterKernel.startsWith("dpi=")) { + String[] sp = parameterKernel.split("="); + if (1 < sp.length) { + dpi = Integer.toString( + Integer.parseInt(sp[1]) / 10); } - } } - - } else if ( hwVirtualCompare.equals( arg ) ) { - isHwVirtual = true; - } else if ( arg.startsWith("hax_error=") ) { - String[] sp = arg.split( "=" ); - if ( 1 < sp.length ) { - isHaxError = Boolean.parseBoolean( sp[1] ); + } + else if (cpuVirtualCompare.equals(arg)) + { + isCpuVirtual = true; + } + else if (gpuVirtualCompare.equals(arg)) + { + isGpuVirtual = true; + } + else if (arg.startsWith("hax_error=")) + { + String[] sp = arg.split("="); + if (1 < sp.length) { + isHaxError = Boolean.parseBoolean(sp[1]); } - } else if (arg.startsWith("log_path=")) { + } + else if (arg.startsWith("log_path=")) + { String[] sp = arg.split("="); - if ( 1 < sp.length ) { + if (1 < sp.length) { logPath = sp[1]; try { @@ -342,72 +349,73 @@ public class DetailInfoDialog extends SkinDialog { } catch (IOException e) { logger.log(Level.SEVERE, e.getMessage(), e); } - logger.info("log path = " + logPath); //without filename + + logger.info("log path = " + logPath); /* without filename */ } } } - } - } - LinkedHashMap result = new LinkedHashMap(); + LinkedHashMap result = + new LinkedHashMap(); - /* Target name */ - result.put( "Name", SkinUtil.getVmName( config ) ); + /* VM name */ + result.put(KEY_VM_NAME, SkinUtil.getVmName(config)); + + /* Skin name */ + result.put(KEY_SKIN_NAME, skinInfo.getSkinName()); /* CPU srchitecture */ - result.put( "CPU", cpu ); + result.put(KEY_CPU_ARCH, cpu); + + /* RAM size */ + result.put(KEY_RAM_SIZE, ramSize); /* Target display resolution */ - int width = config.getArgInt( ArgsConstants.RESOLUTION_WIDTH ); - int height = config.getArgInt( ArgsConstants.RESOLUTION_HEIGHT ); - result.put( "Display Resolution", width + "x" + height ); + int width = config.getArgInt(ArgsConstants.RESOLUTION_WIDTH); + int height = config.getArgInt(ArgsConstants.RESOLUTION_HEIGHT); + result.put(KEY_DISPLAY_RESOLUTION, width + " x " + height); /* DPI (dots per inch) */ - result.put( "Display Density", dpi ); - - /* SD card path */ - if ( StringUtil.isEmpty( sdPath ) ) { - result.put("SD Card", VALUE_NOTSUPPORTED); - result.put(KEY_SDCARD_PATH, VALUE_NONE); - } else { - result.put("SD Card", VALUE_SUPPORTED); - result.put(KEY_SDCARD_PATH, sdPath); - } - - /* RAM size */ - result.put( "RAM Size", ram ); + result.put(KEY_DISPLAY_DENSITY, dpi); /* Whether host file sharing is supported */ - if ( StringUtil.isEmpty( sharedPath ) ) { - result.put("File Sharing", VALUE_NOTSUPPORTED); + if (StringUtil.isEmpty(sharedPath)) { + result.put(KEY_FILESHARING, VALUE_NOTSUPPORTED); result.put(KEY_FILESHARED_PATH, VALUE_NONE); } else { - result.put("File Sharing", VALUE_SUPPORTED); + result.put(KEY_FILESHARING, VALUE_SUPPORTED); result.put(KEY_FILESHARED_PATH, sharedPath); } /* Whether hardware virtualization is supported */ - if ( isHwVirtual ) { - if ( isHaxError ) { - result.put( "HW Virtualization State", "Disable(insufficient memory for driver)" ); + if (isCpuVirtual == true) { + if (isHaxError == true) { + result.put(KEY_CPU_VIRTUALIZATION, + "Disable(insufficient memory for driver)"); } else { - result.put( "HW Virtualization State", "Enable" ); + result.put(KEY_CPU_VIRTUALIZATION, VALUE_ENABLED); } } else { - result.put( "HW Virtualization State", "Disable" ); + result.put(KEY_CPU_VIRTUALIZATION, VALUE_DISABLED); } - /* Target image path */ - if ( StringUtil.isEmpty( imagePath ) ) { + if (isGpuVirtual == true) { + result.put(KEY_GPU_VIRTUALIZATION, VALUE_ENABLED); + } else { + result.put(KEY_GPU_VIRTUALIZATION, VALUE_DISABLED); + } + + /* platform image path */ + if (StringUtil.isEmpty(imagePath)) { result.put(KEY_IMAGE_PATH, "Not identified"); } else { result.put(KEY_IMAGE_PATH, imagePath); } - /* Emulator log file path */ + /* emulator log path */ if (StringUtil.isEmpty(logPath)) { result.put(KEY_LOG_PATH, VALUE_NONE); } else { @@ -415,30 +423,20 @@ public class DetailInfoDialog extends SkinDialog { } return result; - } - protected void createButtons( Composite parent ) { - super.createButtons( parent ); - - Button okButton = createButton( parent, OK ); - - GridData gd = new GridData(); - gd.grabExcessHorizontalSpace = true; - gd.horizontalAlignment = SWT.RIGHT; - okButton.setLayoutData( gd ); + @Override + protected void createButtons(Composite parent) { + super.createButtons(parent); - okButton.setFocus(); - - okButton.addSelectionListener( new SelectionAdapter() { - @Override - public void widgetSelected( SelectionEvent e ) { - DetailInfoDialog.this.shell.close(); - } - } ); + Composite composite = new Composite(parent, SWT.NONE); + FillLayout fillLayout = new FillLayout(SWT.HORIZONTAL); + composite.setLayout(fillLayout); + createOKButton(composite, true); }; + @Override protected void close() { logger.info("close the detail info dialog"); } diff --git a/tizen/src/skin/client/src/org/tizen/emulator/skin/dialog/SkinDialog.java b/tizen/src/skin/client/src/org/tizen/emulator/skin/dialog/SkinDialog.java index 747bae5fde..3b1d792569 100644 --- a/tizen/src/skin/client/src/org/tizen/emulator/skin/dialog/SkinDialog.java +++ b/tizen/src/skin/client/src/org/tizen/emulator/skin/dialog/SkinDialog.java @@ -1,7 +1,7 @@ /** * * - * Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved. + * Copyright (C) 2011 - 2013 Samsung Electronics Co., Ltd. All rights reserved. * * Contact: * GiWoong Kim @@ -29,6 +29,8 @@ package org.tizen.emulator.skin.dialog; +import java.util.logging.Logger; + import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; @@ -42,6 +44,7 @@ import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Dialog; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; +import org.tizen.emulator.skin.log.SkinLogger; import org.tizen.emulator.skin.util.StringUtil; /** @@ -49,9 +52,11 @@ import org.tizen.emulator.skin.util.StringUtil; * */ public abstract class SkinDialog extends Dialog { - public static final String OK = " " + "OK" + " "; - + + private Logger logger = + SkinLogger.getSkinLogger(SkinDialog.class).getLogger(); + protected Shell shell; protected Composite buttonComposite; private Shell parent; @@ -81,9 +86,10 @@ public abstract class SkinDialog extends Dialog { return; } + /* bottom side */ buttonComposite = new Composite(parent, SWT.NONE); - buttonComposite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); - buttonComposite.setLayout(new FillLayout(SWT.HORIZONTAL)); + buttonComposite.setLayoutData(new GridData(SWT.RIGHT, SWT.BOTTOM, true, true)); + buttonComposite.setLayout(new GridLayout(1, false)); createButtons(buttonComposite); } @@ -101,7 +107,7 @@ public abstract class SkinDialog extends Dialog { setShellSize(); - if (this.parent != null) { + if (parent != null) { Point central = new Point( this.parent.getLocation().x + (this.parent.getSize().x / 2), this.parent.getLocation().y + (this.parent.getSize().y / 2)); @@ -140,11 +146,13 @@ public abstract class SkinDialog extends Dialog { } protected void close() { + /* do nothing */ } protected void setShellSize() { + /* do nothing */ } - + protected abstract Composite createArea(Composite parent); protected void createButtons(Composite parent) { @@ -175,14 +183,15 @@ public abstract class SkinDialog extends Dialog { } protected Button createOKButton(Composite parent, boolean setFocus) { + logger.info("create OK button"); Button okButton = createButton(parent, OK); okButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { - SkinDialog.this.shell.close(); + shell.close(); } - } ); + }); if (setFocus) { okButton.setFocus();