public class ThemeHelper extends Object
Modifier and Type | Field and Description |
---|---|
static String |
LINK_ELEMENT_ID
default name of the CSS link element
|
Modifier and Type | Method and Description |
---|---|
protected String |
getBaseDirectory()
This method returns a base directory that ends with '/' if it's specified and
GWT.getModuleBaseURL() by default. |
String |
getFullImageName(String shortName)
This method gets a full name of the specified image using the theme name.
|
String |
getFullResourceName(String relativePath)
Gets a full resource name applying the
baseDirectory as a root for the
specified relative path. |
static ThemeHelper |
getInstance()
This method returns an instance of this class.
|
String |
getThemeName()
Gets current theme name.
|
void |
register(ThemeApplicable applicable)
Registers a new applicable widget.
|
void |
setBaseDirectory(String baseDirectory)
Setter for property 'baseDirectory'.
|
void |
setThemeName(String name)
Sets current theme name and changes it.
|
void |
unregister(ThemeApplicable applicable)
Unregisters the specified applicable widget if it was registered.
|
public static final String LINK_ELEMENT_ID
public static ThemeHelper getInstance()
public void setThemeName(String name)
name
- is a bew theme name.public String getThemeName()
public String getFullImageName(String shortName)
shortName
- is a short name of the image.public String getFullResourceName(String relativePath)
baseDirectory
as a root for the
specified relative path.relativePath
- is a path relative the base directory.public void setBaseDirectory(String baseDirectory)
baseDirectory
- Value to set for property 'baseDirectory'.public void register(ThemeApplicable applicable)
applicable
- is a theme applicable widget.public void unregister(ThemeApplicable applicable)
applicable
- is an applicable widget to be unregistered.protected String getBaseDirectory()
GWT.getModuleBaseURL()
by default.null
).Copyright © 2008–2013. All rights reserved.