/** * derives a child style from this style. * <p/> * depends on the ability to return the identical CascadedStyle each time a child style is needed * * @param matched the CascadedStyle to apply * @return The derived child style */ public synchronized CalculatedStyle deriveStyle(CascadedStyle matched) { String fingerprint = matched.getFingerprint(); CalculatedStyle cs = (CalculatedStyle) _childCache.get(fingerprint); if (cs == null) { cs = new CalculatedStyle(this, matched); _childCache.put(fingerprint, cs); } return cs; }
/** * derives a child style from this style. * <p/> * depends on the ability to return the identical CascadedStyle each time a child style is needed * * @param matched the CascadedStyle to apply * @return The derived child style */ public synchronized CalculatedStyle deriveStyle(CascadedStyle matched) { String fingerprint = matched.getFingerprint(); CalculatedStyle cs = (CalculatedStyle) _childCache.get(fingerprint); if (cs == null) { cs = new CalculatedStyle(this, matched); _childCache.put(fingerprint, cs); } return cs; }