Package net.sourceforge.parus.ntrviewer.info

Examples of net.sourceforge.parus.ntrviewer.info.NetworkInfo


        group.addEventLink( SelectionChangedEvent.class, controller, "changeVisualization" );
        return form;
    }

    public void update() {
        NetworkInfo model = controller.getModel();
        if ( model != null ) {
            processorsCount.setText( Integer.toString( model.getProcessorsCount() ) );
            type.setText( model.getType() );
            startMessageLength.setText( Integer.toString( model.getStartMessageLength() ) );
            endMessageLength.setText( Integer.toString( model.getEndMessageLength() ) );
            messageLengthStep.setText( Integer.toString( model.getMessageLengthStep() ) );
            repeatsCount.setText( Integer.toString( model.getRepeatsCount() ) );
            noiseMessageLength.setText( Integer.toString( model.getNoiseMessageLength() ) );
            noiseProcessesCount.setText( Integer.toString( model.getNoiseProcessesCount() ) );
        } else {
            processorsCount.setText( "No data" );
            type.setText( "No data" );
            startMessageLength.setText( "No data" );
            endMessageLength.setText( "No data" );
View Full Code Here


    public String getName() {
        return "One to one";
    }

    public void update() {
        NetworkInfo model = controller.getModel();
        if ( model != null ) {
            startProcessorsList.setContents( model.getProcessorNames() );
            endProcessorsList.setContents( model.getProcessorNames() );
            startProcessorsList.setSelectedIndex( 0 );
            endProcessorsList.setSelectedIndex( 1 );
            updateChart();
        }
    }
View Full Code Here

            updateChart();
        }
    }

    public void updateChart() {
        NetworkInfo model = controller.getModel();
        if ( model != null ) {
            for ( int i = 0; i < data.getSeriesCount(); i++ ) data.removeSeries( data.getSeriesKey( i ) );
            double[][] matrix = model.delaysBetweenTwoProcessors( startProcessorsList.getSelectedIndex(), endProcessorsList.getSelectedIndex() );
            data.addSeries( "(" + model.getProcessorName( startProcessorsList.getSelectedIndex() ) + ", " + model.getProcessorName( endProcessorsList.getSelectedIndex() ) + ")", matrix );
        }
    }
View Full Code Here

    public String getName() {
        return "One to many";
    }

    public void update() {
        NetworkInfo model = controller.getModel();
        if ( model != null ) {
            processorList.setContents( model.getProcessorNames() );
            processorList.setSelected( 0, true );
            messageLengthSlider.setMinimum( model.getStartMessageLength() );
            messageLengthSlider.setMaximum( model.getEndMessageLength() );
            messageLengthSlider.setMajorTickSpacing( model.getMessageLengthStep() );
            messageLengthSlider.setMinorTickSpacing( model.getMessageLengthStep() );
            messageLengthSlider.setSnapToTicks( true );
            messageLengthSlider.setShowLabels( true );
            messageLengthSlider.setShowTicks( true );
            updateChart();
        }
View Full Code Here

            updateChart();
        }
    }

    private void updateChart() {
        NetworkInfo model = controller.getModel();
        if ( model != null ) {
            data.clear();
            int[] indices = processorList.getSelectedIndices();
            for ( int processorNumber : indices ) {
                double[] delays = model.delayBetweenOneAndOthers( messageLengthSlider.getValue(), processorNumber );
                for ( int i = 0; i < delays.length; i++ ) {
                    data.addValue( delays[i] * 1000, model.getProcessorName( processorNumber ), model.getProcessorName( i ) );
                }
            }
        }

    }
View Full Code Here

TOP

Related Classes of net.sourceforge.parus.ntrviewer.info.NetworkInfo

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.