edu.rice.cs.drjava.ui
Class MainFrame.OddDisplayManager
java.lang.Object
edu.rice.cs.drjava.ui.MainFrame.OddDisplayManager
- All Implemented Interfaces:
- DisplayManager<OpenDefinitionsDocument>
- Enclosing class:
- MainFrame
private static class MainFrame.OddDisplayManager
- extends Object
- implements DisplayManager<OpenDefinitionsDocument>
This class wraps the file display managers by superimposing any notification icons on top of the base
file icon. Currently, only the modified star is allowed, but everything is set up to add notification
icons for whether a document has passed the junit test (for display in the tree). This class is static
for now. It may be necessary to make it dynamic when implementing the junit notifications.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_star
private final Icon _star
_default
private final FileDisplayManager _default
MainFrame.OddDisplayManager
public MainFrame.OddDisplayManager(FileDisplayManager fdm,
Icon star,
Icon junitPass,
Icon junitFail)
- Standard constructor.
- Parameters:
star - The star icon will be put flush to the left 1/4 the way downjunitPass - indicator of junit success, placed at bottom rightjunitFail - indicator of junit failure, placed at bottom right
getIcon
public Icon getIcon(OpenDefinitionsDocument odd)
- Description copied from interface:
DisplayManager
- Given a piece of data, decide which icon to use
- Specified by:
getIcon in interface DisplayManager<OpenDefinitionsDocument>
- Parameters:
odd - The data to base the icon decision on
- Returns:
- The icon to display for the given data
getName
public String getName(OpenDefinitionsDocument doc)
- Description copied from interface:
DisplayManager
- Given a data, decide on which name to display for it
- Specified by:
getName in interface DisplayManager<OpenDefinitionsDocument>
- Parameters:
doc - The data to base the naming decison on
- Returns:
- The name to display for the data
makeLayeredIcon
private LayeredIcon makeLayeredIcon(Icon base,
Icon star)