use of org.jkiss.dbeaver.erd.model.ERDEntity in project dbeaver by serge-rider.
the class EntityFigure method createToolTip.
@NotNull
private IFigure createToolTip() {
ERDEntity entity = part.getEntity();
DBPDataSourceContainer dataSource = entity.getDataSource().getContainer();
Figure toolTip = new Figure();
toolTip.setOpaque(true);
// toolTip.setPreferredSize(300, 200);
toolTip.setBorder(getBorder());
toolTip.setLayoutManager(new GridLayout(1, false));
{
Label dsLabel = new Label(dataSource.getName());
dsLabel.setIcon(DBeaverIcons.getImage(dataSource.getDriver().getIcon()));
dsLabel.setBorder(new MarginBorder(2));
toolTip.add(dsLabel);
}
{
Label entityLabel = new Label(DBUtils.getObjectFullName(entity.getObject(), DBPEvaluationContext.UI));
entityLabel.setIcon(DBeaverIcons.getImage(entity.getObject().getEntityType().getIcon()));
entityLabel.setBorder(new MarginBorder(2));
toolTip.add(entityLabel);
}
return toolTip;
}
Aggregations