if (filesystems == null) {
return new Object[0];
}
final MyButton removeBtn = widgetFactory.createButton("Remove", ClusterBrowser.REMOVE_ICON_SMALL, "Remove " + targetDev);
application.makeMiniButton(removeBtn);
final FilesystemData filesystemData = filesystems.get(targetDev);
if (filesystemData == null) {
return new Object[]{targetDev, "unknown", removeBtn};
}
final StringBuilder target = new StringBuilder(10);
target.append(filesystemData.getTargetDir());
if (dkti != null) {
mFilesystemToInfoLock.lock();
FilesystemInfo vdi;
try {
vdi = filesystemToInfo.get(targetDev);
} finally {
mFilesystemToInfoLock.unlock();
}
dkti.put(target.toString(), vdi);
}
final MyButton targetDevLabel = widgetFactory.createButton(target.toString(), BlockDevInfo.HARDDISK_ICON_LARGE);
targetDevLabel.setOpaque(opaque);
final StringBuilder source = new StringBuilder(20);
String s = filesystemData.getSourceDir();
if (s == null) {
s = filesystemData.getSourceDir();
}
if (s != null) {
source.append(filesystemData.getType());
source.append(" : ");
source.append(s);
}
return new Object[]{targetDevLabel, source.toString(), removeBtn};
}