Package org.eclipse.sapphire

Examples of org.eclipse.sapphire.Color


        return null;
    }
   
    private static Color convert( final RGB rgb )
    {
        return ( rgb == null ? null : new Color( rgb.red, rgb.green, rgb.blue ) );
    }
View Full Code Here


    }

    @Override
    public Color convert( final String string )
    {
        Color result = null;
       
        if( string.startsWith( "#" ) && string.length() == 7 )
        {
            try
            {
                final int r = Integer.valueOf( string.substring( 1, 3 ), 16 );
                final int g = Integer.valueOf( string.substring( 3, 5 ), 16 );
                final int b = Integer.valueOf( string.substring( 5, 7 ), 16 );
                result = new Color( r, g, b );
            }
            catch( NumberFormatException e )
            {
                // Intentionally ignored.
            }
View Full Code Here

TOP

Related Classes of org.eclipse.sapphire.Color

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.