Java Code Examples for sun.swing.BakedArrayList

The following examples show how to use sun.swing.BakedArrayList. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
/**
 * Returns the style for the specified Component.
 *
 * @param c Component asking for
 * @param id ID of the Component
 */
public synchronized SynthStyle getStyle(JComponent c, Region id) {
    BakedArrayList matches = _tmpList;

    matches.clear();
    getMatchingStyles(matches, c, id);

    if (matches.size() == 0) {
        return getDefaultStyle();
    }
    // Use a cached Style if possible, otherwise create a new one.
    matches.cacheHashCode();
    SynthStyle style = getCachedStyle(matches);

    if (style == null) {
        style = mergeStyles(matches);

        if (style != null) {
            cacheStyle(matches, style);
        }
    }
    return style;
}
 
Example 2
/**
 * Returns the style for the specified Component.
 *
 * @param c Component asking for
 * @param id ID of the Component
 */
public synchronized SynthStyle getStyle(JComponent c, Region id) {
    BakedArrayList matches = _tmpList;

    matches.clear();
    getMatchingStyles(matches, c, id);

    if (matches.size() == 0) {
        return getDefaultStyle();
    }
    // Use a cached Style if possible, otherwise create a new one.
    matches.cacheHashCode();
    SynthStyle style = getCachedStyle(matches);

    if (style == null) {
        style = mergeStyles(matches);

        if (style != null) {
            cacheStyle(matches, style);
        }
    }
    return style;
}
 
Example 3
/**
 * Returns the style for the specified Component.
 *
 * @param c Component asking for
 * @param id ID of the Component
 */
public synchronized SynthStyle getStyle(JComponent c, Region id) {
    BakedArrayList matches = _tmpList;

    matches.clear();
    getMatchingStyles(matches, c, id);

    if (matches.size() == 0) {
        return getDefaultStyle();
    }
    // Use a cached Style if possible, otherwise create a new one.
    matches.cacheHashCode();
    SynthStyle style = getCachedStyle(matches);

    if (style == null) {
        style = mergeStyles(matches);

        if (style != null) {
            cacheStyle(matches, style);
        }
    }
    return style;
}
 
Example 4
/**
 * Returns the style for the specified Component.
 *
 * @param c Component asking for
 * @param id ID of the Component
 */
public synchronized SynthStyle getStyle(JComponent c, Region id) {
    BakedArrayList matches = _tmpList;

    matches.clear();
    getMatchingStyles(matches, c, id);

    if (matches.size() == 0) {
        return getDefaultStyle();
    }
    // Use a cached Style if possible, otherwise create a new one.
    matches.cacheHashCode();
    SynthStyle style = getCachedStyle(matches);

    if (style == null) {
        style = mergeStyles(matches);

        if (style != null) {
            cacheStyle(matches, style);
        }
    }
    return style;
}
 
Example 5
Source Project: JDKSourceCode1.8   Source File: DefaultSynthStyleFactory.java    License: MIT License 6 votes vote down vote up
/**
 * Returns the style for the specified Component.
 *
 * @param c Component asking for
 * @param id ID of the Component
 */
public synchronized SynthStyle getStyle(JComponent c, Region id) {
    BakedArrayList matches = _tmpList;

    matches.clear();
    getMatchingStyles(matches, c, id);

    if (matches.size() == 0) {
        return getDefaultStyle();
    }
    // Use a cached Style if possible, otherwise create a new one.
    matches.cacheHashCode();
    SynthStyle style = getCachedStyle(matches);

    if (style == null) {
        style = mergeStyles(matches);

        if (style != null) {
            cacheStyle(matches, style);
        }
    }
    return style;
}
 
Example 6
/**
 * Returns the style for the specified Component.
 *
 * @param c Component asking for
 * @param id ID of the Component
 */
