Package base.drawable

Examples of base.drawable.ColorAlpha


    }

    public CategoryIcon( Topology shape, Color color )
    {
        topo        = shape;
        color_orig  = new ColorAlpha( color, ColorAlpha.OPAQUE );
        color_shown = color;
    }
View Full Code Here


    public void setValueAt( Object value, int irow, int icolumn )
    {
        Category      objdef;
        CategoryIcon  icon;
        ColorAlpha    color;

        objdef = (Category) objdef_list.get( irow );
        switch ( icolumn ) {
            case ICON_COLUMN :
                color  = (ColorAlpha) value;
View Full Code Here

        InputStreamReader  insrdr;
        BufferedReader     bufrdr;
        StringTokenizer    tokens;
        String             line;
        String             colorname;
        ColorAlpha         aRGB;
        int                red, green, blue;

        ins      = ClassLoader.getSystemResourceAsStream( filename );
        if ( ins == null ) {
            System.err.println( "ColorNameMap: Could NOT locate "
                              + filename + " in CLASSPATH.  Exiting...!" );
            System.exit( 1 );
        }
        colormap = new HashMap( 800 );

        try {
            insrdr = new InputStreamReader( ins );
            bufrdr = new BufferedReader( insrdr, 20480 );

            while ( ( line = bufrdr.readLine() ) != null ) {
                tokens     = new StringTokenizer( line );
                red        = Integer.parseInt( tokens.nextToken() );
                green      = Integer.parseInt( tokens.nextToken() );
                blue       = Integer.parseInt( tokens.nextToken() );
                aRGB       = new ColorAlpha( red, green, blue );
                colorname  = tokens.nextToken();
                while ( tokens.hasMoreTokens() )
                    colorname += " " + tokens.nextToken();
                colormap.put( colorname, aRGB );
            }
View Full Code Here

    }

    //  Special interface for CLOG's StrCname which has ":"!
    public static ColorAlpha getColorAlpha( String in_colorname )
    {
        ColorAlpha  color;
        String      colorname;

        int  len      = in_colorname.indexOf( ':' );
        if ( len != -1 )
            colorname = in_colorname.substring( 0, len );
View Full Code Here

    {
        Color new_color = JColorChooser.showDialog( delegate_btn,
                                                    "Pick a Color",
                                                    prev_color );
        if ( new_color != null )
            saved_color = new ColorAlpha( new_color, ColorAlpha.OPAQUE );
        else
            saved_color = new ColorAlpha( prev_color, ColorAlpha.OPAQUE );
        fireEditingStopped();
    }
View Full Code Here

    public DobjDef( int objidx, String objname, int shapeID,
                    int red, int green, int blue, int alpha, int width,
                    String labels, int[] methodIDs )
    {
        super( objidx, objname, width );
        super.setColor( new ColorAlpha( red, green, blue, alpha, true ) );

        Topology topo = new Topology( shapeID );
        if ( ! topo.isPrimitive() ) {
            String err_msg = "trace.DobjDef(): unknown shapeID = " + shapeID;
            throw new IllegalArgumentException( err_msg );
View Full Code Here

        InputStreamReader  insrdr;
        BufferedReader     bufrdr;
        StringTokenizer    tokens;
        String             line;
        String             colorname;
        ColorAlpha         aRGB;
        int                red, green, blue;

        ins      = ClassLoader.getSystemResourceAsStream( filename );
        if ( ins == null ) {
            System.err.println( "ColorNameMap: Could NOT locate "
                              + filename + " in CLASSPATH.  Exiting...!" );
            System.exit( 1 );
        }
        colormap = new HashMap( 800 );

        try {
            insrdr = new InputStreamReader( ins );
            bufrdr = new BufferedReader( insrdr, 20480 );

            while ( ( line = bufrdr.readLine() ) != null ) {
                tokens     = new StringTokenizer( line );
                red        = Integer.parseInt( tokens.nextToken() );
                green      = Integer.parseInt( tokens.nextToken() );
                blue       = Integer.parseInt( tokens.nextToken() );
                aRGB       = new ColorAlpha( red, green, blue );
                colorname  = tokens.nextToken();
                while ( tokens.hasMoreTokens() )
                    colorname += " " + tokens.nextToken();
                colormap.put( colorname, aRGB );
            }
View Full Code Here

    }

    //  Special interface for CLOG's StrCname which has ":"!
    public static ColorAlpha getColorAlpha( String in_colorname )
    {
        ColorAlpha  color;
        String      colorname;

        int  len      = in_colorname.indexOf( ':' );
        if ( len != -1 )
            colorname = in_colorname.substring( 0, len );
View Full Code Here

TOP

Related Classes of base.drawable.ColorAlpha

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.