use of org.uberfire.ext.widgets.common.client.common.AbstractRestrictedEntryTextBox in project drools-wb by kiegroup.
the class DTCellValueWidgetFactory method makeNumericBigDecimalTextBox.
private AbstractRestrictedEntryTextBox makeNumericBigDecimalTextBox(final DTCellValue52 value) {
final AbstractRestrictedEntryTextBox tb = new NumericBigDecimalTextBox(allowEmptyValues);
final BigDecimal numericValue = (BigDecimal) value.getNumericValue();
tb.setValue(numericValue == null ? "" : numericValue.toPlainString());
// Wire up update handler
tb.setEnabled(!isReadOnly);
addNumericTextBoxChangeHandler(tb, value, (input -> new BigDecimal(input)), (BigDecimal) null, BigDecimal.ZERO);
return tb;
}
use of org.uberfire.ext.widgets.common.client.common.AbstractRestrictedEntryTextBox in project drools-wb by kiegroup.
the class DTCellValueWidgetFactory method makeNumericTextBox.
private AbstractRestrictedEntryTextBox makeNumericTextBox(final DTCellValue52 value) {
final AbstractRestrictedEntryTextBox tb = new NumericTextBox(allowEmptyValues);
final BigDecimal numericValue = (BigDecimal) value.getNumericValue();
tb.setValue(numericValue == null ? "" : numericValue.toPlainString());
// Wire up update handler
tb.setEnabled(!isReadOnly);
addNumericTextBoxChangeHandler(tb, value, (input -> new BigDecimal(input)), (BigDecimal) null, BigDecimal.ZERO);
return tb;
}
use of org.uberfire.ext.widgets.common.client.common.AbstractRestrictedEntryTextBox in project drools-wb by kiegroup.
the class DTCellValueWidgetFactory method makeNumericLongTextBox.
private AbstractRestrictedEntryTextBox makeNumericLongTextBox(final DTCellValue52 value) {
final AbstractRestrictedEntryTextBox tb = new NumericLongTextBox(allowEmptyValues);
final Long numericValue = (Long) value.getNumericValue();
tb.setValue(numericValue == null ? "" : numericValue.toString());
// Wire up update handler
tb.setEnabled(!isReadOnly);
addNumericTextBoxChangeHandler(tb, value, (input -> Long.valueOf(input)), (Long) null, 0L);
return tb;
}
use of org.uberfire.ext.widgets.common.client.common.AbstractRestrictedEntryTextBox in project drools-wb by kiegroup.
the class DTCellValueWidgetFactory method makeNumericShortTextBox.
private AbstractRestrictedEntryTextBox makeNumericShortTextBox(final DTCellValue52 value) {
final AbstractRestrictedEntryTextBox tb = new NumericShortTextBox(allowEmptyValues);
final Short numericValue = (Short) value.getNumericValue();
tb.setValue(numericValue == null ? "" : numericValue.toString());
// Wire up update handler
tb.setEnabled(!isReadOnly);
addNumericTextBoxChangeHandler(tb, value, (input -> Short.valueOf(input)), (Short) null, Short.valueOf("0"));
return tb;
}
use of org.uberfire.ext.widgets.common.client.common.AbstractRestrictedEntryTextBox in project drools-wb by kiegroup.
the class CEPWindowOperatorsDropdown method operatorChanged.
// Hide\display the additional CEP widget is appropriate
private void operatorChanged(OperatorSelection selection) {
parametersContainer.clear();
String operator = selection.getValue();
if (CEPOracle.isCEPWindowOperatorTime(operator)) {
AbstractRestrictedEntryTextBox txt = new CEPTimeParameterTextBox(hcw.getWindow(), 1);
initialiseTextBox(txt);
} else if (CEPOracle.isCEPWindowOperatorLength(operator)) {
AbstractRestrictedEntryTextBox txt = new CEPLengthParameterTextBox(hcw.getWindow(), 1);
initialiseTextBox(txt);
} else {
parametersContainer.setVisible(false);
hcw.getWindow().clearParameters();
}
}
Aggregations