Changeset 48:9a64a7781bab

Show
Ignore:
Timestamp:
02/02/08 19:14:54 (10 months ago)
Author:
Frank Benoit <benoit@tionex.de>
branch:
default
Message:

Added override and alias, first chunk. Thanks torhu for doing this patch.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • dwt/DWTError.d

    r4 r48  
    1 /******************************************************************************* 
     1/******************************************************************************* 
    22 * Copyright (c) 2000, 2005 IBM Corporation and others. 
    33 * All rights reserved. This program and the accompanying materials 
     
    4545 
    4646public class DWTError : PlatformException { 
     47 
    4748    /** 
    4849     * The DWT error code, one of DWT.ERROR_*. 
  • dwt/DWTException.d

    r4 r48  
    1 /******************************************************************************* 
     1/******************************************************************************* 
    22 * Copyright (c) 2000, 2005 IBM Corporation and others. 
    33 * All rights reserved. This program and the accompanying materials 
     
    3636 
    3737public class DWTException : TracedException { 
     38 
    3839    /** 
    3940     * The DWT error code, one of DWT.ERROR_*. 
  • dwt/accessibility/AccessibleEvent.d

    r34 r48  
    6565 * @return a string representation of the event 
    6666 */ 
    67 public char[] toString () { 
     67override public char[] toString () { 
    6868    return Format( "AccessibleEvent {childID={} result={}}", childID, result ); 
    6969} 
  • dwt/accessibility/AccessibleTextEvent.d

    r34 r48  
    5454 * @return a string representation of the event 
    5555 */ 
    56 public char[] toString () { 
     56override public char[] toString () { 
    5757    return Format( "AccessibleTextEvent {{childID={} offset={} length={}}", 
    5858        childID, 
  • dwt/events/KeyEvent.d

    r0 r48  
    9999 * @return a string representation of the event 
    100100 */ 
    101 public char[] toString() { 
     101override public char[] toString() { 
    102102    return Format( "{} character={} keyCode={} stateMask={} doit={}}", 
    103103        super.toString[ 0 .. $-2 ], 
  • dwt/events/MenuDetectEvent.d

    r0 r48  
    6868 * @return a string representation of the event 
    6969 */ 
    70 public char[] toString() { 
     70override public char[] toString() { 
    7171    return Format( "{} x={} y={} doit={}}", super.toString[ 0 .. $-2 ], x, y, doit ); 
    7272} 
  • dwt/events/PaintEvent.d

    r0 r48  
    9393 * @return a string representation of the event 
    9494 */ 
    95 public char[] toString() { 
     95override public char[] toString() { 
    9696    return Format( "{} gc={} x={} y={} width={} height={} count={}}", 
    9797        super.toString[ 0 .. $-2 ], 
  • dwt/events/SelectionEvent.d

    r0 r48  
    129129 * @return a string representation of the event 
    130130 */ 
    131 public char[] toString() { 
     131override public char[] toString() { 
    132132    return Format( "{} item={} detail={} x={} y={} width={} height={} stateMask={} text={} doit={}}", 
    133133        super.toString[ 0 .. $-2 ], 
  • dwt/events/TraverseEvent.d

    r0 r48  
    132132 * @return a string representation of the event 
    133133 */ 
    134 public char[] toString() { 
     134override public char[] toString() { 
    135135    return Format( "{} detail={}}", super.toString[ 0 .. $-2 ], detail ); 
    136136} 
  • dwt/events/TypedEvent.d

    r0 r48  
    9999 * @return a string representation of the event 
    100100 */ 
    101 public char[] toString() { 
     101override public char[] toString() { 
    102102    return Format( "{}{{{} time={} data={}}", widget.toString(), time, data.toString() ); 
    103103} 
  • dwt/events/VerifyEvent.d

    r0 r48  
    6161 * @return a string representation of the event 
    6262 */ 
    63 public char[] toString() { 
     63override public char[] toString() { 
    6464    return Format( "{} start={} end={} text={}}", super.toString[ 0 .. $-2 ], start, end, text ); 
    6565} 
  • dwt/graphics/Color.d

    r23 r48  
    125125 * they allocate. 
    126126 */ 
    127 public void dispose() { 
     127override public void dispose() { 
    128128    if (handle is -1) return; 
    129129    if (device.isDisposed()) return; 
     
    309309 * @return <code>true</code> when the color is disposed and <code>false</code> otherwise 
    310310 */ 
    311 public bool isDisposed() { 
     311override public bool isDisposed() { 
    312312    return handle is -1; 
    313313} 
     
    319319 * @return a string representation of the receiver 
    320320 */ 
    321 public char[] toString () { 
     321override public char[] toString () { 
    322322    if (isDisposed()) return "Color {*DISPOSED*}"; //$NON-NLS-1$ 
    323323    return Format( "Color {{{}, {}, {}}", getRed(), getGreen(), getBlue()); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ 
  • dwt/graphics/Cursor.d

    r28 r48  
    369369 * they allocate. 
    370370 */ 
    371 public void dispose () { 
     371override public void dispose () { 
    372372    if (handle is null) return; 
    373373    if (device.isDisposed()) return; 
     
    445445 * @return <code>true</code> when the cursor is disposed and <code>false</code> otherwise 
    446446 */ 
    447 public bool isDisposed() { 
     447override public bool isDisposed() { 
    448448    return handle is null; 
    449449} 
     
    455455 * @return a string representation of the receiver 
    456456 */ 
    457 public char[] toString () { 
     457override public char[] toString () { 
    458458    if (isDisposed()) return "Cursor {*DISPOSED*}"; 
    459459    return Format( "Cursor {{{}}", handle ); 
  • dwt/graphics/Font.d

    r23 r48  
    163163 * they allocate. 
    164164 */ 
    165 public void dispose() { 
     165override public void dispose() { 
    166166    if (handle is null) return; 
    167167    if (device.isDisposed()) return; 
     
    219219 * @see #equals 
    220220 */ 
    221 public hash_t toHash () { 
     221override public hash_t toHash () { 
    222222    return cast(hash_t)handle; 
    223223} 
     
    244244 * @return <code>true</code> when the font is disposed and <code>false</code> otherwise 
    245245 */ 
    246 public bool isDisposed() { 
     246override public bool isDisposed() { 
    247247    return handle is null; 
    248248} 
     
    254254 * @return a string representation of the receiver 
    255255 */ 
    256 public char[] toString () { 
     256override public char[] toString () { 
    257257    if (isDisposed()) return "Font {*DISPOSED*}"; 
    258258    return Format( "Font {{{}}", handle ); 
  • dwt/graphics/FontData.d

    r23 r48  
    295295 * @see #hashCode 
    296296 */ 
    297 public int opEquals (Object object) { 
     297override public int opEquals (Object object) { 
    298298    if (object is this) return true; 
    299299    if( auto fd = cast(FontData)object ){ 
     
    453453 * @see #equals 
    454454 */ 
    455 public hash_t toHash () { 
     455override public hash_t toHash () { 
    456456    char[] name = getName(); 
    457457    return data.lfCharSet ^ getHeight() ^ data.lfWidth ^ data.lfEscapement ^ 
     
    598598 * @see FontData 
    599599 */ 
    600 public char[] toString() { 
     600override public char[] toString() { 
    601601    StringBuffer buffer = new StringBuffer(); 
    602602    buffer.append("1|"); //$NON-NLS-1$ 
  • dwt/graphics/FontMetrics.d

    r23 r48  
    5757 * @see #hashCode 
    5858 */ 
    59 public int opEquals (Object object) { 
     59override public int opEquals (Object object) { 
    6060    if (object is this) return true; 
    6161    if( auto metricObj = cast(FontMetrics)object ){ 
     
    155155 * @see #equals 
    156156 */ 
    157 public hash_t toHash() { 
     157override public hash_t toHash() { 
    158158    return handle.tmHeight ^ handle.tmAscent ^ handle.tmDescent ^ 
    159159        handle.tmInternalLeading ^ handle.tmExternalLeading ^ 
  • dwt/graphics/GC.d

    r25 r48  
    632632 * </ul> 
    633633 */ 
    634 public void dispose() { 
     634override public void dispose() { 
    635635    if (handle is null) return; 
    636636    if (data.device.isDisposed()) return; 
     
    37673767 * @return <code>true</code> when the GC is disposed and <code>false</code> otherwise 
    37683768 */ 
    3769 public bool isDisposed() { 
     3769override public bool isDisposed() { 
    37703770    return handle is null; 
    37713771} 
     
    48184818 * @return a string representation of the receiver 
    48194819 */ 
    4820 public char[] toString () { 
     4820override public char[] toString () { 
    48214821    if (isDisposed()) return "GC {*DISPOSED*}"; 
    48224822    return Format( "GC {{{}}", handle ); 
  • dwt/graphics/Image.d

    r23 r48  
    10331033 * they allocate. 
    10341034 */ 
    1035 public void dispose () { 
     1035override public void dispose () { 
    10361036    if (handle is null) return; 
    10371037    if (device.isDisposed()) return; 
     
    10591059 * @see #hashCode 
    10601060 */ 
    1061 public int opEquals (Object object) { 
     1061override public int opEquals (Object object) { 
    10621062    if (object is this) return true; 
    10631063    if (!(cast(Image)object)) return false; 
     
    15561556 * @see #equals 
    15571557 */ 
    1558 public hash_t toHash () { 
     1558override public hash_t toHash () { 
    15591559    return cast(hash_t)handle; 
    15601560} 
     
    20262026 * @return <code>true</code> when the image is disposed and <code>false</code> otherwise 
    20272027 */ 
    2028 public bool isDisposed() { 
     2028override public bool isDisposed() { 
    20292029    return handle is null; 
    20302030} 
     
    21042104 * @return a string representation of the receiver 
    21052105 */ 
    2106 public char[] toString () { 
     2106override public char[] toString () { 
    21072107    if (isDisposed()) return "Image {*DISPOSED*}"; 
    21082108    return Format( "Image {{{}}", handle ); 
  • dwt/graphics/ImageLoaderEvent.d

    r22 r48  
    8686 * @return a string representation of the event 
    8787 */ 
    88 public char[] toString () { 
     88override public char[] toString () { 
    8989    return Format( "ImageLoaderEvent {source={} imageData={} incrementCount={} endOfImage={}}", source, imageData, incrementCount, endOfImage); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ 
    9090} 
  • dwt/graphics/Path.d

    r26 r48  
    326326 * they allocate. 
    327327 */ 
    328 public void dispose() { 
     328override public void dispose() { 
    329329    if (handle is null) return; 
    330330    if (device.isDisposed()) return; 
     
    468468 * @return <code>true</code> when the Path is disposed, and <code>false</code> otherwise 
    469469 */ 
    470 public bool isDisposed() { 
     470override public bool isDisposed() { 
    471471    return handle is null; 
    472472} 
     
    519519 * @return a string representation of the receiver 
    520520 */ 
    521 public char[] toString() { 
     521override public char[] toString() { 
    522522    if (isDisposed()) return "Path {*DISPOSED*}"; 
    523523    return Format( "Path {{{}}", handle ); 
  • dwt/graphics/Pattern.d

    r27 r48  
    229229 * they allocate. 
    230230 */ 
    231 public void dispose() { 
     231override public void dispose() { 
    232232    if (handle is null) return; 
    233233    if (device.isDisposed()) return; 
     
    262262 * @return <code>true</code> when the Pattern is disposed, and <code>false</code> otherwise 
    263263 */ 
    264 public bool isDisposed() { 
     264override public bool isDisposed() { 
    265265    return handle is null; 
    266266} 
     
    272272 * @return a string representation of the receiver 
    273273 */ 
    274 public char[] toString() { 
     274override public char[] toString() { 
    275275    if (isDisposed()) return "Pattern {*DISPOSED*}"; 
    276276    return Format( "Pattern {{{}}", handle ); 
  • dwt/graphics/Point.d

    r4 r48  
    9595 * @see #equals(Object) 
    9696 */ 
    97 public hash_t toHash () { 
     97override public hash_t toHash () { 
    9898    return x ^ y; 
    9999} 
     
    105105 * @return a string representation of the point 
    106106 */ 
    107 public char[] toString () { 
     107override public char[] toString () { 
    108108    return Format( "Point {}, {}}", x, y );; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ 
    109109} 
  • dwt/graphics/RGB.d

    r16 r48  
    214214 * @see #equals(Object) 
    215215 */ 
    216 public hash_t toHash() { 
     216override public hash_t toHash() { 
    217217    return (blue << 16) | (green << 8) | red; 
    218218} 
  • dwt/graphics/Region.d

    r23 r48  
    238238 * they allocate. 
    239239 */ 
    240 public void dispose () { 
     240override public void dispose () { 
    241241    if (handle is null) return; 
    242242    if (device.isDisposed()) return; 
     
    257257 * @see #hashCode 
    258258 */ 
    259 public int opEquals (Object object) { 
     259override public int opEquals (Object object) { 
    260260    if (this is object) return true; 
    261261    if (!(cast(Region)object)) return false; 
     
    294294 * @see #equals 
    295295 */ 
    296 public hash_t toHash () { 
     296override public hash_t toHash () { 
    297297    return cast(hash_t)handle; 
    298298} 
     
    427427 * @return <code>true</code> when the region is disposed, and <code>false</code> otherwise 
    428428 */ 
    429 public bool isDisposed() { 
     429override public bool isDisposed() { 
    430430    return handle is null; 
    431431} 
     
    591591 * @return a string representation of the receiver 
    592592 */ 
    593 public char[] toString () { 
     593override public char[] toString () { 
    594594    if (isDisposed()) return "Region {*DISPOSED*}"; 
    595595    return Format( "Region {{{}}", handle ); 
  • dwt/graphics/TextLayout.d

    r31 r48  
    161161        lineBreak = softBreak = false; 
    162162    } 
    163     public char[] toString () { 
     163    override public char[] toString () { 
    164164        return Format( "StyleItem {{{}, {}}", start, style ); 
    165165    } 
     
    464464 * the text layout. Applications must dispose of all allocated text layouts. 
    465465 */ 
    466 public void dispose () { 
     466override public void dispose () { 
    467467    if (device is null) return; 
    468468    freeRuns(); 
     
    18711871 * @return <code>true</code> when the text layout is disposed and <code>false</code> otherwise 
    18721872 */ 
    1873 public bool isDisposed () { 
     1873override public bool isDisposed () { 
    18741874    return device is null; 
    18751875} 
     
    24972497 * @return a string representation of the receiver 
    24982498 */ 
    2499 public char[] toString () { 
     2499override public char[] toString () { 
    25002500    if (isDisposed()) return "TextLayout {*DISPOSED*}"; 
    25012501    return "TextLayout {}"; 
  • dwt/graphics/TextStyle.d

    r21 r48  
    161161 * @return a string representation of the <code>TextStyle</code> 
    162162 */ 
    163 public char[] toString () { 
     163override public char[] toString () { 
    164164    char[] buffer = "TextStyle {"; 
    165165    int startLength = buffer.length; 
  • dwt/graphics/Transform.d

    r23 r48  
    157157 * they allocate. 
    158158 */ 
    159 public void dispose() { 
     159override public void dispose() { 
    160160    if (handle is null) return; 
    161161    if (device.isDisposed()) return; 
     
    211211 * @return <code>true</code> when the Transform is disposed, and <code>false</code> otherwise 
    212212 */ 
    213 public bool isDisposed() { 
     213override public bool isDisposed() { 
    214214    return handle is null; 
    215215} 
     
    344344 * @return a string representation of the receiver 
    345345 */ 
    346 public char[] toString() { 
     346override public char[] toString() { 
    347347    if (isDisposed()) return "Transform {*DISPOSED*}"; 
    348348    float[6] elements; 
  • dwt/internal/image/GIFFileFormat.d

    r31 r48  
    5757    } 
    5858 
    59     bool isFileFormat(LEDataInputStream stream) { 
     59    override bool isFileFormat(LEDataInputStream stream) { 
    6060        try { 
    6161            byte[3] signature; 
     
    7272     * Return an array of ImageData representing the image(s). 
    7373     */ 
    74     ImageData[] loadFromByteStream() { 
     74    override ImageData[] loadFromByteStream() { 
    7575        byte[3] signatureBytes; 
    7676        byte[3] versionBytes; 
     
    439439    } 
    440440 
    441     void unloadIntoByteStream(ImageLoader loader) { 
     441    override void unloadIntoByteStream(ImageLoader loader) { 
    442442 
    443443        /* Step 1: Acquire GIF parameters. */ 
  • dwt/internal/image/JPEGAppn.d

    r2 r48  
    2727    } 
    2828 
    29     public bool verify() { 
     29    override public bool verify() { 
    3030        int marker = getSegmentMarker(); 
    3131        return marker >= JPEGFileFormat.APP0 && marker <= JPEGFileFormat.APP15; 
  • dwt/internal/image/JPEGArithmeticConditioningTable.d

    r2 r48  
    2323    } 
    2424 
    25     public int signature() { 
     25    override public int signature() { 
    2626        return JPEGFileFormat.DAC; 
    2727    } 
  • dwt/internal/image/JPEGComment.d

    r2 r48  
    2727    } 
    2828 
    29     public int signature() { 
     29    override public int signature() { 
    3030        return JPEGFileFormat.COM; 
    3131    } 
  • dwt/internal/image/JPEGDecoder.d

    r31 r48  
    410410        } 
    411411 
    412         void start_pass (jpeg_decompress_struct cinfo) { 
     412        override void start_pass (jpeg_decompress_struct cinfo) { 
    413413            start_pass_huff_decoder(cinfo); 
    414414        } 
    415415 
    416         bool decode_mcu (jpeg_decompress_struct cinfo, short[][] MCU_data) { 
     416        override bool decode_mcu (jpeg_decompress_struct cinfo, short[][] MCU_data) { 
    417417            huff_entropy_decoder entropy = this; 
    418418            int blkn; 
     
    787787        } 
    788788 
    789         void start_pass (jpeg_decompress_struct cinfo) { 
     789        override void start_pass (jpeg_decompress_struct cinfo) { 
    790790            start_pass_phuff_decoder(cinfo); 
    791791        } 
    792792 
    793         bool decode_mcu (jpeg_decompress_struct cinfo, short[][] MCU_data) { 
     793        override bool decode_mcu (jpeg_decompress_struct cinfo, short[][] MCU_data) { 
    794794            bool is_DC_band = (cinfo.Ss is 0); 
    795795            if (cinfo.Ah is 0) { 
  • dwt/internal/image/JPEGEndOfImage.d

    r2 r48  
    2727    } 
    2828 
    29     public int signature() { 
     29    override public int signature() { 
    3030        return JPEGFileFormat.EOI; 
    3131    } 
    3232 
    33     public int fixedSize() { 
     33    override public int fixedSize() { 
    3434        return 2; 
    3535    } 
  • dwt/internal/image/JPEGFileFormat.d

    r31 r48  
    13711371    } 
    13721372} 
    1373 bool isFileFormat(LEDataInputStream stream) { 
     1373override bool isFileFormat(LEDataInputStream stream) { 
    13741374    try { 
    13751375        JPEGStartOfImage soi = new JPEGStartOfImage(stream); 
     
    13921392            && dataUnit[rIndex + 7] is 0; 
    13931393} 
    1394 ImageData[] loadFromByteStream() { 
     1394override ImageData[] loadFromByteStream() { 
    13951395    //TEMPORARY CODE 
    13961396    //PORTING_FIXME 
     
    17731773    } 
    17741774} 
    1775 void unloadIntoByteStream(ImageLoader loader) { 
     1775override void unloadIntoByteStream(ImageLoader loader) { 
    17761776    ImageData image = loader.data[0]; 
    17771777    if (!(new JPEGStartOfImage()).writeToStream(outputStream)) { 
  • dwt/internal/image/JPEGFixedSizeSegment.d

    r2 r48  
    4343    abstract public int fixedSize(); 
    4444 
    45     public int getSegmentLength() { 
     45    override public int getSegmentLength() { 
    4646        return fixedSize() - 2; 
    4747    } 
    4848 
    49     public void setSegmentLength(int length) { 
     49    override public void setSegmentLength(int length) { 
    5050    } 
    5151} 
  • dwt/internal/image/JPEGFrameHeader.d

    r31 r48  
    199199     *  SOF_15 - Differential lossless, arithmetic coding 
    200200     */ 
    201     public bool verify() { 
     201    override public bool verify() { 
    202202        int marker = getSegmentMarker(); 
    203203        return (marker >= JPEGFileFormat.SOF0 && marker <= JPEGFileFormat.SOF3) || 
  • dwt/internal/image/JPEGHuffmanTable.d

    r2 r48  
    265265} 
    266266 
    267 public int signature() { 
     267override public int signature() { 
    268268    return JPEGFileFormat.DHT; 
    269269} 
  • dwt/internal/image/JPEGQuantizationTable.d

    r2 r48  
    167167} 
    168168 
    169 public int signature() { 
     169override public int signature() { 
    170170    return JPEGFileFormat.DQT; 
    171171} 
  • dwt/internal/image/JPEGRestartInterval.d

    r2 r48  
    2323    } 
    2424 
    25     public int signature() { 
     25    override public int signature() { 
    2626        return JPEGFileFormat.DRI; 
    2727    } 
     
    3131    } 
    3232 
    33     public int fixedSize() { 
     33    override public int fixedSize() { 
    3434        return 6; 
    3535    } 
  • dwt/internal/image/JPEGScanHeader.d

    r31 r48  
    9696} 
    9797 
    98 public int signature() { 
     98override public int signature() { 
    9999    return JPEGFileFormat.SOS; 
    100100} 
  • dwt/internal/image/JPEGStartOfImage.d

    r2 r48  
    3131    } 
    3232 
    33     public int signature() { 
     33    override public int signature() { 
    3434        return JPEGFileFormat.SOI; 
    3535    } 
    3636 
    37     public int fixedSize() { 
     37    override public int fixedSize() { 
    3838        return 2; 
    3939    } 
  • dwt/internal/image/LEDataInputStream.d

    r2 r48  
    5252    } 
    5353 
    54     public void close() { 
     54    override public void close() { 
    5555        buf = null; 
    5656        if (host !is null) { 
     
    7070     * Answers how many bytes are available for reading without blocking 
    7171     */ 
    72     public int available() { 
     72    override public int available() { 
    7373        if (buf is null) throw new IOException("buf is null"); 
    7474        return (buf.length - pos) + host.available(); 
     
    7878     * Answer the next byte of the input stream. 
    7979     */ 
    80     public int read() { 
     80    override public int read() { 
    8181        if (buf is null) throw new IOException("buf is null"); 
    8282        if (pos < buf.length) { 
     
    9393     * of bytes when you can actually read them all. 
    9494     */ 
    95     public int read(byte b[], int off, int len) { 
     95    override public int read(byte b[], int off, int len) { 
    9696        int read = 0, count; 
    9797        while (read !is len && (count = readData(b, off, len - read)) !is -1) { 
  • dwt/internal/image/LEDataOutputStream.d

    r2