Package bm.core.event

Examples of bm.core.event.ProgressEvent.dispatch()


                count = MAX_RECORDS;
            }
            pe.setAnimate( false );
            pe.setMaxValue( new Integer( count ) );
            pe.setCurrentValue( 0 );
            pe.dispatch();
            int index = first;
            for( int i = 0; i < count; i++, index++ )
            {
                final ByteArrayInputStream bais = new ByteArrayInputStream(
                        rs.getRecord( index )
View Full Code Here


                final DataInputStream dis = new DataInputStream( bais );
                final SerializerInputStream in =
                        new SerializerInputStream( dis );
                buffer.append( in.readString() ).append( '\n' );
                pe.increment();
                pe.dispatch();
            }
            return buffer.toString();
        }
        catch( Exception e )
        {
View Full Code Here

        try
        {
            pe.setAnimate( true );
            pe.setPhase( ResourceManager.getResource( "errorlog.building" ) );
            pe.setMessage( "" );
            pe.dispatch();
            rs = RecordStore.openRecordStore( RS_NAME, true );
            int first = 1;
            int count = rs.getNumRecords();
            if( count > MAX_RECORDS )
            {
View Full Code Here

            }
            out.writeShort( (short) count );
            pe.setAnimate( false );
            pe.setMaxValue( new Integer( count ) );
            pe.setCurrentValue( 0 );
            pe.dispatch();
            //noinspection MethodCallInLoopCondition
            int index = first;
            for( int i = 0; i < count; i++, index++ )
            {
                out.write( rs.getRecord( index ) );
View Full Code Here

            int index = first;
            for( int i = 0; i < count; i++, index++ )
            {
                out.write( rs.getRecord( index ) );
                pe.increment();
                pe.dispatch();
            }
        }
        catch( Exception e )
        {
            log.error( e );
View Full Code Here

            event.setMaxValue( new Integer( -1 ) );
            final String searching = ResourceManager.getResource( "global.Searching" );
            event.setMessage( "" );
            event.setPhase( searching );
            event.setSource( this );
            event.dispatch();

            open();
            final Index index = (Index) indexMap.get( Constants.REMOTE_ID );
            int[] recordIds = null;
            // If there's an index on remote id use the index buildSortedList
View Full Code Here

                se = rs.enumerateRecords();
                final int count = se.numRecords();
                event.setAnimate( false );
                event.setCurrentValue( 0 );
                event.setMaxValue( new Integer( count ) );
                event.dispatch();
                recordIds = new int[ count ];
                for( int i = 0; se.hasNext(); i++ )
                {
                    recordIds[i] = se.nextId();
                    if( i % 10 == 0 )
View Full Code Here

                {
                    recordIds[i] = se.nextId();
                    if( i % 10 == 0 )
                    {
                        event.setCurrentValue( i );
                        event.dispatch();
                    }
                }
            }
            return new RowSet( this, recordIds, null, null, RowSet.SM_EXACT );
        }
View Full Code Here

        final ProgressEvent event = new ProgressEvent();
        event.setAnimate( true );
        event.setMessage( "" );
        event.setPhase( ResourceManager.getResource( "global.packing" ) );
        event.setSource( this );
        event.dispatch();

        StoreEnumeration se = null;
        try
        {
            open();
View Full Code Here

            se = rs.enumerateRecords();
            final int count = se.numRecords();
            event.setAnimate( false );
            event.setCurrentValue( 0 );
            event.setMaxValue( new Integer( count ) );
            event.dispatch();
            for( int i = 0; se.hasNext(); i++ )
            {
                final int recordId = se.nextId();
                final byte[] data = rs.getRecord( recordId );
                if( data != null && data[Row.STATUS_BYTE] == Row.STATUS_DELETED )
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.