source: fedd/abac-src/atnvis/src/com/algomagic/atn/ProgressPanel.java @ 8780cbec

axis_examplecompt_changesinfo-opsversion-1.30version-2.00version-3.01version-3.02
Last change on this file since 8780cbec was 8780cbec, checked in by Jay Jacobs <Jay.Jacobs@…>, 15 years ago

ABAC sources from Cobham

  • Property mode set to 100644
File size: 700 bytes
Line 
1package com.algomagic.atn;
2
3import java.util.*;
4import java.awt.*;
5import javax.swing.*;
6
7
8public class ProgressPanel 
9    extends JPanel
10    implements Observer
11{
12    JProgressBar _progress;
13
14    public ProgressPanel( ) {
15        super( );
16        setLayout( new BorderLayout( ) );
17
18        _progress = new JProgressBar( 0, 1 );
19        _progress.setValue( 0 );
20        _progress.setStringPainted( true );
21
22        add( _progress, BorderLayout.CENTER );
23
24        PanelHelper.setBorder( this, "Negotiation Progress" );
25    }
26
27    public void setMax( int n ) {
28        _progress.setMaximum( n-1 );
29    }
30
31    public void update( Observable o, Object arg ) {
32        PlayBackController pbc = (PlayBackController)o;
33        _progress.setValue( pbc.getIndex( ) );
34    }
35}
Note: See TracBrowser for help on using the repository browser.