Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Williams2018-04-05 19:10:04 +0000
committerEric Williams2018-04-05 19:28:22 +0000
commit8b99169ce7d7036d0fc19c98ac7a6b4a35872877 (patch)
treeeb625b02a306193448e5f594c2aa3f8387999813 /bundles/org.eclipse.swt/Eclipse SWT PI/gtk
parentb33183ce0dec18efde020735ad580baed707c824 (diff)
downloadeclipse.platform.swt-8b99169ce7d7036d0fc19c98ac7a6b4a35872877.tar.gz
eclipse.platform.swt-8b99169ce7d7036d0fc19c98ac7a6b4a35872877.tar.xz
eclipse.platform.swt-8b99169ce7d7036d0fc19c98ac7a6b4a35872877.zip
Bug 533273: [GTK] Add convenience toString methods for size structs
Add toString() methods to make debugging easier. Change-Id: I17716aee5ad1d8e3d681ae415b84887790102bf9 Signed-off-by: Eric Williams <ericwill@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI/gtk')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkRectangle.java11
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkAllocation.java11
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkRequisition.java11
3 files changed, 33 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkRectangle.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkRectangle.java
index 4cd214e204..4e547d07e8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkRectangle.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkRectangle.java
@@ -25,4 +25,15 @@ public class GdkRectangle {
/** @field cast=(gint) */
public int height;
public static final int sizeof = GDK.GdkRectangle_sizeof();
+
+ /**
+ * Returns a string containing a concise, human-readable
+ * description of the receiver.
+ *
+ * @return a string representation of the <code>GdkRectangle</code>
+ */
+ @Override
+ public String toString() {
+ return "GdkRectangle {" + x + ", " + y + ", " + width + ", " + height + "}"; //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ }
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkAllocation.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkAllocation.java
index b7791d8e0f..a63728e40e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkAllocation.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkAllocation.java
@@ -21,4 +21,15 @@ public class GtkAllocation {
public int width;
public int height;
public static final int sizeof = GTK.GtkAllocation_sizeof();
+
+ /**
+ * Returns a string containing a concise, human-readable
+ * description of the receiver.
+ *
+ * @return a string representation of the <code>GtkAllocation</code>
+ */
+ @Override
+ public String toString() {
+ return "GtkAllocation {" + x + ", " + y + ", " + width + ", " + height + "}"; //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ }
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkRequisition.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkRequisition.java
index c830166a0d..c5eaaa9f24 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkRequisition.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkRequisition.java
@@ -19,4 +19,15 @@ public class GtkRequisition {
public int width;
public int height;
public static final int sizeof = GTK.GtkRequisition_sizeof();
+
+ /**
+ * Returns a string containing a concise, human-readable
+ * description of the receiver.
+ *
+ * @return a string representation of the <code>GtkRequisition</code>
+ */
+ @Override
+ public String toString() {
+ return "GtkRequisition {" + width + ", " + height + "}"; //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+ }
}

Back to the top