summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ScrolledComposite.java
diff options
context:
space:
mode:
authorVeronika Irvine <veronika>2002-02-12 15:51:02 +0000
committerVeronika Irvine <veronika>2002-02-12 15:51:02 +0000
commitab531cf123ca20f091893cb11499f6097304e828 (patch)
treefe41a1a83be8e94d63225db33fb39005870b9738 /bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ScrolledComposite.java
parent936e37fb69e1941f5f61dda42a17ca3b4cf79f12 (diff)
downloadeclipse.platform.swt-ab531cf123ca20f091893cb11499f6097304e828.tar.gz
eclipse.platform.swt-ab531cf123ca20f091893cb11499f6097304e828.tar.xz
eclipse.platform.swt-ab531cf123ca20f091893cb11499f6097304e828.zip
add checkWidget
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ScrolledComposite.java')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ScrolledComposite.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ScrolledComposite.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ScrolledComposite.java
index fcc237a78c..0f1c5b84f2 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ScrolledComposite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ScrolledComposite.java
@@ -154,6 +154,7 @@ private static int checkStyle (int style) {
* @return the Always Show Scrollbars flag value
*/
public boolean getAlwaysShowScrollBars() {
+ checkWidget();
return alwaysShowScroll;
}
@@ -161,6 +162,7 @@ public boolean getAlwaysShowScrollBars() {
* Get the content that is being scrolled.
*/
public Control getContent() {
+ checkWidget();
return content;
}
@@ -173,6 +175,7 @@ private void hScroll() {
}
public void layout(boolean changed) {
+ checkWidget();
if (content == null) return;
Rectangle contentRect = content.getBounds();
ScrollBar hBar = getHorizontalBar ();
@@ -269,6 +272,7 @@ private void resize() {
* horizontal and vertical directions.
*/
public void setAlwaysShowScrollBars(boolean show) {
+ checkWidget();
if (show == alwaysShowScroll) return;
alwaysShowScroll = show;
ScrollBar hBar = getHorizontalBar ();
@@ -282,6 +286,7 @@ public void setAlwaysShowScrollBars(boolean show) {
* Set the content that will be scrolled.
*/
public void setContent(Control content) {
+ checkWidget();
if (this.content != null && !this.content.isDisposed()) {
this.content.removeListener(SWT.Resize, contentListener);
this.content.setBounds(new Rectangle(-200, -200, 0, 0));
@@ -318,6 +323,7 @@ public void setContent(Control content) {
* If expand is false, this behaviour is turned off. By default, this behaviour is turned off.
*/
public void setExpandHorizontal(boolean expand) {
+ checkWidget();
if (expand == expandHorizontal) return;
expandHorizontal = expand;
layout();
@@ -331,12 +337,14 @@ public void setExpandHorizontal(boolean expand) {
* If expand is false, this behaviour is turned off. By default, this behaviour is turned off.
*/
public void setExpandVertical(boolean expand) {
+ checkWidget();
if (expand == expandVertical) return;
expandVertical = expand;
layout();
}
public void setLayout (Layout layout) {
// do not allow a layout to be set on this class because layout is being handled by the resize listener
+ checkWidget();
return;
}
/**
@@ -345,12 +353,15 @@ public void setLayout (Layout layout) {
* setExpandVertical(true) has been set.
*/
public void setMinHeight(int height) {
+ checkWidget();
setMinSize(minWidth, height);
}
public void setMinSize(Point size) {
+ checkWidget();
setMinSize(size.x, size.y);
}
public void setMinSize(int width, int height) {
+ checkWidget();
if (width == minWidth && height == minHeight) return;
minWidth = Math.max(0, width);
minHeight = Math.max(0, height);
@@ -363,6 +374,7 @@ public void setMinSize(int width, int height) {
*/
public void setMinWidth(int width) {
+ checkWidget();
setMinSize(width, minHeight);
}