public class Icon extends Object
Modifier and Type | Field and Description |
---|---|
static String |
ICON_LARGE_STYLE |
static String |
ICON_MEDIUM_STYLE |
static String |
ICON_SMALL_STYLE |
static String |
ICON_XLARGE_STYLE |
Constructor and Description |
---|
Icon(String classSpec,
String style)
Creates a
core icon. |
Icon(String classSpec,
String url,
String style)
Creates a
core icon. |
Icon(String classSpec,
String url,
String style,
IconFormat iconFormat)
Creates an icon.
|
Icon(String classSpec,
String url,
String style,
IconType iconType)
Icon instance.
|
Icon(String classSpec,
String url,
String style,
IconType iconType,
IconFormat iconFormat) |
Modifier and Type | Method and Description |
---|---|
String |
getClassSpec()
Get the class specification for this Icon.
|
String |
getNormalizedSelector()
Get the icon's normalized CSS selector.
|
String |
getQualifiedUrl(org.apache.commons.jelly.JellyContext context)
Get the qualified icon url.
|
String |
getStyle()
Get the icon style.
|
String |
getUrl()
Get the icon url.
|
boolean |
isSvgSprite()
Is the Icon an SVG?
|
static String |
toNormalizedCSSSelector(String classNames)
Generate a normalized CSS selector from the space separated list of icon class names.
|
static String |
toNormalizedIconName(String string)
Normalize the supplied string to an Icon name e.g.
|
static String |
toNormalizedIconNameClass(String string)
Normalize the supplied string to an Icon name class e.g.
|
static String |
toNormalizedIconSizeClass(String string)
Normalize the supplied string to an Icon size class e.g.
|
static String |
toNormalizedIconUrl(String url)
Normalize the supplied url.
|
public static final String ICON_SMALL_STYLE
public static final String ICON_MEDIUM_STYLE
public static final String ICON_LARGE_STYLE
public static final String ICON_XLARGE_STYLE
public Icon(String classSpec, String style)
core
icon.classSpec
- The icon class names.style
- The icon style.public Icon(String classSpec, String url, String style)
core
icon.classSpec
- The icon class names.url
- The icon image url.style
- The icon style.public Icon(String classSpec, String url, String style, IconType iconType)
classSpec
- The icon class specification.url
- The icon image url.style
- The icon style.iconType
- The icon type.public Icon(String classSpec, String url, String style, IconFormat iconFormat)
classSpec
- The icon class names.url
- The icon image url.style
- The icon style.iconFormat
- the IconFormat
.@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public Icon(String classSpec, String url, String style, IconType iconType, IconFormat iconFormat)
public String getClassSpec()
public boolean isSvgSprite()
public String getNormalizedSelector()
toNormalizedCSSSelector(String)
public String getUrl()
public String getQualifiedUrl(org.apache.commons.jelly.JellyContext context)
context
- The JellyContext.public String getStyle()
public static String toNormalizedIconNameClass(String string)
string
- The string to be normalized.public static String toNormalizedIconName(String string)
string
- The string to be normalized.public static String toNormalizedIconSizeClass(String string)
string
- The string to be normalized.string
arg
if it was an unrecognised icon size.public static String toNormalizedCSSSelector(String classNames)
classNames
- The space separated list of icon class names.Copyright © 2004–2021. All rights reserved.