• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java TextBox类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.gwtbootstrap3.client.ui.TextBox的典型用法代码示例。如果您正苦于以下问题:Java TextBox类的具体用法?Java TextBox怎么用?Java TextBox使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



TextBox类属于org.gwtbootstrap3.client.ui包,在下文中一共展示了TextBox类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: setup

import org.gwtbootstrap3.client.ui.TextBox; //导入依赖的package包/类
@PostConstruct
public void setup() {
    l = new Label( "Click to close" );
    t = new TextBox();
    b = new Button( "Close" );
    b.addClickHandler( new ClickHandler() {

        @Override
        public void onClick( final ClickEvent event ) {
            placeManager.closePlace( place );
        }
    } );
    view.add( l );
    view.add( t );
    view.add( b );
}
 
开发者ID:Teiid-Designer,项目名称:teiid-webui,代码行数:17,代码来源:SimplePopup.java


示例2: getFormValues

import org.gwtbootstrap3.client.ui.TextBox; //导入依赖的package包/类
public void getFormValues(List<FormGroup> controlGroups) {
    formValues = new HashMap();

    for (FormGroup groupControl : controlGroups) {
        if (groupControl.getWidget(1) instanceof TextBox) {
            formValues.put(((TextBox) groupControl.getWidget(1)).getName(),
                           ((TextBox) groupControl.getWidget(1)).getValue());
        } else if (groupControl.getWidget(1) instanceof ListBox) {
            ListBox listBox = (ListBox) groupControl.getWidget(1);

            List<String> selectedValues = new ArrayList<String>();
            for (int i = 0; i < listBox.getItemCount(); i++) {
                if (listBox.isItemSelected(i)) {
                    selectedValues.add(listBox.getValue(i));
                }
            }

            formValues.put(listBox.getName(),
                           selectedValues);
        }
    }
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:23,代码来源:NewFilterPopup.java


示例3: addTextBoxToFilter

import org.gwtbootstrap3.client.ui.TextBox; //导入依赖的package包/类
public void addTextBoxToFilter(String label,
                               String fieldName,
                               String defaultValue) {
    FormGroup controlGroup = new FormGroup();

    FormLabel controlLabel = new FormLabel();
    controlLabel.setTitle(label);
    HTML lab = new HTML("<span style=\"margin-right:10px\">" + label + "</span>");
    controlLabel.setHTML(lab.getHTML());

    TextBox textBox = new TextBox();
    textBox.setName(fieldName);
    if (defaultValue != null && defaultValue.trim().length() > 0) {
        textBox.setText(defaultValue);
    }

    controlGroup.add(controlLabel);
    controlGroup.add(textBox);

    filterControlGroups.add(controlGroup);
    horizontalForm.add(controlGroup);
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:23,代码来源:NewFilterPopup.java


示例4: addTextBoxToFilter

import org.gwtbootstrap3.client.ui.TextBox; //导入依赖的package包/类
public void addTextBoxToFilter(String label,
                               String fieldName,
                               String defaultValue) {
    FormGroup controlGroup = new FormGroup();

    FormLabel controlLabel = new FormLabel();
    controlLabel.setTitle(label);
    HTML lab = new HTML("<span style=\"margin-right:10px\">" + label + "</span>");
    controlLabel.setHTML(lab.getHTML());

    TextBox textBox = new TextBox();
    textBox.setName(fieldName);
    if (defaultValue != null && defaultValue.trim().length() > 0) {
        textBox.setText(defaultValue);
    }

    controlGroup.add(controlLabel);
    controlGroup.add(textBox);

    filterControlGroups.add(controlGroup);
    filterForm.add(controlGroup);
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:23,代码来源:NewTabFilterPopup.java


示例5: createDomElement

import org.gwtbootstrap3.client.ui.TextBox; //导入依赖的package包/类
@Override
public TextBoxDOMElement createDomElement(final GridLayer gridLayer,
                                          final GridWidget gridWidget,
                                          final GridBodyCellRenderContext context) {
    final TextBox widget = createWidget();
    final TextBoxDOMElement e = new TextBoxDOMElement(widget,
                                                      gridLayer,
                                                      gridWidget);
    widget.addBlurHandler(new BlurHandler() {
        @Override
        public void onBlur(final BlurEvent event) {
            e.flush(widget.getValue());
            gridLayer.batch();
        }
    });
    return e;
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:18,代码来源:TextBoxDOMElementFactory.java


示例6: editableTextBox

import org.gwtbootstrap3.client.ui.TextBox; //导入依赖的package包/类
private static TextBox editableTextBox(final ValueChanged changed,
                                       final String dataType,
                                       final String fieldName,
                                       final String initialValue) {
    final TextBox tb = TextBoxFactory.getTextBox(dataType);
    tb.setText(initialValue);
    String m = TestScenarioConstants.INSTANCE.ValueFor0(fieldName);
    tb.setTitle(m);
    tb.addValueChangeHandler(new ValueChangeHandler<String>() {

        public void onValueChange(final ValueChangeEvent<String> event) {
            changed.valueChanged(event.getValue());
        }
    });

    return tb;
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:18,代码来源:VerifyFieldConstraintEditor.java


示例7: removeCharacteristic

import org.gwtbootstrap3.client.ui.TextBox; //导入依赖的package包/类
private void removeCharacteristic(final FlexTable selectedTable) {
    if (selectedTable != null) {
        final TextBox tbName = (TextBox) selectedTable.getWidget(0,
                                                                 1);
        String name = tbName.getValue();
        if (name == null || name.trim().length() == 0) {
            name = "Untitled";
        }
        final String msg = GuidedScoreCardConstants.INSTANCE.promptDeleteCharacteristic0(name);
        if (Window.confirm(msg)) {
            characteristicsTables.remove(selectedTable);
            characteristicsAttrMap.remove(selectedTable);
            final Widget parent = selectedTable.getParent().getParent();
            final int i = characteristicsPanel.getWidgetIndex(parent);
            characteristicsPanel.remove(parent);
            characteristicsPanel.remove(i);
        }
    }
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:20,代码来源:GuidedScoreCardEditor.java


示例8: booleanEditor

import org.gwtbootstrap3.client.ui.TextBox; //导入依赖的package包/类
private ListBox booleanEditor(final String currentValue) {
    final ListBox listBox = listBoxEditor(booleanOperators,
                                          currentValue,
                                          false);
    listBox.addChangeHandler(new ChangeHandler() {
        @Override
        public void onChange(final ChangeEvent event) {
            final int selectedIndex = listBox.getSelectedIndex();
            final String selectedValue = listBox.getItemText(selectedIndex);
            final boolean enabled = "true".equalsIgnoreCase(selectedValue);
            ddReasonCodeAlgorithm.setEnabled(enabled);
            tbBaselineScore.setEnabled(enabled);
            ddReasonCodeField.setEnabled(enabled);
            for (final FlexTable cGrid : characteristicsTables) {
                //baseline score for each characteristic
                ((TextBox) cGrid.getWidget(2, 2)).setEnabled(enabled);
                //reason code for each characteristic
                ((TextBox) cGrid.getWidget(2, 3)).setEnabled(enabled);
            }
        }
    });
    return listBox;
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:24,代码来源:GuidedScoreCardEditor.java


示例9: returnValueEditor

import org.gwtbootstrap3.client.ui.TextBox; //导入依赖的package包/类
/**
 * An editor for the retval "formula" (expression).
 */
private Widget returnValueEditor() {
    TextBox box = new BoundTextBox(constraint);

    if (this.readOnly) {
        return new SmallLabel(box.getText());
    }

    String msg = GuidedRuleEditorResources.CONSTANTS.FormulaEvaluateToAValue();
    Image img = new Image(GuidedRuleEditorResources.INSTANCE.images().functionAssets());
    img.setTitle(msg);
    box.setTitle(msg);
    box.addValueChangeHandler(new ValueChangeHandler<String>() {

        public void onValueChange(final ValueChangeEvent event) {
            executeOnValueChangeCommand();
        }
    });

    Widget ed = widgets(img,
                        box);
    return ed;
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:26,代码来源:ConstraintValueEditor.java


示例10: formulaEditor

import org.gwtbootstrap3.client.ui.TextBox; //导入依赖的package包/类
/**
 * An editor for formula
 * @return
 */
private Widget formulaEditor() {
    if (this.readOnly) {
        return new SmallLabel(assertValue());
    }

    final TextBox box = new TextBox();
    box.addValueChangeHandler(new ValueChangeHandler<String>() {

        @Override
        public void onValueChange(ValueChangeEvent<String> event) {
            value.setValue(event.getValue());
            executeOnChangeCommand();
        }
    });
    //FireEvents as the box could assume a default value
    box.setValue(assertValue(),
                 true);
    attachDisplayLengthHandler(box);
    return box;
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:25,代码来源:ActionValueEditor.java


示例11: boundFormulaTextBox

import org.gwtbootstrap3.client.ui.TextBox; //导入依赖的package包/类
private TextBox boundFormulaTextBox() {
    final TextBox box = new TextBox();
    box.setStyleName("constraint-value-Editor");
    if (this.methodParameter.getValue() == null) {
        box.setValue("");
    } else {
        box.setValue(this.methodParameter.getValue());
    }

    box.addKeyUpHandler(new KeyUpHandler() {
        @Override
        public void onKeyUp(KeyUpEvent event) {
            setMethodParameterValue(box.getValue());
        }
    });

    return box;
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:19,代码来源:MethodParameterValueEditor.java


示例12: FieldEditor

import org.gwtbootstrap3.client.ui.TextBox; //导入依赖的package包/类
public FieldEditor() {
    box = new TextBox();
    box.addChangeHandler(new ChangeHandler() {

        public void onChange(ChangeEvent event) {
            TextBox otherBox = (TextBox) event.getSource();

            if (!regex.equals("") && !otherBox.getText().matches(regex)) {
                Window.alert(GuidedRuleEditorResources.CONSTANTS.TheValue0IsNotValidForThisField(otherBox.getText()));
                box.setText(oldValue);
            } else {
                oldValue = otherBox.getText();
                updateSentence();
            }
        }
    });

    //Wrap widget within a HorizontalPanel to add a space before and after the Widget
    HorizontalPanel hp = new HorizontalPanel();
    hp.add(new HTML("&nbsp;"));
    hp.add(box);
    hp.add(new HTML("&nbsp;"));

    initWidget(hp);
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:26,代码来源:DSLSentenceWidget.java


示例13: defaultTextBoxHasHandlersAttachedInCorrectOrder

import org.gwtbootstrap3.client.ui.TextBox; //导入依赖的package包/类
@Test
public void defaultTextBoxHasHandlersAttachedInCorrectOrder() {
    final TextBox defaultTextBox = mock(TextBox.class);
    final ConstraintValueEditor editor = spy(createEditor(constraint));
    final InOrder inOrder = inOrder(editor);

    doReturn(defaultTextBox).when(editor).getDefaultTextBox(any(String.class));

    editor.getNewTextBox(DataType.TYPE_STRING);

    inOrder.verify(editor).setUpTextBoxStyleAndHandlers(eq(defaultTextBox),
                                                        any(Command.class));
    verify(defaultTextBox,
           times(1)).setText(any(String.class));
    inOrder.verify(editor).attachDisplayLengthHandler(eq(defaultTextBox));
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:17,代码来源:ConstraintValueEditorTest.java


示例14: ValueOptionsPageView

import org.gwtbootstrap3.client.ui.TextBox; //导入依赖的package包/类
@Inject
public ValueOptionsPageView(final Div valueListGroupContainer,
                            final Div cepWindowOperatorsGroupContainer,
                            final Div defaultValueGroupContainer,
                            final Div limitedValueGroupContainer,
                            final TextBox valueList,
                            final Div cepWindowOperatorsContainer,
                            final Div defaultValueContainer,
                            final Div limitedValueContainer,
                            final TranslationService translationService,
                            final DecisionTablePopoverUtils popoverUtils) {
    this.valueListGroupContainer = valueListGroupContainer;
    this.cepWindowOperatorsGroupContainer = cepWindowOperatorsGroupContainer;
    this.defaultValueGroupContainer = defaultValueGroupContainer;
    this.limitedValueGroupContainer = limitedValueGroupContainer;
    this.valueList = valueList;
    this.cepWindowOperatorsContainer = cepWindowOperatorsContainer;
    this.defaultValueContainer = defaultValueContainer;
    this.limitedValueContainer = limitedValueContainer;
    this.translationService = translationService;
    this.popoverUtils = popoverUtils;
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:23,代码来源:ValueOptionsPageView.java


示例15: addNumericTextBoxChangeHandler

import org.gwtbootstrap3.client.ui.TextBox; //导入依赖的package包/类
private void addNumericTextBoxChangeHandler(final TextBox textBox,
                                            final DTCellValue52 value,
                                            final Function<String, ? extends Number> valueOf,
                                            final Number emptyValue,
                                            final Number zeroValue) {
    if (!isReadOnly) {
        textBox.addValueChangeHandler(new ValueChangeHandler<String>() {

            public void onValueChange(ValueChangeEvent<String> event) {
                try {
                    value.setNumericValue(valueOf.apply(event.getValue()));
                } catch (NumberFormatException nfe) {
                    if (allowEmptyValues) {
                        value.setNumericValue(emptyValue);
                        textBox.setValue("");
                    } else {
                        value.setNumericValue(zeroValue);
                        textBox.setValue("0");
                    }
                }
            }
        });
    }
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:25,代码来源:DTCellValueWidgetFactory.java


示例16: makeTextBox

import org.gwtbootstrap3.client.ui.TextBox; //导入依赖的package包/类
private TextBox makeTextBox(final DTCellValue52 value) {
    TextBox tb = new TextBox();
    tb.setValue(value.getStringValue());

    // Wire up update handler
    tb.setEnabled(!isReadOnly);
    if (!isReadOnly) {
        tb.addValueChangeHandler(new ValueChangeHandler<String>() {

            public void onValueChange(ValueChangeEvent<String> event) {
                value.setStringValue(event.getValue());
            }
        });
    }
    return tb;
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:17,代码来源:DTCellValueWidgetFactory.java


示例17: EnumSingleSelectStringUiColumn

import org.gwtbootstrap3.client.ui.TextBox; //导入依赖的package包/类
public EnumSingleSelectStringUiColumn( final List<HeaderMetaData> headerMetaData,
                                       final double width,
                                       final boolean isResizable,
                                       final boolean isVisible,
                                       final GuidedDecisionTablePresenter.Access access,
                                       final MultiValueSingletonDOMElementFactory<String, ListBox, ListBoxDOMElement<String, ListBox>> multiValueFactory,
                                       final SingleValueSingletonDOMElementFactory<String, TextBox, TextBoxDOMElement<String, TextBox>> singleValueFactory,
                                       final GuidedDecisionTableView.Presenter presenter,
                                       final String factType,
                                       final String factField ) {
    super( headerMetaData,
           width,
           isResizable,
           isVisible,
           access,
           multiValueFactory,
           singleValueFactory,
           presenter,
           factType,
           factField );
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:22,代码来源:EnumSingleSelectStringUiColumn.java


示例18: StringUiColumn

import org.gwtbootstrap3.client.ui.TextBox; //导入依赖的package包/类
public StringUiColumn( final List<HeaderMetaData> headerMetaData,
                       final double width,
                       final boolean isResizable,
                       final boolean isVisible,
                       final GuidedDecisionTablePresenter.Access access,
                       final TextBoxSingletonDOMElementFactory<String, TextBox> factory ) {
    super( headerMetaData,
           new CellRenderer<String, TextBox, TextBoxDOMElement<String, TextBox>>( factory ) {
               @Override
               protected void doRenderCellContent( final Text t,
                                                   final String value,
                                                   final GridBodyCellRenderContext context ) {
                   t.setText( value );
               }
           },
           width,
           isResizable,
           isVisible,
           access,
           factory );
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:22,代码来源:StringUiColumn.java


示例19: setup

import org.gwtbootstrap3.client.ui.TextBox; //导入依赖的package包/类
@Before
public void setup() {
    GwtMockito.useProviderForType(TextBox.class, (aClass -> disabledTextBox));

    when(defaultValue.getDataType()).thenReturn(DataType.DataTypes.STRING);
    when(editingCol.getDefaultValue()).thenReturn(defaultValue);
    when(presenter.getModel()).thenReturn(model);
    when(presenter.getDataModelOracle()).thenReturn(oracle);
    when(plugin.patternWrapper()).thenReturn(patternWrapper);
    when(plugin.editingCol()).thenReturn(editingCol);
    when(plugin.getPresenter()).thenReturn(presenter);
    when(plugin.editingPattern()).thenReturn(pattern52);
    when(page.plugin()).thenReturn(plugin);
    when(model.getTableFormat()).thenReturn(GuidedDecisionTable52.TableFormat.EXTENDED_ENTRY);

    doCallRealMethod().when(plugin).defaultValueWidget();
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:18,代码来源:ValueOptionsPageTest.java


示例20: init

import org.gwtbootstrap3.client.ui.TextBox; //导入依赖的package包/类
@Override
public void init(final ComboBoxView.ModelPresenter modelPresenter,
                 final boolean notifyModelChanges,
                 final ValueListBox<String> listBox,
                 final TextBox textBox,
                 final boolean quoteStringValues,
                 final boolean addCustomValues,
                 final String customPrompt,
                 final String placeholder) {
    this.quoteStringValues = quoteStringValues;
    this.addCustomValues = addCustomValues;
    this.customPrompt = customPrompt;
    this.modelPresenter = modelPresenter;
    this.notifyModelChanges = notifyModelChanges;
    view.init(this,
              modelPresenter,
              listBox,
              textBox,
              placeholder);
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:21,代码来源:ComboBox.java



注:本文中的org.gwtbootstrap3.client.ui.TextBox类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java AbstractXmlGenerator类代码示例发布时间:2022-05-22
下一篇:
Java EncodeException类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap