@Override
protected Figure createAlignmentFigure(final W widget, final boolean horizontal) {
IEditPartViewer viewer = getHost().getViewer();
final Anchor anchor = m_panel.getAnchor(widget, horizontal);
if (horizontal) {
return new AbstractPopupFigure(viewer, 16, 8) {
@Override
protected Image getImage() {
return anchor != null ? anchor.getSmallImage(horizontal) : null;
}
@Override
protected void fillMenu(IMenuManager manager) {
addAlignmentActions(manager, widget, horizontal);
}
};
} else {
return new AbstractPopupFigure(viewer, 8, 16) {
@Override
protected Image getImage() {
return anchor != null ? anchor.getSmallImage(horizontal) : null;
}