//
//--------------------------------------------------------------------------
public void loadDefaultStyles()
{
VirtualFile defaultsCSSFile = resolveDefaultsCssFile();
// Load the per SWC default styles first
for (VirtualFile swcDefaultsCssFile : mxmlConfiguration.getDefaultsCssFiles())
{
// Make sure that we resolve things relative to the SWC.
ThreadLocalToolkit.getPathResolver().addSinglePathResolver(0, swcDefaultsCssFile);
processStyleSheet(swcDefaultsCssFile);
ThreadLocalToolkit.getPathResolver().removeSinglePathResolver(swcDefaultsCssFile);
}
// Load the default styles next, so they can override the SWC defaults
if (defaultsCSSFile != null)
{
// Only load the defaults if it's not from a SWC.
// Defaults from a SWC will have already been loaded if a
// component from the SWC has been used in the compilation.
if (!(defaultsCSSFile instanceof VirtualZipFile))
{
processStyleSheet(defaultsCSSFile);
}
}
else
{
ThreadLocalToolkit.log(new DefaultCSSFileNotFound());
}
// Load the theme styles next, so they can override the defaults
for (Iterator<VirtualFile> it = mxmlConfiguration.getThemeCssFiles().iterator(); it.hasNext();)
{
VirtualFile themeCssFile = it.next();
// Make sure that we resolve things in the theme relative
// to the theme SWC first.
ThreadLocalToolkit.getPathResolver().addSinglePathResolver(0, themeCssFile);
processStyleSheet(themeCssFile);