diff options
author | Silenio Quarti | 2004-05-12 23:02:49 +0000 |
---|---|---|
committer | Silenio Quarti | 2004-05-12 23:02:49 +0000 |
commit | 46b9e8aca510c713819a382b1ec9ae669849f1b1 (patch) | |
tree | 6d2788b4505a259b623dbd724adc075f6b5a2fde | |
parent | 1d36ca737d100c3a0adc616fa1684e986140823a (diff) | |
download | eclipse.platform.swt-46b9e8aca510c713819a382b1ec9ae669849f1b1.tar.gz eclipse.platform.swt-46b9e8aca510c713819a382b1ec9ae669849f1b1.tar.xz eclipse.platform.swt-46b9e8aca510c713819a382b1ec9ae669849f1b1.zip |
61728
6 files changed, 39 insertions, 13 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/TextLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/TextLayout.java index 6e20208303..c2e3994985 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/TextLayout.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/TextLayout.java @@ -1208,8 +1208,11 @@ public void setStyle (TextStyle style, int start, int end) { if (0 <= high && high < styles.length) { StyleItem item = styles[high]; if (item.start == start && styles[high + 1].start - 1 == end) { - if (style == item.style) return; - if (style != null && style.equals(item.style)) return; + if (style == null) { + if (item.style == null) return; + } else { + if (style.equals(item.style)) return; + } } } freeRuns(); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/TextStyle.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/TextStyle.java index 388ca01cd9..066a0459d5 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/TextStyle.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/TextStyle.java @@ -20,9 +20,20 @@ import org.eclipse.swt.*; */ public class TextStyle { - Font font; - Color foreground; - Color background; + /** + * the font of the style + */ + public Font font; + + /** + * the foreground of the style + */ + public Color foreground; + + /** + * the background of the style + */ + public Color background; /** * Create a new text style with the specified font, foreground diff --git a/bundles/org.eclipse.swt/Eclipse SWT/emulated/textlayout/org/eclipse/swt/graphics/TextLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/emulated/textlayout/org/eclipse/swt/graphics/TextLayout.java index 6cd3808a0d..ba7dbef09f 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/emulated/textlayout/org/eclipse/swt/graphics/TextLayout.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/emulated/textlayout/org/eclipse/swt/graphics/TextLayout.java @@ -1355,8 +1355,11 @@ public void setStyle (TextStyle style, int start, int end) { if (0 <= high && high < styles.length) { StyleItem item = styles[high]; if (item.start == start && styles[high + 1].start - 1 == end) { - if (style == item.style) return; - if (style != null && style.equals(item.style)) return; + if (style == null) { + if (item.style == null) return; + } else { + if (style.equals(item.style)) return; + } } } freeRuns(); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java index b049c093b7..4c685d30b4 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java @@ -1168,8 +1168,11 @@ public void setStyle (TextStyle style, int start, int end) { if (0 <= high && high < styles.length) { StyleItem item = styles[high]; if (item.start == start && styles[high + 1].start - 1 == end) { - if (style == item.style) return; - if (style != null && style.equals(item.style)) return; + if (style == null) { + if (item.style == null) return; + } else { + if (style.equals(item.style)) return; + } } } freeRuns(); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/TextLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/TextLayout.java index bffc19c9c1..9f4d9167b8 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/TextLayout.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/TextLayout.java @@ -1398,8 +1398,11 @@ public void setStyle (TextStyle style, int start, int end) { if (0 <= high && high < styles.length) { StyleItem item = styles[high]; if (item.start == start && styles[high + 1].start - 1 == end) { - if (style == item.style) return; - if (style != null && style.equals(item.style)) return; + if (style == null) { + if (item.style == null) return; + } else { + if (style.equals(item.style)) return; + } } } freeRuns(); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java index e5b6e7a3b5..7be6a26867 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java @@ -1802,8 +1802,11 @@ public void setStyle (TextStyle style, int start, int end) { if (0 <= high && high < styles.length) { StyleItem item = styles[high]; if (item.start == start && styles[high + 1].start - 1 == end) { - if (style == item.style) return; - if (style != null && style.equals(item.style)) return; + if (style == null) { + if (item.style == null) return; + } else { + if (style.equals(item.style)) return; + } } } freeRuns(); |