Package bibliothek.gui.dock.util.font

Examples of bibliothek.gui.dock.util.font.FontModifier


     * @param key the key of the font
     * @param font the new value or <code>null</code> to set
     * the default value
     */
    public void setFont( String key, FontModifier font ){
        FontModifier old;
        if( font == null )
            old = fonts.remove( key );
        else
            old = fonts.put( key, font );
       
        if( (old == null && font != null) || (old != null && !old.equals( font )) ){
            for( FontMapListener listener : listeners.toArray( new FontMapListener[ listeners.size() ] ))
                listener.fontChanged( this, key, font );
        }
    }
View Full Code Here


     * @param keys some keys that will be read from index 0 upward.
     * @return the first {@link Color} that is not <code>null</code> or <code>null</code>
     */
    protected FontModifier getFirstNonNull( FontMap map, String...keys ){
        for( String key : keys ){
            FontModifier font = map.getFont( key );
            if( font != null )
                return font;
        }
        return null;
    }
View Full Code Here

        return false;
    }
   
    private FontModifier getFirstNonNull( FontMap fonts, int index ){
        for( int i = index, n = source.length; i<n; i++ ){
            FontModifier font = fonts.getFont( source[i] );
            if( font != null )
                return font;
        }
        return null;
    }
View Full Code Here

        return null;
    }

    @Override
    protected FontModifier get( FontModifier value, String id, CDockable dockable ){
        FontModifier result = null;
       
        for( int i = 0, n = destination.length; i<n; i++ ){
            if( destination[i].equals( id )){
                result = getFirstNonNull( dockable.getFonts(), i );
                break;
View Full Code Here

TOP

Related Classes of bibliothek.gui.dock.util.font.FontModifier

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.