axis_examplecompt_changesinfo-opsversion-2.00version-3.01version-3.02
Last change
on this file since 40dd8c1 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
|
Rev | Line | |
---|
[8780cbec] | 1 | package com.algomagic.atn; |
---|
| 2 | |
---|
| 3 | import java.util.*; |
---|
| 4 | import java.awt.*; |
---|
| 5 | import javax.swing.*; |
---|
| 6 | |
---|
| 7 | |
---|
| 8 | public 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.