org.eclipse.cdt.make.internal.ui
Class DialogSettingsHelper

java.lang.Object
  extended by org.eclipse.cdt.make.internal.ui.DialogSettingsHelper

public class DialogSettingsHelper
extends java.lang.Object

Helper class for dealing with setting and restoring dialog settings.


Constructor Summary
DialogSettingsHelper()
           
 
Method Summary
static org.eclipse.swt.graphics.Point getInitialLocation(java.lang.String dialogSettingsSectionName)
          Returns the initial location which is persisted in the Debug UI Plugin dialog settings under the provided dialog setttings section name.
static org.eclipse.swt.graphics.Point getInitialSize(java.lang.String dialogSettingsSectionName, org.eclipse.swt.graphics.Point initialSize)
          Returns the initial size which is the larger of the initialSize or the size persisted in the Debug UI Plugin dialog settings under the provided dialog setttings section name.
static void persistShellGeometry(org.eclipse.swt.widgets.Shell shell, java.lang.String dialogSettingsSectionName)
          Persists the location and dimensions of the shell in the Debug UI Plugin dialog settings under the provided dialog settings section name
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DialogSettingsHelper

public DialogSettingsHelper()
Method Detail

persistShellGeometry

public static void persistShellGeometry(org.eclipse.swt.widgets.Shell shell,
                                        java.lang.String dialogSettingsSectionName)
Persists the location and dimensions of the shell in the Debug UI Plugin dialog settings under the provided dialog settings section name

Parameters:
shell - The shell whose geometry is to be stored
dialogSettingsSectionName - The name of the dialog settings section

getInitialSize

public static org.eclipse.swt.graphics.Point getInitialSize(java.lang.String dialogSettingsSectionName,
                                                            org.eclipse.swt.graphics.Point initialSize)
Returns the initial size which is the larger of the initialSize or the size persisted in the Debug UI Plugin dialog settings under the provided dialog setttings section name. If no size is persisted in the settings, the initialSize is returned.

Parameters:
initialSize - The initialSize to compare against
dialogSettingsSectionName - The name of the dialog settings section
Returns:
the initial size

getInitialLocation

public static org.eclipse.swt.graphics.Point getInitialLocation(java.lang.String dialogSettingsSectionName)
Returns the initial location which is persisted in the Debug UI Plugin dialog settings under the provided dialog setttings section name. If location is not persisted in the settings, the null is returned.

Parameters:
dialogSettingsSectionName - The name of the dialog settings section
Returns:
The initial location or null