Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ResizableWizard.java')
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ResizableWizard.java116
1 files changed, 58 insertions, 58 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ResizableWizard.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ResizableWizard.java
index c794479b0..e377b813f 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ResizableWizard.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ResizableWizard.java
@@ -27,65 +27,65 @@ public class ResizableWizard extends Wizard {
private final int DEFAULT_WIDTH;
private final int DEFAULT_HEIGHT;
-
- private static final String BOUNDS_HEIGHT_KEY = "width"; //$NON-NLS-1$
- private static final String BOUNDS_WIDTH_KEY = "height"; //$NON-NLS-1$
-
- final String fSectionName;
-
- public ResizableWizard(String sectionName, IDialogSettings settings) {
- this(sectionName, settings, 300, 400);
- }
-
- protected ResizableWizard(String sectionName, IDialogSettings settings, int defaultWidth, int defaultHeight) {
- DEFAULT_WIDTH= defaultWidth;
- DEFAULT_HEIGHT= defaultHeight;
- fSectionName= sectionName;
- setDialogSettings(settings);
- }
-
- protected static int open(Shell shell, ResizableWizard wizard) {
- final WizardDialog dialog= new WizardDialog(shell, wizard);
- dialog.setMinimumPageSize(wizard.loadSize());
- return dialog.open();
- }
-
- public void saveSize() {
- final Rectangle bounds= getContainer().getCurrentPage().getControl().getParent().getClientArea();
- final IDialogSettings settings= getDialogSettings();
- if (settings == null)
- return;
-
- IDialogSettings section= settings.getSection(fSectionName);
- if (section == null)
- section= settings.addNewSection(fSectionName);
-
- section.put(BOUNDS_WIDTH_KEY, bounds.width);
- section.put(BOUNDS_HEIGHT_KEY, bounds.height);
- }
-
- public Point loadSize() {
- final Point size= new Point(DEFAULT_WIDTH, DEFAULT_HEIGHT);
-
- final IDialogSettings settings= getDialogSettings();
- if (settings == null)
- return size;
-
- final IDialogSettings section= settings.getSection(fSectionName);
- if (section == null)
- return size;
+
+ private static final String BOUNDS_HEIGHT_KEY = "width"; //$NON-NLS-1$
+ private static final String BOUNDS_WIDTH_KEY = "height"; //$NON-NLS-1$
+
+ final String fSectionName;
+
+ public ResizableWizard(String sectionName, IDialogSettings settings) {
+ this(sectionName, settings, 300, 400);
+ }
+
+ protected ResizableWizard(String sectionName, IDialogSettings settings, int defaultWidth, int defaultHeight) {
+ DEFAULT_WIDTH= defaultWidth;
+ DEFAULT_HEIGHT= defaultHeight;
+ fSectionName= sectionName;
+ setDialogSettings(settings);
+ }
+
+ protected static int open(Shell shell, ResizableWizard wizard) {
+ final WizardDialog dialog= new WizardDialog(shell, wizard);
+ dialog.setMinimumPageSize(wizard.loadSize());
+ return dialog.open();
+ }
+
+ public void saveSize() {
+ final Rectangle bounds= getContainer().getCurrentPage().getControl().getParent().getClientArea();
+ final IDialogSettings settings= getDialogSettings();
+ if (settings == null)
+ return;
+
+ IDialogSettings section= settings.getSection(fSectionName);
+ if (section == null)
+ section= settings.addNewSection(fSectionName);
+
+ section.put(BOUNDS_WIDTH_KEY, bounds.width);
+ section.put(BOUNDS_HEIGHT_KEY, bounds.height);
+ }
+
+ public Point loadSize() {
+ final Point size= new Point(DEFAULT_WIDTH, DEFAULT_HEIGHT);
+
+ final IDialogSettings settings= getDialogSettings();
+ if (settings == null)
+ return size;
+
+ final IDialogSettings section= settings.getSection(fSectionName);
+ if (section == null)
+ return size;
- try {
- size.x= section.getInt(BOUNDS_WIDTH_KEY);
- size.y= section.getInt(BOUNDS_HEIGHT_KEY);
- } catch (NumberFormatException e) {
- }
- return size;
- }
+ try {
+ size.x= section.getInt(BOUNDS_WIDTH_KEY);
+ size.y= section.getInt(BOUNDS_HEIGHT_KEY);
+ } catch (NumberFormatException e) {
+ }
+ return size;
+ }
- public boolean performFinish() {
- saveSize();
- return true;
- }
+ public boolean performFinish() {
+ saveSize();
+ return true;
+ }
}

Back to the top