}
@Override
protected Figure createAlignmentFigure(IAbstractComponentInfo component, boolean horizontal) {
IEditPartViewer viewer = getHost().getViewer();
final CellConstraintsSupport constraints = HTMLTableInfo.getConstraints((WidgetInfo) component);
if (horizontal) {
return new AbstractPopupFigure(viewer, 9, 5) {
@Override
protected Image getImage() {
return constraints.getHorizontalAlignment().getSmallImage();
}
@Override
protected void fillMenu(IMenuManager manager) {
constraints.fillHorizontalAlignmentMenu(manager);
}
};
} else {
return new AbstractPopupFigure(viewer, 5, 9) {
@Override
protected Image getImage() {
return constraints.getVerticalAlignment().getSmallImage();
}
@Override
protected void fillMenu(IMenuManager manager) {
constraints.fillVerticalAlignmentMenu(manager);
}
};
}
}