summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashForm.java
diff options
context:
space:
mode:
authorFelipe Heidrich <fheidric>2009-02-17 22:40:53 +0000
committerFelipe Heidrich <fheidric>2009-02-17 22:40:53 +0000
commited4af8558935206a6140493672a9acfb3db2cef3 (patch)
tree1f036d6638781bfcd063eb95b4df454285e9d7c3 /bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashForm.java
parente4de5e48d2fd11782d0a2d1c87edee6f302ca529 (diff)
downloadeclipse.platform.swt-ed4af8558935206a6140493672a9acfb3db2cef3.tar.gz
eclipse.platform.swt-ed4af8558935206a6140493672a9acfb3db2cef3.tar.xz
eclipse.platform.swt-ed4af8558935206a6140493672a9acfb3db2cef3.zip
refactoring
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashForm.java')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashForm.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashForm.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashForm.java
index 7393bfaf75..371e5b6ac5 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashForm.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashForm.java
@@ -95,6 +95,13 @@ static int checkStyle (int style) {
int mask = SWT.BORDER | SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT;
return style & mask;
}
+Sash createSash() {
+ Sash sash = new Sash(this, sashStyle);
+ sash.setBackground(background);
+ sash.setForeground(foreground);
+ sash.addListener(SWT.Selection, sashListener);
+ return sash;
+}
/**
* Returns SWT.HORIZONTAL if the controls in the SashForm are laid out side by side
* or SWT.VERTICAL if the controls in the SashForm are laid out top to bottom.
@@ -296,10 +303,7 @@ public void setOrientation(int orientation) {
sashStyle |= orientation == SWT.VERTICAL ? SWT.HORIZONTAL : SWT.VERTICAL;
for (int i = 0; i < sashes.length; i++) {
sashes[i].dispose();
- sashes[i] = new Sash(this, sashStyle);
- sashes[i].setBackground(background);
- sashes[i].setForeground(foreground);
- sashes[i].addListener(SWT.Selection, sashListener);
+ sashes[i] = createSash();
}
layout(false);
}