|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.renderer.Icon
public class Icon
Encapsulates an icon the renderer has to draw, for example a link decoration or emoticon.
| Field Summary | |
|---|---|
String |
cssClass
|
int |
height
|
static int |
ICON_LEFT
The icon is drawn to the left of the content it is decorating (i.e. |
static int |
ICON_RIGHT
The icon is drawn to the right of the content it is decorating (i.e. |
static String |
IMAGE_TEMPLATE
Template for converting an image to an HTML img tag |
static Icon |
NULL_ICON
The NULL_ICON is a convenient icon that has no size and draws nothing. |
String |
path
|
int |
position
|
int |
width
|
| Method Summary | |
|---|---|
String |
getPath()
|
static Icon |
makeEmoticon(String path,
int height,
int width)
Factory method for a new emoticon |
static Icon |
makeRenderIcon(String path,
int position,
int width,
int height)
Factory method for a new rendericon |
String |
toHtml(String imageRoot)
Return the icon as HTML, relative to the given image root. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String IMAGE_TEMPLATE
public static final int ICON_LEFT
public static final int ICON_RIGHT
public static final Icon NULL_ICON
public final String path
public final int position
public final int width
public final int height
public final String cssClass
| Method Detail |
|---|
public static Icon makeRenderIcon(String path,
int position,
int width,
int height)
path - the path (relative to the renderer's image root) to the icon's image fileposition - one of ICON_LEFT or ICON_RIGHTwidth - the width of the image in pixelsheight - the height of the image in pixels
public static Icon makeEmoticon(String path,
int height,
int width)
path - the path (relative to the renderer's image root) to the icon's image fileheight - the height of the image in pixelswidth - the width of the image in pixels
public String toHtml(String imageRoot)
imageRoot - the URL path to the root of the image directory
public String getPath()
public String toString()
toString in class ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||