Package base.drawable

Examples of base.drawable.Shadow


    createBufForTimeAveBoxes( final TimeBoundingBox  timebox )
    {
        BufForTimeAveBoxes  buf2statboxes;
        Iterator            dobjs, sobjs;
        Drawable            dobj;
        Shadow              sobj;

        buf2statboxes   = new BufForTimeAveBoxes( timebox );
        criteria.initMatch();

        // Merge Nestable Shadows
        sobjs = treetrunk.iteratorOfLowestFloorShadows( timebox,
                                                        INCRE_STARTTIME_ORDER,
                                                        IS_NESTABLE );
        while ( sobjs.hasNext() ) {
            sobj = (Shadow) sobjs.next();
            if (    sobj.getCategory().isVisiblySearchable()
                 && sobj.containSearchable()
                 && criteria.isMatched( sobj ) ) {
                buf2statboxes.mergeWithNestable( sobj );
            }
        }

        // Merge Nestable Real Drawables
        dobjs = treetrunk.iteratorOfRealDrawables( timebox,
                                                   INCRE_STARTTIME_ORDER,
                                                   isConnectedComposite,
                                                   IS_NESTABLE );
        while ( dobjs.hasNext() ) {
            dobj = (Drawable) dobjs.next();
            if (    dobj.getCategory().isVisiblySearchable()
                 && dobj.containSearchable()
                 && criteria.isMatched( dobj ) ) {
                buf2statboxes.mergeWithNestable( dobj );
            }
        }

        // Compute ExclusiveDurationRatio of CategoryWeights in buf2statboxes
        buf2statboxes.setNestingExclusion();

        // Merge Nestless Real Drawables
        dobjs = treetrunk.iteratorOfRealDrawables( timebox,
                                                   INCRE_STARTTIME_ORDER,
                                                   isConnectedComposite,
                                                   !IS_NESTABLE );
        while ( dobjs.hasNext() ) {
            dobj = (Drawable) dobjs.next();
            if (    dobj.getCategory().isVisiblySearchable()
                 && dobj.containSearchable()
                 && criteria.isMatched( dobj ) ) {
                buf2statboxes.mergeWithNestless( dobj );
            }
        }

        // Merge Nestless Shadows
        sobjs = treetrunk.iteratorOfLowestFloorShadows( timebox,
                                                        INCRE_STARTTIME_ORDER,
                                                        !IS_NESTABLE );
        while ( sobjs.hasNext() ) {
            sobj = (Shadow) sobjs.next();
            if (    sobj.getCategory().isVisiblySearchable()
                 && sobj.containSearchable()
                 && criteria.isMatched( sobj ) ) {
                buf2statboxes.mergeWithNestless( sobj );
            }
        }
View Full Code Here


        key = new ArrayList();
        topo = prime.getCategory().getTopology();
        key.add( topo );
        key.addAll( prime.getListOfVertexLineIDs() );
        Shadow sobj = (Shadow) buf4shadows.get( key );
        if ( sobj == null ) {
            shadowdef = (Category) shadowdefs_map.get( topo );
            shadowdef.setUsed( true );
            sobj = new Shadow( shadowdef, prime );
            buf4shadows.put( key, sobj );
            total_bytesize += sobj.getByteSize();
        }
        else {
            total_bytesize -= sobj.getByteSize();
            sobj.mergeWithPrimitive( prime );
            total_bytesize += sobj.getByteSize();
        }
    }
View Full Code Here

    // SLOG-2 Output API : the argument "buf" is childnode's BufForShadows
    public void mergeWith( final BufForShadows buf )
    {
        Map.Entry  key_sobj;
        List       key;
        Shadow     sobj;
        Iterator entries = buf.buf4shadows.entrySet().iterator();
        while ( entries.hasNext() ) {
            key_sobj = (Map.Entry) entries.next();
            key      = (List) key_sobj.getKey();
            sobj     = (Shadow) this.buf4shadows.get( key );
            if ( sobj == null ) {
                // A NEW copy of Shadow is needed here, otherwise
                // buf.buf4shadows[] could be modified by
                // this.buf4shadows[] __later__ in the program
                sobj = new Shadow( (Shadow) key_sobj.getValue() );
                this.buf4shadows.put( key, sobj );
                total_bytesize += sobj.getByteSize();
            }
            else {
                total_bytesize -= sobj.getByteSize();
                sobj.mergeWithShadow( (Shadow) key_sobj.getValue() );
                total_bytesize += sobj.getByteSize();
            }
        }
    }
View Full Code Here

    // For SLOG-2 Output API
    public void summarizeCategories()
    {
        Iterator  sobjs_itr;
        Shadow    sobj;

        sobjs_itr = buf4shadows.values().iterator();
        while ( sobjs_itr.hasNext() ) {
            sobj = (Shadow) sobjs_itr.next();
            sobj.summarizeCategories( super.getDuration() );
        }
    }
