public class Icon extends Object
| Modifier and Type | Field and Description |
|---|---|
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 |
| Modifier and Type | Method and Description |
|---|---|
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() |
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
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 pixelspublic 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 pixelspublic String toHtml(String imageRoot)
imageRoot - the URL path to the root of the image directorypublic String getPath()
public String toString()
toString in class ObjectObject.toString()Copyright © 2019 Atlassian. All rights reserved.