public synchronized SynthStyle getStyle(JComponent c, Region id) {
    BakedArrayList matches = _tmpList;

    matches.clear();
    getMatchingStyles(matches, c, id);

    if (matches.size() == 0) {
        return getDefaultStyle();
    }
    // Use a cached Style if possible, otherwise create a new one.
    matches.cacheHashCode();
    SynthStyle style = getCachedStyle(matches);

    if (style == null) {
        style = mergeStyles(matches);

        if (style != null) {
            cacheStyle(matches, style);
        }
    }
    return style;
}
 
Example 7
/**
 * Returns the style for the specified Component.
 *
 * @param c Component asking for
 * @param id ID of the Component
 */
public synchronized SynthStyle getStyle(JComponent c, Region id) {
    BakedArrayList matches = _tmpList;

    matches.clear();
    getMatchingStyles(matches, c, id);

    if (matches.size() == 0) {
        return getDefaultStyle();
    }
    // Use a cached Style if possible, otherwise create a new one.
    matches.cacheHashCode();
    SynthStyle style = getCachedStyle(matches);

    if (style == null) {
        style = mergeStyles(matches);

        if (style != null) {
            cacheStyle(matches, style);
        }
    }
    return style;
}
 
Example 8
Source Project: Bytecoder   Source File: DefaultSynthStyleFactory.java    License: Apache License 2.0 6 votes vote down vote up
/**
 * Returns the style for the specified Component.
 *
 * @param c Component asking for
 * @param id ID of the Component
 */
public synchronized SynthStyle getStyle(JComponent c, Region id) {
    BakedArrayList<SynthStyle> matches = _tmpList;

    matches.clear();
    getMatchingStyles(matches, c, id);

    if (matches.size() == 0) {
        return getDefaultStyle();
    }
    // Use a cached Style if possible, otherwise create a new one.
    matches.cacheHashCode();
    SynthStyle style = getCachedStyle(matches);

    if (style == null) {
        style = mergeStyles(matches);

        if (style != null) {
            cacheStyle(matches, style);
        }
    }
    return style;
}
 
Example 9
/**
 * Returns the style for the specified Component.
 *
 * @param c Component asking for
 * @param id ID of the Component
 */
public synchronized SynthStyle getStyle(JComponent c, Region id) {
    BakedArrayList<SynthStyle> matches = _tmpList;

    matches.clear();
    getMatchingStyles(matches, c, id);

    if (matches.size() == 0) {
        return getDefaultStyle();
    }
    // Use a cached Style if possible, otherwise create a new one.
    matches.cacheHashCode();
    SynthStyle style = getCachedStyle(matches);

    if (style == null) {
        style = mergeStyles(matches);

        if (style != null) {
            cacheStyle(matches, style);
        }
    }
    return style;
}
 
Example 10
/**
 * Returns the style for the specified Component.
 *
 * @param c Component asking for
 * @param id ID of the Component
 */
public synchronized SynthStyle getStyle(JComponent c, Region id) {
    BakedArrayList matches = _tmpList;

    matches.clear();
    getMatchingStyles(matches, c, id);

    if (matches.size() == 0) {
        return getDefaultStyle();
    }
    // Use a cached Style if possible, otherwise create a new one.
    matches.cacheHashCode();
    SynthStyle style = getCachedStyle(matches);

    if (style == null) {
        style = mergeStyles(matches);

        if (style != null) {
            cacheStyle(matches, style);
        }
    }
    return style;
}
 
Example 11
Source Project: Java8CN   Source File: DefaultSynthStyleFactory.java    License: Apache License 2.0 6 votes vote down vote up
/**
 * Returns the style for the specified Component.
 *
 * @param c Component asking for
 * @param id ID of the Component
 */
public synchronized SynthStyle getStyle(JComponent c, Region id) {
    BakedArrayList matches = _tmpList;

    matches.clear();
    getMatchingStyles(matches, c, id);

    if (matches.size() == 0) {
        return getDefaultStyle();
    }
    // Use a cached Style if possible, otherwise create a new one.
    matches.cacheHashCode();
    SynthStyle style = getCachedStyle(matches);

    if (style == null) {
        style = mergeStyles(matches);

        if (style != null) {
            cacheStyle(matches, style);
        }
    }
    return style;
}
 
