00001
00010 package VisuBDD;
00011
00012 import java.awt.*;
00013 import java.awt.event.*;
00014 import java.util.*;
00015
00016
00017 public class FilenameDialog extends Dialog {
00018
00019 private java.util.List filenames;
00020 private int[] fileSequence;
00021
00022
00030 public FilenameDialog(java.util.List filenames, Frame mainWindow) {
00031 super(mainWindow);
00032
00033 Label tmpLabel;
00034
00035 this.fileSequence = ((VisualizeFrame) mainWindow).getFileSequence();
00036
00037 setResizable(false);
00038 setBackground(Color.white);
00039 setTitle("Legend");
00040 setLocation(50, 260);
00041 setLayout(new GridLayout(0, 1));
00042
00043 for (int i = 0; i < filenames.size(); i++) {
00044 tmpLabel = new Label();
00045 tmpLabel.setForeground(ColorAssignment.getColor(i));
00046 tmpLabel.setText(((String) filenames.get(fileSequence[i])));
00047 add(tmpLabel);
00048 }
00049
00050 pack();
00051
00052
00053 addWindowListener(
00054 new WindowAdapter() {
00055 public void windowClosing(WindowEvent evt) {
00056 dispose();
00057
00058 }
00059 }
00060 );
00061
00062 }
00063 }