Subversion Repository Public Repository

litesoft

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package com.temp.client.foundation.widget;

import com.google.gwt.dom.client.*;
import com.google.gwt.user.client.ui.*;
import com.temp.shared.utils.*;

/**
 * Convenience Class to allow for Image resizing and styling in-line
 *
 * @author georgs
 */
public class OurSizedImage extends Image {

    public OurSizedImage() {
    }

    public OurSizedImage( String url ) {
        super( url );
    }

    public OurSizedImage style( String className ) {
        if ( null != (className = StringUtils.noEmpty( className )) ) {
            addStyleName( className );
        }
        return this;
    }

    public OurSizedImage size( int width, int height ) {
        width( width );
        height( height );
        return this;
    }

    public OurSizedImage width( int size ) {
        getImageElement().setWidth( size );
        return this;
    }

    public OurSizedImage height( int size ) {
        getImageElement().setHeight( size );
        return this;
    }

    protected ImageElement getImageElement() {
        return getElement().cast();
    }
}

Commits for litesoft/trunk/GWT_Sandbox/FormEngine/src/com/temp/client/foundation/widget/OurSizedImage.java

Diff revisions: vs.
Revision Author Commited Message
948 Diff Diff GeorgeS picture GeorgeS Sat 07 Jun, 2014 23:42:39 +0000

Jusefuls Formatter Updated to New Code Format

626 GeorgeS picture GeorgeS Wed 11 Apr, 2012 19:39:41 +0000