// Determine the new icon and tooltip
String newTooltip = null ;
ImageIcon newIcon = null ;
int cursorType = Cursor.HAND_CURSOR ;
FileInfo currentFile = this.model.getSelectedFileInfo() ;
PlugInInfo newAnalyzer = null ;
boolean formatIsUnknown = true ;
if (currentFile != null) {
newAnalyzer = this.model.getAnalyzer(
currentFile.getIdFormat()) ;
formatIsUnknown = (newAnalyzer == null) ;
}// if
if (formatIsUnknown) {
newTooltip = sl.getText(UNKNOWN_FORMAT) ;
newIcon = UNKNOWN_FORMAT_IMAGE ;
cursorType = Cursor.HAND_CURSOR ;
this.currentAnalyzer = null ;
} else {
// A new icon has to be loaded
if (!newAnalyzer.equals(this.currentAnalyzer)) {
newTooltip = newAnalyzer.getFormatName() ;
newIcon = new ImageIcon(
ImageUtility.getImageBytes(String.format(
COLOR_ICON, newAnalyzer.getId()))) ;
this.currentAnalyzer = newAnalyzer ;
}// if
}// if
// Do the actual updating, if necessary