use of org.uberfire.ext.widgets.common.client.common.DirtyableHorizontalPane in project drools-wb by kiegroup.
the class RuleModeller method addActionsButtonsToLayout.
private void addActionsButtonsToLayout(String title, ClickHandler addBelowListener, ClickHandler moveDownListener, ClickHandler moveUpListener) {
final DirtyableHorizontalPane hp = new DirtyableHorizontalPane();
Image addPattern = CommonAltedImages.INSTANCE.NewItemBelow();
addPattern.setTitle(title);
addPattern.addClickHandler(addBelowListener);
Image moveDown = CommonAltedImages.INSTANCE.MoveDown();
moveDown.setTitle(GuidedRuleEditorResources.CONSTANTS.MoveDown());
moveDown.addClickHandler(moveDownListener);
Image moveUp = CommonAltedImages.INSTANCE.MoveUp();
moveUp.setTitle(GuidedRuleEditorResources.CONSTANTS.MoveUp());
moveUp.addClickHandler(moveUpListener);
hp.add(addPattern);
hp.add(moveDown);
hp.add(moveUp);
layout.setWidget(currentLayoutRow, 4, hp);
layout.getFlexCellFormatter().setHorizontalAlignment(currentLayoutRow, 4, HasHorizontalAlignment.ALIGN_CENTER);
layout.getFlexCellFormatter().setVerticalAlignment(currentLayoutRow, 4, HasVerticalAlignment.ALIGN_MIDDLE);
}
Aggregations