aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSravan Kumar Lakkimsetti2014-06-13 06:43:25 (EDT)
committerSravan Kumar Lakkimsetti2014-08-05 08:36:26 (EDT)
commit7430285b3a6fae4ee743c775c7760d6dfdd786e8 (patch)
tree9f8aef0eee16d3bac163adfaa9f0842ab87122e0
parent84a9a3b35a0e9b4e9ce61aee6a741dd52f28de01 (diff)
downloadeclipse.platform.swt-7430285b3a6fae4ee743c775c7760d6dfdd786e8.zip
eclipse.platform.swt-7430285b3a6fae4ee743c775c7760d6dfdd786e8.tar.gz
eclipse.platform.swt-7430285b3a6fae4ee743c775c7760d6dfdd786e8.tar.bz2
Bug 233521 - BIDI: getClientWidth needs implementationrefs/changes/32/31032/2
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.java10
-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.java10
3 files changed, 7 insertions, 20 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..8e67570 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
@@ -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
@@ -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 7c40b72..045c011 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..966474d 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 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
@@ -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.