Created
August 4, 2011 07:14
-
-
Save igstan/1124648 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DynamicImageResource implements ImageResource { | |
private final String url; | |
private final int width; | |
private final int height; | |
private DynamicImageResource(String url, int width, int height) { | |
this.url = UriUtils.sanitizeUri(url); | |
this.width = width; | |
this.height = height; | |
} | |
@Override | |
public String getName() { | |
return null; | |
} | |
@Override | |
public boolean isAnimated() { | |
return false; | |
} | |
@Override | |
public int getWidth() { | |
return width; | |
} | |
@Override | |
public String getURL() { | |
return url; | |
} | |
@Override | |
public int getTop() { | |
return 0; | |
} | |
@Override | |
public int getLeft() { | |
return 0; | |
} | |
@Override | |
public int getHeight() { | |
return height; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment