Show
Ignore:
Timestamp:
05/04/08 18:42:55 (4 years ago)
Author:
Frank Benoit <benoit@tionex.de>
branch:
default
Message:

reverted char[] to String

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • dwt/custom/CTabItem.d

    r150 r238  
    1212 *******************************************************************************/ 
    1313module dwt.custom.CTabItem; 
     14 
     15import dwt.dwthelper.utils; 
    1416 
    1517 
     
    4951    Control control; // the tab page 
    5052 
    51     char[] toolTipText; 
    52     char[] shortenedText; 
     53    String toolTipText; 
     54    String shortenedText; 
    5355    int shortenedTextWidth; 
    5456 
     
    6971    static final int INTERNAL_SPACING = 4; 
    7072    static final int FLAGS = DWT.DRAW_TRANSPARENT | DWT.DRAW_MNEMONIC; 
    71     static final char[] ELLIPSIS = "..."; //$NON-NLS-1$ // could use the ellipsis glyph on some platforms "\u2026" 
     73    static final String ELLIPSIS = "..."; //$NON-NLS-1$ // could use the ellipsis glyph on some platforms "\u2026" 
    7274 
    7375/** 
     
    149151} 
    150152 
    151 char[] shortenText(GC gc, char[] text, int width) { 
     153String shortenText(GC gc, String text, int width) { 
    152154    return useEllipses() 
    153155        ? shortenText(gc, text, width, ELLIPSIS) 
     
    155157} 
    156158 
    157 char[] shortenText(GC gc, char[] text, int width, char[] ellipses) { 
     159String shortenText(GC gc, String text, int width, String ellipses) { 
    158160    if (gc.textExtent(text, FLAGS).x <= width) return text; 
    159161    int ellipseWidth = gc.textExtent(ellipses, FLAGS).x; 
     
    777779 * </ul> 
    778780 */ 
    779 public char[] getToolTipText () { 
     781public String getToolTipText () { 
    780782    checkWidget(); 
    781783    if (toolTipText is null && shortenedText !is null) { 
    782         char[] text = getText(); 
     784        String text = getText(); 
    783785        if (shortenedText!=text) return text; 
    784786    } 
     
    812814    Image image = getImage(); 
    813815    int h = (image is null) ? 0 : image.getBounds().height; 
    814     char[] text = getText(); 
     816    String text = getText(); 
    815817    if (font is null) { 
    816818        h = Math.max(h, gc.textExtent(text, FLAGS).y); 
     
    832834        w += image.getBounds().width; 
    833835    } 
    834     char[] text = null; 
     836    String text = null; 
    835837    if (minimum) { 
    836838        int minChars = parent.minChars; 
     
    997999    } 
    9981000} 
    999 public override void setText (char[] string) { 
     1001public override void setText (String string) { 
    10001002    checkWidget(); 
    10011003    if (string is null) DWT.error (DWT.ERROR_NULL_ARGUMENT); 
     
    10201022 * </ul> 
    10211023 */ 
    1022 public void setToolTipText (char[] string) { 
     1024public void setToolTipText (String string) { 
    10231025    checkWidget(); 
    10241026    toolTipText = string;