Example 12
/**
 * Returns the style for the specified Component.
 *
 * @param c Component asking for
 * @param id ID of the Component
 */
public synchronized SynthStyle getStyle(JComponent c, Region id) {
    BakedArrayList matches = _tmpList;

    matches.clear();
    getMatchingStyles(matches, c, id);

    if (matches.size() == 0) {
        return getDefaultStyle();
    }
    // Use a cached Style if possible, otherwise create a new one.
    matches.cacheHashCode();
    SynthStyle style = getCachedStyle(matches);

    if (style == null) {
        style = mergeStyles(matches);

        if (style != null) {
            cacheStyle(matches, style);
        }
    }
    return style;
}
 
Example 13
/**
 * Returns the style for the specified Component.
 *
 * @param c Component asking for
 * @param id ID of the Component
 */
public synchronized SynthStyle getStyle(JComponent c, Region id) {
    BakedArrayList matches = _tmpList;

    matches.clear();
    getMatchingStyles(matches, c, id);

    if (matches.size() == 0) {
        return getDefaultStyle();
    }
    // Use a cached Style if possible, otherwise create a new one.
    matches.cacheHashCode();
    SynthStyle style = getCachedStyle(matches);

    if (style == null) {
        style = mergeStyles(matches);

        if (style != null) {
            cacheStyle(matches, style);
        }
    }
    return style;
}
 
Example 14
/**
 * Returns the style for the specified Component.
 *
 * @param c Component asking for
 * @param id ID of the Component
 */
public synchronized SynthStyle getStyle(JComponent c, Region id) {
    BakedArrayList matches = _tmpList;

    matches.clear();
    getMatchingStyles(matches, c, id);

    if (matches.size() == 0) {
        return getDefaultStyle();
    }
    // Use a cached Style if possible, otherwise create a new one.
    matches.cacheHashCode();
    SynthStyle style = getCachedStyle(matches);

    if (style == null) {
        style = mergeStyles(matches);

        if (style != null) {
            cacheStyle(matches, style);
        }
    }
    return style;
}
 
Example 15
/**
 * Returns the style for the specified Component.
 *
 * @param c Component asking for
 * @param id ID of the Component
 */
public synchronized SynthStyle getStyle(JComponent c, Region id) {
    BakedArrayList matches = _tmpList;

    matches.clear();
    getMatchingStyles(matches, c, id);

    if (matches.size() == 0) {
        return getDefaultStyle();
    }
    // Use a cached Style if possible, otherwise create a new one.
    matches.cacheHashCode();
    SynthStyle style = getCachedStyle(matches);

    if (style == null) {
        style = mergeStyles(matches);

        if (style != null) {
            cacheStyle(matches, style);
        }
    }
    return style;
}
 
Example 16
/**
 * Returns the style for the specified Component.
 *
 * @param c Component asking for
 * @param id ID of the Component
 */
public synchronized SynthStyle getStyle(JComponent c, Region id) {
    BakedArrayList matches = _tmpList;

    matches.clear();
    getMatchingStyles(matches, c, id);

    if (matches.size() == 0) {
        return getDefaultStyle();
    }
    // Use a cached Style if possible, otherwise create a new one.
    matches.cacheHashCode();
    SynthStyle style = getCachedStyle(matches);

    if (style == null) {
        style = mergeStyles(matches);

        if (style != null) {
            cacheStyle(matches, style);
        }
    }
    return style;
}
 
Example 17
/**
 * Returns the style for the specified Component.
 *
 * @param c Component asking for
 * @param id ID of the Component
 */
