}
final MyButton removeBtn = widgetFactory.createButton("Remove",
ClusterBrowser.REMOVE_ICON_SMALL,
"Remove " + targetDev);
application.makeMiniButton(removeBtn);
final DiskData diskData = disks.get(targetDev);
if (diskData == null) {
return new Object[]{targetDev, "unknown", removeBtn};
}
final StringBuilder target = new StringBuilder(10);
target.append(diskData.getTargetBusType());
target.append(" : /dev/");
target.append(targetDev);
if (dkti != null) {
mDiskToInfoLock.lock();
final DiskInfo vdi;
try {
vdi = diskToInfo.get(targetDev);
} finally {
mDiskToInfoLock.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 = diskData.getSourceDev();
if (s == null) {
s = diskData.getSourceFile();
}
if (s != null) {
source.append(diskData.getType());
source.append(" : ");
source.append(s);
}
return new Object[]{targetDevLabel, source.toString(), removeBtn};
}