edu.rice.cs.drjava.ui
Class MainFrame.DJFileDisplayManager

java.lang.Object
  extended by edu.rice.cs.util.swing.DefaultFileDisplayManager
      extended by edu.rice.cs.drjava.ui.MainFrame.DJFileDisplayManager
All Implemented Interfaces:
DisplayManager<File>, FileDisplayManager
Enclosing class:
MainFrame

private static class MainFrame.DJFileDisplayManager
extends DefaultFileDisplayManager

This manager is meant to retrieve the correct icons for the given filename. The only files recognized are the files obviously listed below in the function (.java, .dj0, .dj1, .dj2, .dj). The icons that represent each filetype are given into the managers constructor upon instantiation. This class is static since it currently does not depend of the main frame for information.


Field Summary
private  Icon _dj
           
private  Icon _dj0
           
private  Icon _dj1
           
private  Icon _dj2
           
private  Icon _java
           
private  Icon _other
           
 
Constructor Summary
MainFrame.DJFileDisplayManager(Icon java, Icon dj0, Icon dj1, Icon dj2, Icon dj, Icon other)
           
 
Method Summary
 Icon getIcon(File f)
          This method chooses the custom icon only for the known filetypes.
 
Methods inherited from class edu.rice.cs.util.swing.DefaultFileDisplayManager
getName, makeFileDisplay, makeFileDisplay, makeNewFolderDisplay, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_java

private final Icon _java

_dj0

private final Icon _dj0

_dj1

private final Icon _dj1

_dj2

private final Icon _dj2

_dj

private final Icon _dj

_other

private final Icon _other
Constructor Detail

MainFrame.DJFileDisplayManager

public MainFrame.DJFileDisplayManager(Icon java,
                                      Icon dj0,
                                      Icon dj1,
                                      Icon dj2,
                                      Icon dj,
                                      Icon other)
Method Detail

getIcon

public Icon getIcon(File f)
This method chooses the custom icon only for the known filetypes. If these filetypes are not receiving the correct icons, make sure the filenames are correct and that the icons are present in the ui/icons directory.

Specified by:
getIcon in interface DisplayManager<File>
Overrides:
getIcon in class DefaultFileDisplayManager
Parameters:
f - The file to base the icon decision on
Returns:
The icon to display for the given file