public synchronized SynthStyle getStyle(JComponent c, Region id) {
    BakedArrayList matches = _tmpList;

    matches.clear();
    getMatchingStyles(matches, c, id);

    if (matches.size() == 0) {
        return getDefaultStyle();
    }
    // Use a cached Style if possible, otherwise create a new one.
    matches.cacheHashCode();
    SynthStyle style = getCachedStyle(matches);

    if (style == null) {
        style = mergeStyles(matches);

        if (style != null) {
            cacheStyle(matches, style);
        }
    }
    return style;
}
 
Example 18
DefaultSynthStyleFactory() {
    _tmpList = new BakedArrayList(5);
    _styles = new ArrayList<StyleAssociation>();
    _resolvedStyles = new HashMap<BakedArrayList, SynthStyle>();
}
 
Example 19
/**
 * Caches the specified style.
 */
private void cacheStyle(List styles, SynthStyle style) {
    BakedArrayList cachedStyles = new BakedArrayList(styles);

    _resolvedStyles.put(cachedStyles, style);
}
 
Example 20
DefaultSynthStyleFactory() {
    _tmpList = new BakedArrayList(5);
    _styles = new ArrayList<StyleAssociation>();
    _resolvedStyles = new HashMap<BakedArrayList, SynthStyle>();
}
 
Example 21
/**
 * Caches the specified style.
 */
private void cacheStyle(List styles, SynthStyle style) {
    BakedArrayList cachedStyles = new BakedArrayList(styles);

    _resolvedStyles.put(cachedStyles, style);
}
 
Example 22
DefaultSynthStyleFactory() {
    _tmpList = new BakedArrayList(5);
    _styles = new ArrayList<StyleAssociation>();
    _resolvedStyles = new HashMap<BakedArrayList, SynthStyle>();
}
 
Example 23
/**
 * Caches the specified style.
 */
private void cacheStyle(List styles, SynthStyle style) {
    BakedArrayList cachedStyles = new BakedArrayList(styles);

    _resolvedStyles.put(cachedStyles, style);
}
 
Example 24
DefaultSynthStyleFactory() {
    _tmpList = new BakedArrayList(5);
    _styles = new ArrayList<StyleAssociation>();
    _resolvedStyles = new HashMap<BakedArrayList, SynthStyle>();
}
 
Example 25
/**
 * Caches the specified style.
 */
private void cacheStyle(List styles, SynthStyle style) {
    BakedArrayList cachedStyles = new BakedArrayList(styles);

    _resolvedStyles.put(cachedStyles, style);
}
 
Example 26
Source Project: JDKSourceCode1.8   Source File: DefaultSynthStyleFactory.java    License: MIT License 4 votes vote down vote up
DefaultSynthStyleFactory() {
    _tmpList = new BakedArrayList(5);
    _styles = new ArrayList<StyleAssociation>();
    _resolvedStyles = new HashMap<BakedArrayList, SynthStyle>();
}
 
Example 27
Source Project: JDKSourceCode1.8   Source File: DefaultSynthStyleFactory.java    License: MIT License 4 votes vote down vote up
/**
 * Caches the specified style.
 */
private void cacheStyle(List styles, SynthStyle style) {
    BakedArrayList cachedStyles = new BakedArrayList(styles);

    _resolvedStyles.put(cachedStyles, style);
}
 
Example 28
DefaultSynthStyleFactory() {
    _tmpList = new BakedArrayList(5);
    _styles = new ArrayList<StyleAssociation>();
    _resolvedStyles = new HashMap<BakedArrayList, SynthStyle>();
}
 
Example 29
/**
 * Caches the specified style.
 */
private void cacheStyle(List styles, SynthStyle style) {
    BakedArrayList cachedStyles = new BakedArrayList(styles);

    _resolvedStyles.put(cachedStyles, style);
}
 
Example 30
DefaultSynthStyleFactory() {
    _tmpList = new BakedArrayList(5);
    _styles = new ArrayList<StyleAssociation>();
    _resolvedStyles = new HashMap<BakedArrayList, SynthStyle>();
}