diff options
| author | pjain <pjain@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-04-25 18:17:02 +0000 |
|---|---|---|
| committer | pjain <pjain@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-04-25 18:17:02 +0000 |
| commit | ecb69a6cb04bb925efe017529e52ce0064227f7a (patch) | |
| tree | a2a80f240b59b00a370536eb06d7a8d96394cea3 /java/ImageProcessing/framework/StatusIndicator.java | |
| parent | 2e64cf5aa0c0686b211f6566d8e189b37a74eff9 (diff) | |
| download | ATCD-ecb69a6cb04bb925efe017529e52ce0064227f7a.tar.gz | |
New files used to show status of image being uploaded
Diffstat (limited to 'java/ImageProcessing/framework/StatusIndicator.java')
| -rw-r--r-- | java/ImageProcessing/framework/StatusIndicator.java | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/java/ImageProcessing/framework/StatusIndicator.java b/java/ImageProcessing/framework/StatusIndicator.java new file mode 100644 index 00000000000..3526bc550d5 --- /dev/null +++ b/java/ImageProcessing/framework/StatusIndicator.java @@ -0,0 +1,47 @@ +package imaging.framework; + +import java.io.*; +import java.awt.*; + +public class StatusIndicator extends Frame +{ + public StatusIndicator (String title) + { + super (title); + + this.setLayout (new BorderLayout ()); + this.add ("Center", textCanvas_); + // this.add ("Center", new Button ("Hello")); + this.add ("South", new Button ("Hello")); + this.resize (300,200); + this.show (); + } + + public void update (int count) + { + textCanvas_.setCount (count); + } + + CounterCanvas textCanvas_ = new CounterCanvas (); +} + +class CounterCanvas extends Canvas +{ + public void paint (Graphics g) + { + g.clearRect (0, 0, this.size ().width, this.size ().height); + g.setFont (new Font ("TimesRoman", Font.PLAIN, 18)); + this.setBackground (Color.white); + g.drawString ("Generating GIF format: ", 20, 20); + g.drawString ((new Integer (count_)).toString (), 200, 20); + } + + public void setCount (int count) + { + count_ = count; + repaint (); + } + + int count_ = 0; +} + |
