public void setFile(File file) {
		if(file != null) {
			this.file = file;
			
			// Replace the label by the file's name.
			this.setLabel(file.getName());
			
			// Change the icon, depending if the file is a folder or not.
			this.updateIcon();
		}
	}
public void setFile ( File file ) { if ( file != null ) { this . file = file ; this . setLabel ( file . getName ( ) ) ; this . updateIcon ( ) ; } }
Defines the file represented by this item.

@param file A file.