diff options
author | Steve Northover <steve> | 2004-07-13 21:43:37 +0000 |
---|---|---|
committer | Steve Northover <steve> | 2004-07-13 21:43:37 +0000 |
commit | 3067534b6e68696307514fc033b4ad0b365d4b7f (patch) | |
tree | 3bcd370613e6f67458466d55a66eb22053c2eb80 /bundles | |
parent | dd6d5747e86e795abbbf319468356f048b966582 (diff) | |
download | eclipse.platform.swt-3067534b6e68696307514fc033b4ad0b365d4b7f.tar.gz eclipse.platform.swt-3067534b6e68696307514fc033b4ad0b365d4b7f.tar.xz eclipse.platform.swt-3067534b6e68696307514fc033b4ad0b365d4b7f.zip |
*** empty log message ***
Diffstat (limited to 'bundles')
6 files changed, 40 insertions, 30 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FillLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FillLayout.java index c5c6a9bb25..e27fc4cc53 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FillLayout.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FillLayout.java @@ -126,6 +126,13 @@ protected Point computeSize (Composite composite, int wHint, int hHint, boolean return new Point (width, height); } +String getName () { + String string = getClass ().getName (); + int index = string.lastIndexOf ('.'); + if (index == -1) return string; + return string.substring (index + 1, string.length ()); +} + protected void layout (Composite composite, boolean flushCache) { Rectangle rect = composite.getClientArea (); Control [] children = composite.getChildren (); @@ -165,12 +172,7 @@ protected void layout (Composite composite, boolean flushCache) { } } } -String getName () { - String string = getClass ().getName (); - int index = string.lastIndexOf ('.'); - if (index == -1) return string; - return string.substring (index + 1, string.length ()); -} + public String toString () { String string = getName ()+" {"; string += "type="+((type == SWT.VERTICAL) ? "SWT.VERTICAL" : "SWT.HORIZONTAL")+" "; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormData.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormData.java index 44b6418331..900fc1629f 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormData.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormData.java @@ -152,6 +152,13 @@ FormAttachment getLeftAttachment (int spacing) { return cacheLeft; } +String getName () { + String string = getClass ().getName (); + int index = string.lastIndexOf ('.'); + if (index == -1) return string; + return string.substring (index + 1, string.length ()); +} + FormAttachment getRightAttachment (int spacing) { if (cacheRight != null) return cacheRight; if (isVisited) return cacheRight = new FormAttachment (0, cacheWidth); @@ -221,12 +228,7 @@ FormAttachment getTopAttachment (int spacing) { isVisited = false; return cacheTop; } -String getName () { - String string = getClass ().getName (); - int index = string.lastIndexOf ('.'); - if (index == -1) return string; - return string.substring (index + 1, string.length ()); -} + public String toString () { String string = getName()+" {"; if (height != SWT.DEFAULT) string += "height="+height+" "; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormLayout.java index 0113e47888..a89f0fc173 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormLayout.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormLayout.java @@ -206,6 +206,13 @@ Point computeSize (Control control, boolean flushCache) { return control.computeSize (data.width, data.height, flushCache); } +String getName () { + String string = getClass ().getName (); + int index = string.lastIndexOf ('.'); + if (index == -1) return string; + return string.substring (index + 1, string.length ()); +} + /** * Computes the preferred height of the form with * respect to the preferred height of the control. @@ -274,12 +281,7 @@ Point layout (Composite composite, boolean move, int x, int y, int width, int he } return move ? null : new Point (width, height); } -String getName () { - String string = getClass ().getName (); - int index = string.lastIndexOf ('.'); - if (index == -1) return string; - return string.substring (index + 1, string.length ()); -} + public String toString () { String string = getName ()+" {"; if (marginWidth != 0) string += "marginWidth="+marginWidth+" "; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/GridData.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/GridData.java index d433ad68dd..659e56829e 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/GridData.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/GridData.java @@ -381,18 +381,18 @@ public GridData (int width, int height) { this.widthHint = width; this.heightHint = height; } -boolean isItemData() { - return isItemData; -} -boolean isSpacerData() { - return !isItemData; -} String getName () { String string = getClass ().getName (); int index = string.lastIndexOf ('.'); if (index == -1) return string; return string.substring (index + 1, string.length ()); } +boolean isItemData() { + return isItemData; +} +boolean isSpacerData() { + return !isItemData; +} public String toString () { String hAlign = ""; switch (horizontalAlignment) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/RowData.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/RowData.java index ef67012375..f34376061d 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/RowData.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/RowData.java @@ -54,12 +54,14 @@ public RowData (int width, int height) { public RowData (Point point) { this (point.x, point.y); } + String getName () { String string = getClass ().getName (); int index = string.lastIndexOf ('.'); if (index == -1) return string; return string.substring (index + 1, string.length ()); } + public String toString () { String string = getName ()+" {"; if (width != SWT.DEFAULT) string += "width="+width+" "; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/RowLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/RowLayout.java index 6cce05a48e..05b873289f 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/RowLayout.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/RowLayout.java @@ -206,6 +206,13 @@ Point computeSize (Control control, boolean flushCache) { return control.computeSize (wHint, hHint, flushCache); } +String getName () { + String string = getClass ().getName (); + int index = string.lastIndexOf ('.'); + if (index == -1) return string; + return string.substring (index + 1, string.length ()); +} + protected void layout (Composite composite, boolean flushCache) { Rectangle clientArea = composite.getClientArea (); if (type == SWT.HORIZONTAL) { @@ -408,12 +415,7 @@ Point layoutVertical (Composite composite, boolean move, boolean wrap, int heigh } return new Point (x + maxWidth + marginRight + marginWidth, maxY); } -String getName () { - String string = getClass ().getName (); - int index = string.lastIndexOf ('.'); - if (index == -1) return string; - return string.substring (index + 1, string.length ()); -} + public String toString () { String string = getName ()+" {"; string += "type="+((type != SWT.HORIZONTAL) ? "SWT.VERTICAL" : "SWT.HORIZONTAL")+" "; |