public int getCompilerCompatibilityVersion() { return getCompilerMxmlCompatibilityVersion(); }
/** * * @return Returns the preloader class configured by the user. If the user did not configure a preloader, the * "mx.preloader.DownloaderProgressBar" preloader will be returned if the compatibility version is less than * 4.0. Otherwise the "mx.preloaders.SparkDownloadProgressBar" preloader will be returned. */ public String getPreloader() { if (preloader != null) return preloader; if (getCompilerMxmlCompatibilityVersion() < MXML_VERSION_4_0) return IMXMLTypeConstants.DownloadProgressBar; else return IMXMLTypeConstants.SparkDownloadProgressBar; }
public int getCompilerCompatibilityVersion() { return getCompilerMxmlCompatibilityVersion(); }
/** * * @return Returns the preloader class configured by the user. If the user did not configure a preloader, the * "mx.preloader.DownloaderProgressBar" preloader will be returned if the compatibility version is less than * 4.0. Otherwise the "mx.preloaders.SparkDownloadProgressBar" preloader will be returned. */ public String getPreloader() { if (preloader != null) return preloader; if (getCompilerMxmlCompatibilityVersion() < MXML_VERSION_4_0) return IMXMLTypeConstants.DownloadProgressBar; else return IMXMLTypeConstants.SparkDownloadProgressBar; }
/** * Get normalized theme file paths. If a the compiler is in "Flex 3 compatibility" mode and only "Spark" theme is * used, it will be replaced with the legacy "Halo" theme. * * @return A list of normalized paths to the theme files. */ public List<String> getCompilerThemeFiles() { if (themeFiles == null) return EMPTY_STRING_LIST; final boolean isVersion3OrEarlier = getCompilerMxmlCompatibilityVersion() <= MXML_VERSION_3_0; final boolean hasOnlyOneThemeFile = themeFiles.size() == 1; if (isVersion3OrEarlier && hasOnlyOneThemeFile) { // Swap in the default Flex 3 theme of Halo. final String path = FilenameUtils.normalize(themeFiles.get(0), true); final String sparkPath = "/themes/Spark/spark.css"; if (path.endsWith(sparkPath)) { int index = path.indexOf(sparkPath); final String haloPath = path.substring(0, index) + "/themes/Halo/halo.swc"; themeFiles.set(0, FilenameNormalization.normalize(haloPath)); } } return themeFiles; }
/** * Get normalized theme file paths. If a the compiler is in "Flex 3 compatibility" mode and only "Spark" theme is * used, it will be replaced with the legacy "Halo" theme. * * @return A list of normalized paths to the theme files. */ public List<String> getCompilerThemeFiles() { if (themeFiles == null) return EMPTY_STRING_LIST; final boolean isVersion3OrEarlier = getCompilerMxmlCompatibilityVersion() <= MXML_VERSION_3_0; final boolean hasOnlyOneThemeFile = themeFiles.size() == 1; if (isVersion3OrEarlier && hasOnlyOneThemeFile) { // Swap in the default Flex 3 theme of Halo. final String path = FilenameUtils.normalize(themeFiles.get(0), true); final String sparkPath = "/themes/Spark/spark.css"; if (path.endsWith(sparkPath)) { int index = path.indexOf(sparkPath); final String haloPath = path.substring(0, index) + "/themes/Halo/halo.swc"; themeFiles.set(0, FilenameNormalization.normalize(haloPath)); } } return themeFiles; }
/** * Setup {@code -compatibility-version} level. Royale only support Flex 3+. * @param project */ protected void setupCompatibilityVersion(RoyaleProject project) { final int compatibilityVersion = configuration.getCompilerMxmlCompatibilityVersion(); if (compatibilityVersion < Configuration.MXML_VERSION_3_0) throw new UnsupportedOperationException("Unsupported compatibility version: " + configuration.getCompilerCompatibilityVersionString()); project.setCompatibilityVersion(configuration.getCompilerMxmlMajorCompatibilityVersion(), configuration.getCompilerMxmlMinorCompatibilityVersion(), configuration.getCompilerMxmlRevisionCompatibilityVersion()); }
/** * Setup {@code -compatibility-version} level. Royale only support Flex 3+. * @param project */ protected void setupCompatibilityVersion(RoyaleProject project) { final int compatibilityVersion = configuration.getCompilerMxmlCompatibilityVersion(); if (compatibilityVersion < Configuration.MXML_VERSION_3_0) throw new UnsupportedOperationException("Unsupported compatibility version: " + configuration.getCompilerCompatibilityVersionString()); project.setCompatibilityVersion(configuration.getCompilerMxmlMajorCompatibilityVersion(), configuration.getCompilerMxmlMinorCompatibilityVersion(), configuration.getCompilerMxmlRevisionCompatibilityVersion()); }