/* $Id: REQueryPanel.java 125 2011-03-09 09:49:51Z ohura $ */
package smart_gs.image_search.research.swingui;

import java.awt.BorderLayout;
import java.util.List;

import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.border.TitledBorder;

import smart_gs.image_search.logical.GSQuery;

@SuppressWarnings("serial")
public class REQueryPanel extends JPanel{
	
	private List<GSQuery> queries;
	
	public REQueryPanel(List<GSQuery> queries) {
		this.queries = queries;
		for(int i=0;i<this.queries.size();i++){
			GSQuery query = this.queries.get(i);
			JLabel label = new JLabel(new ImageIcon(query.getQueryImage()));
			JPanel p = new JPanel(new BorderLayout());
			p.add(label,BorderLayout.CENTER);
			p.setBorder(new TitledBorder("Query "+i));
			this.add(p);
		}
	}
}
