public interface IconTheme
| Modifier and Type | Interface and Description |
|---|---|
static interface |
IconTheme.Icon |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NO_ICON_NAME |
| Modifier and Type | Method and Description |
|---|---|
boolean |
exists(java.lang.String name)
Returns
true if the icon theme contains a mapping for the
specified iconName. |
void |
export(java.io.File folder) |
javax.swing.ImageIcon |
get(java.lang.String iconName)
Gets the ImageIcon associated with the provided name, if the name
is present in the theme.
|
javax.swing.ImageIcon |
get(java.lang.String iconName,
java.lang.ClassLoader loader)
Deprecated.
use
get(String) instead |
IconTheme |
getDefault() |
javax.swing.ImageIcon |
getDefaultIcon()
Return the icon used as icon by default when the requested icon
not exists.
|
java.lang.String |
getDescription()
Gets the theme description.
|
java.lang.String |
getID() |
java.lang.String |
getName()
Gets the theme name of the theme
|
javax.swing.ImageIcon |
getNoIcon()
Deprecated.
use
getDefaultIcon() |
IconTheme.Icon |
getThemeIcon(java.lang.String name)
Return the ThemeIcon associated with the name.
|
java.util.Iterator<IconTheme.Icon> |
getThemeIcons()
Return an iterator over the ThemIcon in the theme.
|
java.util.Iterator<java.lang.String> |
iterator()
Return an iterator over the names of the icons in the theme.
|
void |
load(java.lang.Object resource)
Load all icons from the IconTheme
|
void |
register(java.lang.String iconName,
javax.swing.ImageIcon image)
Deprecated.
use
#register(PluginServices, String, String, ImageIcon, Object) |
void |
register(java.lang.String iconName,
java.lang.Object resource)
Deprecated.
use
#register(PluginServices, String, String, ImageIcon, Object) |
void |
register(java.lang.String provider,
java.lang.String group,
java.lang.String name,
javax.swing.ImageIcon icon,
java.net.URL resource)
Register a icon in the theme.
|
void |
registerDefault(java.lang.String iconName,
javax.swing.ImageIcon image)
Deprecated.
use
#registerDefault(PluginServices, String, String, ImageIcon, Object) |
void |
registerDefault(java.lang.String iconName,
java.lang.Object resource)
Deprecated.
use
#registerDefault(PluginServices, String, String, ImageIcon, Object) |
void |
registerDefault(java.lang.String provider,
java.lang.String group,
java.lang.String name,
javax.swing.ImageIcon icon,
java.net.URL resource)
Register a icon in the theme.
|
void |
setDefault(IconTheme def) |
void |
setDefaultIcon(javax.swing.ImageIcon icon)
Set the default icon to use when the requestd icon not exists.
|
void |
setDefaultIcon(java.lang.String name) |
void |
setDefaultIcon(java.net.URL resource) |
void |
setDescription(java.lang.String description)
Sets the theme description.
|
void |
setID(java.lang.String id) |
void |
setName(java.lang.String themeName)
Sets the theme name of the theme
|
static final java.lang.String NO_ICON_NAME
void load(java.lang.Object resource)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionvoid setDefault(IconTheme def)
IconTheme getDefault()
boolean exists(java.lang.String name)
true if the icon theme contains a mapping for the
specified iconName.iconName - The key to check if it has been registered in this
IconThemetrue if this IconTheme contains
iconName, false otherwise.javax.swing.ImageIcon get(java.lang.String iconName)
null if
this not exists.name - The name whose associated icon is to be retrievedIconTheme.Icon getThemeIcon(java.lang.String name)
name - of the iconjava.lang.String getName()
void setName(java.lang.String themeName)
themeName - java.lang.String getID()
void setID(java.lang.String id)
java.lang.String getDescription()
void setDescription(java.lang.String description)
description - java.util.Iterator<java.lang.String> iterator()
java.util.Iterator<IconTheme.Icon> getThemeIcons()
javax.swing.ImageIcon getDefaultIcon()
void setDefaultIcon(javax.swing.ImageIcon icon)
icon - void setDefaultIcon(java.net.URL resource)
void setDefaultIcon(java.lang.String name)
void registerDefault(java.lang.String provider,
java.lang.String group,
java.lang.String name,
javax.swing.ImageIcon icon,
java.net.URL resource)
throws java.lang.IllegalArgumentException
provider - name of the icongroup - name for the icon.name - of iconicon, - can be nulll if the resource is specified.resource, - resource of the icon, usualy and url to the icon.java.lang.IllegalArgumentException - if name is null/empty or icon/resource are nullvoid register(java.lang.String provider,
java.lang.String group,
java.lang.String name,
javax.swing.ImageIcon icon,
java.net.URL resource)
throws java.lang.IllegalArgumentException
provider - name of the icongroup - name for the icon.name - of iconicon, - can be nulll if the resource is specified.resource, - resource of the icon, usualy and url to the icon.java.lang.IllegalArgumentException - if name is null/empty or icon/resource are nullvoid export(java.io.File folder)
javax.swing.ImageIcon getNoIcon()
getDefaultIcon()javax.swing.ImageIcon get(java.lang.String iconName,
java.lang.ClassLoader loader)
get(String) insteadvoid registerDefault(java.lang.String iconName,
javax.swing.ImageIcon image)
#registerDefault(PluginServices, String, String, ImageIcon, Object)void registerDefault(java.lang.String iconName,
java.lang.Object resource)
#registerDefault(PluginServices, String, String, ImageIcon, Object)void register(java.lang.String iconName,
javax.swing.ImageIcon image)
#register(PluginServices, String, String, ImageIcon, Object)void register(java.lang.String iconName,
java.lang.Object resource)
#register(PluginServices, String, String, ImageIcon, Object)