View Full Code Here

    public void writeObject( MixedDataOutput outs )
    throws java.io.IOException
    {
        Iterator  sobjs_itr;
        Shadow    sobj;
        int       Nobjs;

        super.writeObject( outs ); // BufForObjects.writeObject( outs )

        Iterator objs_itr = buf4shadows.values().iterator();
        while ( objs_itr.hasNext() ) {
            sobj = (Shadow) objs_itr.next();
            if ( sobj.getCategory().getTopology().isState() )
                buf4nestable.add( sobj );
            else
                buf4nestless.add( sobj );
        }
        this.reorderDrawables( Drawable.INCRE_STARTTIME_ORDER );
View Full Code Here

    }

    public void readObject( MixedDataInput ins, final Map categorymap )
    throws java.io.IOException
    {
        Shadow  sobj;
        int     Nobjs, idx;;

        super.readObject( ins ); // BufForObjects.readObject( ins )

        Nobjs = ins.readInt();
        buf4nestless = new ArrayList( Nobjs );
        for ( idx = 0; idx < Nobjs; idx++ ) {
            sobj  = new Shadow( ins );
            sobj.resolveCategory( categorymap );
            buf4nestless.add( sobj );
            total_bytesize += sobj.getByteSize();
        }

        Nobjs = ins.readInt();
        buf4nestable = new ArrayList( Nobjs );
        for ( idx = 0; idx < Nobjs; idx++ ) {
            sobj  = new Shadow( ins );
            sobj.resolveCategory( categorymap );
            buf4nestable.add( sobj );
            total_bytesize += sobj.getByteSize();
        }
    }
View Full Code Here

            nesting_stacks.reset();
            drawn_boxes.reset();


            Iterator sobjs;
            Shadow   sobj;
            Iterator dobjs;
            Drawable dobj;

            // set NestingFactor/RowID of Nestable Real Drawables and Shadows
            dobjs = treetrunk.iteratorOfAllDrawables( timebounds,
                                                      INCRE_STARTTIME_ORDER,
                                                      isConnectedComposite,
                                                      true );
            while ( dobjs.hasNext() ) {
                dobj = (Drawable) dobjs.next();
                if ( dobj.getCategory().isVisible() ) {
                    dobj.setStateRowAndNesting( coord_xform, map_line2row,
                                                nesting_stacks );
                }
            }

            int N_nestable = 0, N_nestless = 0;
            int N_nestable_drawn = 0, N_nestless_drawn = 0;
           
            // Draw Nestable Real Drawables
            dobjs = treetrunk.iteratorOfRealDrawables( timebounds,
                                                       INCRE_STARTTIME_ORDER,
                                                       isConnectedComposite,
                                                       true );
            while ( dobjs.hasNext() ) {
                dobj = (Drawable) dobjs.next();
                if ( dobj.getCategory().isVisible() ) {
                    N_nestable_drawn +=
                    dobj.drawOnCanvas( offGraphics, coord_xform,
                                       map_line2row, drawn_boxes );
                    N_nestable += dobj.getNumOfPrimitives();
                }
            }

            // Draw Nestable Shadows
            sobjs = treetrunk.iteratorOfLowestFloorShadows( timebounds,
                                                          INCRE_STARTTIME_ORDER,
                                                          true );
            while ( sobjs.hasNext() ) {
                sobj = (Shadow) sobjs.next();
                if ( sobj.getCategory().isVisible() ) {
                    N_nestable_drawn +=
                    sobj.drawOnCanvas( offGraphics, coord_xform,
                                       map_line2row, drawn_boxes );
                    N_nestable += sobj.getNumOfPrimitives();
                }
            }

            // Set AntiAliasing from Parameters for all slanted lines
            offGraphics.setRenderingHint( RenderingHints.KEY_ANTIALIASING,
View Full Code Here

                Dialogs.error( root_frame, "Error in updating YaxisMaps!" );
            map_line2row = y_maps.getMapOfLineIDToRowID();
        }

        Iterator sobjs;
        Shadow   sobj;
        Iterator dobjs;
        Drawable dobj;
        Drawable clicked_dobj;

        // Search Nestless Drawables in reverse drawing order
        dobjs = treetrunk.iteratorOfAllDrawables( vport_timeframe,
                                                  DECRE_STARTTIME_ORDER,
                                                  isConnectedComposite,
                                                  false );
        while ( dobjs.hasNext() ) {
            dobj = (Drawable) dobjs.next();
            if ( dobj.getCategory().isVisible() ) {
                clicked_dobj = dobj.getDrawableAt( coord_xform,
                                                   map_line2row,
                                                   local_click );
                if (    clicked_dobj != null
                     && clicked_dobj.getCategory().isVisible() ) {
                    return  new InfoDialogForDrawable( root_frame,
                                                       clicked_time,
                                                       map_line2treeleaf,
                                                       y_colnames,
                                                       t_model,
                                                       clicked_dobj );
                }
            }
        }

        // Search Nestless Shadows in reverse drawing order
        /*
        sobjs = treetrunk.iteratorOfLowestFloorShadows( vport_timeframe,
                                                        DECRE_STARTTIME_ORDER,
                                                        false );
        while ( sobjs.hasNext() ) {
            sobj = (Shadow) sobjs.next();
            if ( sobj.getCategory().isVisible() ) {
                clicked_dobj = sobj.getDrawableAt( coord_xform,
                                                   map_line2row,
                                                   local_click );
                if (    clicked_dobj != null
                     && clicked_dobj.getCategory().isVisible() ) {
                    return  new InfoDialogForDrawable( root_frame,
                                                       clicked_time,
                                                       map_line2treeleaf,
                                                       y_colnames,
                                                       t_model,
                                                       clicked_dobj );
                }
            }
        }
        */
       
        // Search Nestable Shadows in reverse drawing order
        sobjs = treetrunk.iteratorOfLowestFloorShadows( vport_timeframe,
                                                        DECRE_STARTTIME_ORDER,
                                                        true );
        while ( sobjs.hasNext() ) {
            sobj = (Shadow) sobjs.next();
            if ( sobj.getCategory().isVisible() ) {
                clicked_dobj = sobj.getDrawableAt( coord_xform,
                                                   map_line2row,
                                                   local_click );
                if (    clicked_dobj != null
                     && clicked_dobj.getCategory().isVisible() ) {
                    return  new InfoDialogForDrawable( root_frame,
View Full Code Here

TOP

Related Classes of base.drawable.Shadow

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.