use of com.archimatetool.editor.diagram.figures.ToolTipFigure in project archi by archimatetool.
the class AbstractArchimateConnectionFigure method getToolTip.
@Override
public IFigure getToolTip() {
ToolTipFigure toolTipFigure = (ToolTipFigure) super.getToolTip();
if (toolTipFigure == null) {
return null;
}
IArchimateRelationship relation = getModelConnection().getArchimateRelationship();
String text = ArchiLabelProvider.INSTANCE.getLabel(relation);
toolTipFigure.setText(text);
String type = ArchiLabelProvider.INSTANCE.getDefaultName(relation.eClass());
// $NON-NLS-1$
toolTipFigure.setType(Messages.AbstractArchimateConnectionFigure_0 + " " + type);
String rubric = ArchiLabelProvider.INSTANCE.getRelationshipSentence(relation);
toolTipFigure.setRubric(rubric);
return toolTipFigure;
}
use of com.archimatetool.editor.diagram.figures.ToolTipFigure in project archi by archimatetool.
the class AccessConnectionFigure method getToolTip.
@Override
public IFigure getToolTip() {
ToolTipFigure tooltip = (ToolTipFigure) super.getToolTip();
if (tooltip == null) {
return null;
}
// Show access type in tooltip
IAccessRelationship relation = (IAccessRelationship) getModelConnection().getArchimateRelationship();
String type = ArchiLabelProvider.INSTANCE.getDefaultName(relation.eClass());
switch(relation.getAccessType()) {
case IAccessRelationship.WRITE_ACCESS:
// $NON-NLS-1$
type += " " + Messages.AccessConnectionFigure_0;
break;
case IAccessRelationship.READ_ACCESS:
// $NON-NLS-1$
type += " " + Messages.AccessConnectionFigure_1;
break;
case IAccessRelationship.UNSPECIFIED_ACCESS:
// $NON-NLS-1$
type += " " + Messages.AccessConnectionFigure_2;
break;
case IAccessRelationship.READ_WRITE_ACCESS:
// $NON-NLS-1$
type += " " + Messages.AccessConnectionFigure_3;
break;
default:
break;
}
// $NON-NLS-1$
tooltip.setType(Messages.AccessConnectionFigure_4 + " " + type);
return tooltip;
}
Aggregations