Show
Ignore:
Timestamp:
05/04/08 18:12:38 (7 months ago)
Author:
Frank Benoit <benoit@tionex.de>
branch:
default
Message:

reverted the char[] to String and use the an alias.

Files:

Legend:

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

    r155 r212  
    2929import dwt.widgets.Widget; 
    3030import dwt.custom.CTabFolder; 
     31import dwt.dwthelper.utils; 
    3132 
    3233/** 
     
    4950    Control control; // the tab page 
    5051 
    51     char[] toolTipText; 
    52     char[] shortenedText; 
     52    String toolTipText; 
     53    String shortenedText; 
    5354    int shortenedTextWidth; 
    5455 
     
    6970    static final int INTERNAL_SPACING = 4; 
    7071    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" 
     72    static final String ELLIPSIS = "..."; //$NON-NLS-1$ // could use the ellipsis glyph on some platforms "\u2026" 
    7273 
    7374/** 
     
    149150} 
    150151 
    151 char[] shortenText(GC gc, char[] text, int width) { 
     152String shortenText(GC gc, String text, int width) { 
    152153    return useEllipses() 
    153154        ? shortenText(gc, text, width, ELLIPSIS) 
     
    155156} 
    156157 
    157 char[] shortenText(GC gc, char[] text, int width, char[] ellipses) { 
     158String shortenText(GC gc, String text, int width, String ellipses) { 
    158159    if (gc.textExtent(text, FLAGS).x <= width) return text; 
    159160    int ellipseWidth = gc.textExtent(ellipses, FLAGS).x; 
     
    777778 * </ul> 
    778779 */ 
    779 public char[] getToolTipText () { 
     780public String getToolTipText () { 
    780781    checkWidget(); 
    781782    if (toolTipText is null && shortenedText !is null) { 
    782         char[] text = getText(); 
     783        String text = getText(); 
    783784        if (shortenedText!=text) return text; 
    784785    } 
     
    812813    Image image = getImage(); 
    813814    int h = (image is null) ? 0 : image.getBounds().height; 
    814     char[] text = getText(); 
     815    String text = getText(); 
    815816    if (font is null) { 
    816817        h = Math.max(h, gc.textExtent(text, FLAGS).y); 
     
    832833        w += image.getBounds().width; 
    833834    } 
    834     char[] text = null; 
     835    String text = null; 
    835836    if (minimum) { 
    836837        int minChars = parent.minChars; 
     
    997998    } 
    998999} 
    999 public override void setText (char[] string) { 
     1000public override void setText (String string) { 
    10001001    checkWidget(); 
    10011002    if (string is null) DWT.error (DWT.ERROR_NULL_ARGUMENT); 
     
    10201021 * </ul> 
    10211022 */ 
    1022 public void setToolTipText (char[] string) { 
     1023public void setToolTipText (String string) { 
    10231024    checkWidget(); 
    10241025    toolTipText = string;