Search in sources :

Example 1 with NumericShortTextBox

use of org.uberfire.ext.widgets.common.client.common.NumericShortTextBox 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;
}
Also used : NumericShortTextBox(org.uberfire.ext.widgets.common.client.common.NumericShortTextBox) ChangeEvent(com.google.gwt.event.dom.client.ChangeEvent) ValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler) ActionSetFieldCol52(org.drools.workbench.models.guided.dtable.shared.model.ActionSetFieldCol52) OperatorsOracle(org.kie.soup.project.datamodel.oracle.OperatorsOracle) NumericBigDecimalTextBox(org.uberfire.ext.widgets.common.client.common.NumericBigDecimalTextBox) ValueChangeEvent(com.google.gwt.event.logical.shared.ValueChangeEvent) GuidedDecisionTableConstants(org.drools.workbench.screens.guided.dtable.client.resources.i18n.GuidedDecisionTableConstants) Arrays(java.util.Arrays) DataType(org.kie.soup.project.datamodel.oracle.DataType) BaseColumn(org.drools.workbench.models.guided.dtable.shared.model.BaseColumn) ConditionCol52(org.drools.workbench.models.guided.dtable.shared.model.ConditionCol52) ApplicationPreferences(org.kie.workbench.common.services.shared.preferences.ApplicationPreferences) ListBox(org.gwtbootstrap3.client.ui.ListBox) ChangeHandler(com.google.gwt.event.dom.client.ChangeHandler) Function(java.util.function.Function) LimitedEntryDropDownManager(org.drools.workbench.screens.guided.dtable.client.widget.table.utilities.LimitedEntryDropDownManager) BigDecimal(java.math.BigDecimal) DateTimeFormat(com.google.gwt.i18n.client.DateTimeFormat) DatePicker(org.uberfire.ext.widgets.common.client.common.DatePicker) AbstractRestrictedEntryTextBox(org.uberfire.ext.widgets.common.client.common.AbstractRestrictedEntryTextBox) Map(java.util.Map) BigInteger(java.math.BigInteger) Pattern52(org.drools.workbench.models.guided.dtable.shared.model.Pattern52) DefaultValueDropDownManager(org.drools.workbench.screens.guided.dtable.client.widget.table.utilities.DefaultValueDropDownManager) DropDownData(org.kie.soup.project.datamodel.oracle.DropDownData) DTColumnConfig52(org.drools.workbench.models.guided.dtable.shared.model.DTColumnConfig52) NumericShortTextBox(org.uberfire.ext.widgets.common.client.common.NumericShortTextBox) NumericTextBox(org.uberfire.ext.widgets.common.client.common.NumericTextBox) NumericIntegerTextBox(org.uberfire.ext.widgets.common.client.common.NumericIntegerTextBox) GuidedDecisionTable52(org.drools.workbench.models.guided.dtable.shared.model.GuidedDecisionTable52) LimitedEntryCol(org.drools.workbench.models.guided.dtable.shared.model.LimitedEntryCol) Set(java.util.Set) TextBox(org.gwtbootstrap3.client.ui.TextBox) ActionInsertFactCol52(org.drools.workbench.models.guided.dtable.shared.model.ActionInsertFactCol52) AsyncPackageDataModelOracle(org.kie.workbench.common.widgets.client.datamodel.AsyncPackageDataModelOracle) ColumnUtilities(org.drools.workbench.screens.guided.dtable.client.widget.table.utilities.ColumnUtilities) EnumDropDownUtilities(org.kie.workbench.common.widgets.client.widget.EnumDropDownUtilities) List(java.util.List) Widget(com.google.gwt.user.client.ui.Widget) NumericLongTextBox(org.uberfire.ext.widgets.common.client.common.NumericLongTextBox) Label(org.gwtbootstrap3.client.ui.Label) NumericDoubleTextBox(org.uberfire.ext.widgets.common.client.common.NumericDoubleTextBox) NumericFloatTextBox(org.uberfire.ext.widgets.common.client.common.NumericFloatTextBox) NumericByteTextBox(org.uberfire.ext.widgets.common.client.common.NumericByteTextBox) NumericBigIntegerTextBox(org.uberfire.ext.widgets.common.client.common.NumericBigIntegerTextBox) DTCellValue52(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52) AbstractRestrictedEntryTextBox(org.uberfire.ext.widgets.common.client.common.AbstractRestrictedEntryTextBox)

Aggregations

ChangeEvent (com.google.gwt.event.dom.client.ChangeEvent)1 ChangeHandler (com.google.gwt.event.dom.client.ChangeHandler)1 ValueChangeEvent (com.google.gwt.event.logical.shared.ValueChangeEvent)1 ValueChangeHandler (com.google.gwt.event.logical.shared.ValueChangeHandler)1 DateTimeFormat (com.google.gwt.i18n.client.DateTimeFormat)1 Widget (com.google.gwt.user.client.ui.Widget)1 BigDecimal (java.math.BigDecimal)1 BigInteger (java.math.BigInteger)1 Arrays (java.util.Arrays)1 List (java.util.List)1 Map (java.util.Map)1 Set (java.util.Set)1 Function (java.util.function.Function)1 ActionInsertFactCol52 (org.drools.workbench.models.guided.dtable.shared.model.ActionInsertFactCol52)1 ActionSetFieldCol52 (org.drools.workbench.models.guided.dtable.shared.model.ActionSetFieldCol52)1 BaseColumn (org.drools.workbench.models.guided.dtable.shared.model.BaseColumn)1 ConditionCol52 (org.drools.workbench.models.guided.dtable.shared.model.ConditionCol52)1 DTCellValue52 (org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52)1 DTColumnConfig52 (org.drools.workbench.models.guided.dtable.shared.model.DTColumnConfig52)1 GuidedDecisionTable52 (org.drools.workbench.models.guided.dtable.shared.model.GuidedDecisionTable52)1