Search in sources :

Example 81 with FlowPanel

use of com.google.gwt.user.client.ui.FlowPanel in project drools-wb by kiegroup.

the class ColumnManagementView method renderColumn.

List<HorizontalPanel> renderColumn(final Pattern52 pattern) {
    final List<HorizontalPanel> conditions = new ArrayList<>();
    for (ConditionCol52 conditionColumn : pattern.getChildColumns()) {
        final HorizontalPanel condition = newHorizontalPanel();
        final ColumnLabelWidget conditionLabel = makeColumnLabel(conditionColumn);
        condition.add(conditionLabel);
        final FlowPanel buttons = new FlowPanel() {

            {
                add(editAnchor((clickEvent) -> {
                    presenter.getActiveDecisionTable().ifPresent(dt -> dt.editCondition(pattern, conditionColumn));
                }));
                if (presenter.isActiveDecisionTableEditable()) {
                    add(removeCondition(conditionColumn));
                }
            }
        };
        condition.add(buttons);
        conditions.add(condition);
    }
    return conditions;
}
Also used : BRLConditionColumn(org.drools.workbench.models.guided.dtable.shared.model.BRLConditionColumn) VerticalPanel(com.google.gwt.user.client.ui.VerticalPanel) BaseColumn(org.drools.workbench.models.guided.dtable.shared.model.BaseColumn) ConditionCol52(org.drools.workbench.models.guided.dtable.shared.model.ConditionCol52) ManagedInstance(org.jboss.errai.ioc.client.api.ManagedInstance) GuidedDecisionTableModellerView(org.drools.workbench.screens.guided.dtable.client.widget.table.GuidedDecisionTableModellerView) ColumnUtilities(org.drools.workbench.screens.guided.dtable.client.widget.table.utilities.ColumnUtilities) ClickHandler(com.google.gwt.event.dom.client.ClickHandler) ArrayList(java.util.ArrayList) VetoDeletePatternInUseException(org.drools.workbench.screens.guided.dtable.client.widget.table.model.synchronizers.ModelSynchronizer.VetoDeletePatternInUseException) Inject(javax.inject.Inject) VetoException(org.drools.workbench.screens.guided.dtable.client.widget.table.model.synchronizers.ModelSynchronizer.VetoException) List(java.util.List) Widget(com.google.gwt.user.client.ui.Widget) FlowPanel(com.google.gwt.user.client.ui.FlowPanel) Command(com.google.gwt.user.client.Command) Dependent(javax.enterprise.context.Dependent) Label(com.google.gwt.user.client.ui.Label) Map(java.util.Map) HorizontalPanel(com.google.gwt.user.client.ui.HorizontalPanel) ActionCol52(org.drools.workbench.models.guided.dtable.shared.model.ActionCol52) GuidedDecisionTableView(org.drools.workbench.screens.guided.dtable.client.widget.table.GuidedDecisionTableView) Optional(java.util.Optional) Pattern52(org.drools.workbench.models.guided.dtable.shared.model.Pattern52) ConditionCol52(org.drools.workbench.models.guided.dtable.shared.model.ConditionCol52) HorizontalPanel(com.google.gwt.user.client.ui.HorizontalPanel) ArrayList(java.util.ArrayList) FlowPanel(com.google.gwt.user.client.ui.FlowPanel)

Aggregations

FlowPanel (com.google.gwt.user.client.ui.FlowPanel)81 ClickHandler (com.google.gwt.event.dom.client.ClickHandler)18 ClickEvent (com.google.gwt.event.dom.client.ClickEvent)15 Button (com.google.gwt.user.client.ui.Button)14 Label (com.google.gwt.user.client.ui.Label)12 Grid (com.google.gwt.user.client.ui.Grid)10 VerticalPanel (com.google.gwt.user.client.ui.VerticalPanel)8 HorizontalPanel (com.google.gwt.user.client.ui.HorizontalPanel)7 SmallHeading (com.google.gerrit.client.ui.SmallHeading)6 Element (com.google.gwt.dom.client.Element)6 CheckBox (com.google.gwt.user.client.ui.CheckBox)6 CellFormatter (com.google.gwt.user.client.ui.HTMLTable.CellFormatter)6 InlineLabel (com.google.gwt.user.client.ui.InlineLabel)6 Widget (com.google.gwt.user.client.ui.Widget)6 Test (org.junit.Test)6 ComplexPanel (com.google.gwt.user.client.ui.ComplexPanel)5 HTML (com.google.gwt.user.client.ui.HTML)5 Image (com.google.gwt.user.client.ui.Image)5 IsWidget (com.google.gwt.user.client.ui.IsWidget)5 List (java.util.List)4