public class IconServer
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
FIT_BOTH |
static int |
FIT_HEIGHT |
static int |
FIT_NONE |
static int |
FIT_WIDTH |
Constructor and Description |
---|
IconServer() |
IconServer(java.lang.String iconmappings,
java.lang.String icondir)
Serve icons bases on the associations in the configuration file.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getConfigFile() |
DomainNameTree |
getDefaultIconMap()
Add the default icon mappings to the current icon mappings.
|
javax.swing.ImageIcon |
getIconForDomain(java.lang.String domain)
Look up the domain name in the registry and create a new icon using the
image specified there.
|
DomainNameTree |
getIconMap()
Returns a tree of icon mappings.
|
java.lang.String |
getIconRepository()
Get path to the default image repository.
|
java.lang.String |
getImagePathForDomain(java.lang.String domain) |
boolean |
getUseBestGuess() |
void |
populateDefaultIcons() |
void |
processRegistry()
This method should be called to initialize the icon mapping before
the instance of this class is used.
|
void |
saveToRegistry() |
void |
saveToRegistry(DomainNameTree iconmap)
Saves the current icon mappings to the registry.
|
void |
setConfigFile(java.lang.String file) |
void |
setIconHeight(int x) |
void |
setIconMap(DomainNameTree x)
Set a tree of icon mappings.
|
void |
setIconRepository(java.lang.String path)
Set path to the default image repository(directory).
|
void |
setIconWidth(int x) |
void |
setScalingMethod(int t) |
void |
setUseBestGuess(boolean x) |
static java.lang.String[] |
splitDomainName(java.lang.String domainname)
Parses a dot-separated URL to return the leading domain name.
|
public static final int FIT_HEIGHT
public static final int FIT_WIDTH
public static final int FIT_BOTH
public static final int FIT_NONE
public IconServer()
public IconServer(java.lang.String iconmappings, java.lang.String icondir)
public java.lang.String getIconRepository()
public void setIconRepository(java.lang.String path)
public void setConfigFile(java.lang.String file)
public java.lang.String getConfigFile()
public void setScalingMethod(int t)
public void setIconWidth(int x)
public void setIconHeight(int x)
public java.lang.String getImagePathForDomain(java.lang.String domain)
public void setUseBestGuess(boolean x)
public boolean getUseBestGuess()
public javax.swing.ImageIcon getIconForDomain(java.lang.String domain)
public DomainNameTree getIconMap()
public void setIconMap(DomainNameTree x)
public void saveToRegistry()
public void saveToRegistry(DomainNameTree iconmap)
public void processRegistry()
public DomainNameTree getDefaultIconMap()
public static java.lang.String[] splitDomainName(java.lang.String domainname)
public void populateDefaultIcons()
Copyright © 2011, 2013. Daniel P. Dougherty