aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSravan Kumar Lakkimsetti2014-06-13 06:43:25 (EDT)
committerArun Thondapu2014-07-08 07:36:47 (EDT)
commit9035a423ca17a2ed25298746e946d5a273d94420 (patch)
tree2d90a8b398994b3d0fc9ac1a4be3c93a07cffe44
parentc23958637ac3a365c3c7bff34c5c34404e5c1ddb (diff)
downloadeclipse.platform.swt-9035a423ca17a2ed25298746e946d5a273d94420.zip
eclipse.platform.swt-9035a423ca17a2ed25298746e946d5a273d94420.tar.gz
eclipse.platform.swt-9035a423ca17a2ed25298746e946d5a273d94420.tar.bz2
Bug 233521 - BIDI: getClientWidth needs implementationrefs/changes/62/28462/5
Change-Id: I8a2f5812f70af84dcab281f18710868b481f2f7e Signed-off-by: Sravan Kumar Lakkimsetti <sravankumarl@in.ibm.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java7
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java8
3 files changed, 5 insertions, 18 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java
index 30082ef..ecd23fe 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java
@@ -641,14 +641,6 @@ public Rectangle getClientArea () {
return super.getClientArea();
}
-@Override
-int getClientWidth() {
- if ((state & ZERO_WIDTH) != 0) return 0;
- GtkAllocation allocation = new GtkAllocation();
- gtk_widget_get_allocation(clientHandle (), allocation);
- return allocation.width;
-}
-
/**
* Returns layout which is associated with the receiver, or
* null if one has not been set.
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
index 3b92e1b..d0028aa 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2014 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -2584,7 +2584,10 @@ public int getBorderWidth () {
}
int getClientWidth () {
- return 0;
+ if (handle == 0 || (state & ZERO_WIDTH) != 0) return 0;
+ GtkAllocation allocation = new GtkAllocation();
+ gtk_widget_get_allocation (handle, allocation);
+ return allocation.width;
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java
index 919d899..c6782f9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java
@@ -296,14 +296,6 @@ Rectangle [] getRectangles (int linkIndex) {
return rects;
}
-@Override
-int getClientWidth () {
- if ((state & ZERO_WIDTH) != 0) return 0;
- GtkAllocation allocation = new GtkAllocation();
- gtk_widget_get_allocation (handle, allocation);
- return allocation.width;
-}
-
/**
* Returns the receiver's text, which will be an empty
* string if it has never been set.