use of org.gwtbootstrap3.client.ui.CheckBox in project drools-wb by kiegroup.
the class AttributeColumnConfigRowView method addHideColumnCheckBox.
public CheckBox addHideColumnCheckBox(AttributeCol52 attributeColumn, ClickHandler clickHandler) {
final CheckBox chkHideColumn = new CheckBox(new StringBuilder(GuidedDecisionTableConstants.INSTANCE.HideThisColumn()).append(GuidedDecisionTableConstants.COLON).toString());
chkHideColumn.setValue(attributeColumn.isHideColumn());
chkHideColumn.addClickHandler(clickHandler);
add(chkHideColumn);
return chkHideColumn;
}
use of org.gwtbootstrap3.client.ui.CheckBox in project drools-wb by kiegroup.
the class AttributeColumnConfigRowView method addReverseOrderCheckBox.
public CheckBox addReverseOrderCheckBox(AttributeCol52 attributeColumn, boolean isEditable, ClickHandler clickHandler) {
final CheckBox chkReverseOrder = new CheckBox(GuidedDecisionTableConstants.INSTANCE.ReverseOrder());
chkReverseOrder.setValue(attributeColumn.isReverseOrder());
chkReverseOrder.setEnabled(attributeColumn.isUseRowNumber() && isEditable);
chkReverseOrder.addClickHandler(clickHandler);
add(chkReverseOrder);
return chkReverseOrder;
}
use of org.gwtbootstrap3.client.ui.CheckBox in project drools-wb by kiegroup.
the class AttributeColumnConfigRowView method addUseRowNumberCheckBox.
public CheckBox addUseRowNumberCheckBox(AttributeCol52 attributeColumn, boolean isEditable, ClickHandler clickHandler) {
final CheckBox chkUseRowNumber = new CheckBox(GuidedDecisionTableConstants.INSTANCE.UseRowNumber());
chkUseRowNumber.setValue(attributeColumn.isUseRowNumber());
chkUseRowNumber.setEnabled(isEditable);
chkUseRowNumber.addClickHandler(clickHandler);
add(chkUseRowNumber);
return chkUseRowNumber;
}
use of org.gwtbootstrap3.client.ui.CheckBox in project drools-wb by kiegroup.
the class RuleModellerConditionSelectorPopup method getContent.
@Override
public Widget getContent() {
if (position == null) {
positionCbo.addItem(GuidedRuleEditorResources.CONSTANTS.Bottom(), String.valueOf(this.model.lhs.length));
positionCbo.addItem(GuidedRuleEditorResources.CONSTANTS.Top(), "0");
for (int i = 1; i < model.lhs.length; i++) {
positionCbo.addItem(GuidedRuleEditorResources.CONSTANTS.Line0(i), String.valueOf(i));
}
} else {
// if position is fixed, we just add one element to the drop down.
positionCbo.addItem(String.valueOf(position));
positionCbo.setSelectedIndex(0);
}
if (oracle.getDSLConditions().size() == 0 && oracle.getFactTypes().length == 0) {
layoutPanel.addRow(new HTML("<div class='highlight'>" + GuidedRuleEditorResources.CONSTANTS.NoModelTip() + "</div>"));
}
// only show the drop down if we are not using fixed position.
if (position == null) {
HorizontalPanel hp0 = new HorizontalPanel();
hp0.add(new HTML(GuidedRuleEditorResources.CONSTANTS.PositionColon()));
hp0.add(positionCbo);
hp0.add(new InfoPopup(GuidedRuleEditorResources.CONSTANTS.PositionColon(), GuidedRuleEditorResources.CONSTANTS.ConditionPositionExplanation()));
layoutPanel.addRow(hp0);
layoutPanel.addRow(new HTML("<hr/>"));
}
choices = makeChoicesListBox();
choicesPanel.add(choices);
layoutPanel.addRow(choicesPanel);
// DSL might be prohibited (e.g. editing a DRL file. Only DSLR files can contain DSL)
if (ruleModeller.isDSLEnabled()) {
CheckBox chkOnlyDisplayDSLConditions = new CheckBox();
chkOnlyDisplayDSLConditions.setText(GuidedRuleEditorResources.CONSTANTS.OnlyDisplayDSLConditions());
chkOnlyDisplayDSLConditions.setValue(onlyShowDSLStatements);
chkOnlyDisplayDSLConditions.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
public void onValueChange(ValueChangeEvent<Boolean> event) {
onlyShowDSLStatements = event.getValue();
choicesPanel.setWidget(makeChoicesListBox());
}
});
layoutPanel.addRow(chkOnlyDisplayDSLConditions);
}
return layoutPanel;
}
Aggregations