FileDocCategorySizeDatePackage
FolderViewer.javaAPI DocGlassfish v2 API3511Wed Dec 14 11:56:12 GMT 2005None

FolderViewer

public class FolderViewer extends JPanel
version
1.12, 05/11/16
author
Christopher Cotton
author
Bill Shannon

Fields Summary
FolderModel
model
JScrollPane
scrollpane
JTable
table
Constructors Summary
public FolderViewer()


      
	this(null);
    
public FolderViewer(Folder what)

	super(new GridLayout(1,1));

	table = new JTable(model);
	table.setShowGrid(false);

	scrollpane = new JScrollPane(table);

	// setup the folder we were given
	setFolder(what);
	
	// find out what is pressed
	table.getSelectionModel().addListSelectionListener(
	    new FolderPressed());
	scrollpane.setPreferredSize(new Dimension(700, 300));
	add(scrollpane);
    
Methods Summary
public voidsetFolder(javax.mail.Folder what)
Change the current Folder for the Viewer

param
what the folder to be viewed

	try {
	    table.getSelectionModel().clearSelection();
	    if (SimpleClient.mv != null)
		SimpleClient.mv.setMessage(null);
	    model.setFolder(what);
	    scrollpane.invalidate();
	    scrollpane.validate();
	} catch (MessagingException me) {
	    me.printStackTrace();
	}