use of org.gephi.layout.spi.LayoutUI in project gephi by gephi.
the class LayoutPanel method buildTooltip.
private RichTooltip buildTooltip(LayoutBuilder builder) {
String description = "";
LayoutUI layoutUI = null;
try {
layoutUI = builder.getUI();
if (layoutUI.getDescription() != null) {
description = layoutUI.getDescription();
}
if (layoutUI.getQualityRank() < 0 || layoutUI.getSpeedRank() < 0) {
layoutUI = null;
}
} catch (Exception e) {
layoutUI = null;
}
RichTooltip richTooltip = new RichTooltip(builder.getName(), description);
if (layoutUI != null) {
LayoutDescriptionImage layoutDescriptionImage = new LayoutDescriptionImage(layoutUI);
richTooltip.setMainImage(layoutDescriptionImage.getImage());
}
return richTooltip;
}
Aggregations