List of usage examples for com.google.gwt.user.client.ui IntegerBox IntegerBox
public IntegerBox()
From source file:com.bearsoft.gwt.ui.widgets.grid.cells.IntegerEditorCell.java
public IntegerEditorCell() { super(new IntegerBox()); }
From source file:com.dawg6.web.dhcalc.client.NumberSpinner.java
License:Open Source License
public NumberSpinner(String text) { super(new IntegerBox(), text, 0, Integer.MAX_VALUE, 1); }
From source file:com.googlecode.mgwt.ui.client.widget.MIntegerBox.java
License:Apache License
/** * Construct an integer box with a given css * * @param css the css to use/*from w w w.j a v a 2 s . c o m*/ */ public MIntegerBox(InputCss css) { super(css, new IntegerBox()); impl.setType(box.getElement(), "number"); addStyleName(css.textBox()); }
From source file:com.sciencegadgets.client.algebra.edit.RandomSpecPanel.java
License:Open Source License
private void makeAutoRandomPanel() { Label label1 = new Label("Negativity"); label1.setStyleName(CSS.ROW_HEADER); autoRandomPanel.add(label1);/*w w w . j av a 2s . c om*/ neverNeg = new RadioButton("neg", "Never"); sometimesNeg = new RadioButton("neg", "Sometimes"); alwaysNeg = new RadioButton("neg", "Always"); HorizontalPanel negativeSelection = new HorizontalPanel(); negativeSelection.add(neverNeg); negativeSelection.add(sometimesNeg); negativeSelection.add(alwaysNeg); autoRandomPanel.add(negativeSelection); Label label2 = new Label("Range"); label2.setStyleName(CSS.ROW_HEADER); label2.getElement().getStyle().setMarginTop(5, Unit.PX); autoRandomPanel.add(label2); FlowPanel rangeSelection = new FlowPanel(); lowerBound = new DoubleBox(); lowerBound.setSize("50px", "30px"); lowerBound.getElement().getStyle().setDisplay(Display.INLINE_BLOCK); rangeSelection.add(lowerBound); Label x = new Label("\u2264 x \u003C"); x.getElement().getStyle().setDisplay(Display.INLINE_BLOCK); rangeSelection.add(x); upparBound = new DoubleBox(); upparBound.setSize("50px", "30px"); upparBound.getElement().getStyle().setDisplay(Display.INLINE_BLOCK); rangeSelection.add(upparBound); autoRandomPanel.add(rangeSelection); Label label3 = new Label("Decimal places"); label3.setStyleName(CSS.ROW_HEADER); label3.getElement().getStyle().setMarginTop(5, Unit.PX); autoRandomPanel.add(label3); decPlace = new IntegerBox(); decPlace.setSize("50px", "30px"); decPlace.setText("0"); autoRandomPanel.add(decPlace); setRandonButton.addStyleName(CSS.MEDIUM_BUTTON); setRandonButton.setWidth("100%"); autoRandomPanel.add(setRandonButton); setRandonButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { onSetRandom(); } }); response = new Label(""); response.getElement().getStyle().setColor("red"); autoRandomPanel.add(response); }
From source file:de.metanome.frontend.client.datasources.FileInputEditForm.java
License:Apache License
/** * Constructor. Set up all UI elements.//from w w w. j a va 2 s . com */ public FileInputEditForm(FileInputTab parent) { super(3, 2); this.parent = parent; this.fileInputService = GWT.create(FileInputService.class); Grid standardPanel = new Grid(3, 3); this.setWidget(0, 0, standardPanel); Button refreshButton = new Button("Refresh"); refreshButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent clickEvent) { updateListbox(); } }); fileListBox = new ListBoxInput(false); updateListbox(); standardPanel.setText(0, 0, "File Name"); standardPanel.setWidget(0, 1, fileListBox); standardPanel.setWidget(0, 2, refreshButton); commentTextArea = new TextArea(); commentTextArea.setVisibleLines(3); standardPanel.setText(1, 0, "Comment"); standardPanel.setWidget(1, 1, commentTextArea); advancedCheckbox = createAdvancedCheckbox(); standardPanel.setWidget(2, 1, advancedCheckbox); advancedTable = new FlexTable(); advancedTable.setVisible(false); this.setWidget(1, 0, advancedTable); separatorTextbox = getNewOneCharTextbox(); separatorTextbox.setName("Separator Character"); addRow(advancedTable, separatorTextbox, "Separator Character"); quoteTextbox = getNewOneCharTextbox(); quoteTextbox.setName("Quote Character"); addRow(advancedTable, quoteTextbox, "Quote Character"); escapeTextbox = getNewOneCharTextbox(); escapeTextbox.setName("Escape Character"); addRow(advancedTable, escapeTextbox, "Escape Character"); skiplinesIntegerbox = new IntegerBox(); skiplinesIntegerbox.setWidth("5em"); skiplinesIntegerbox.setName("Line"); addRow(advancedTable, skiplinesIntegerbox, "Line"); strictQuotesCheckbox = new CheckBox(); strictQuotesCheckbox.setName("Strict Quotes"); addRow(advancedTable, strictQuotesCheckbox, "Strict Quotes"); ignoreLeadingWhiteSpaceCheckbox = new CheckBox(); addRow(advancedTable, ignoreLeadingWhiteSpaceCheckbox, "Ignore Leading Whitespace"); headerCheckbox = new CheckBox(); addRow(advancedTable, headerCheckbox, "Has Header"); skipDifferingLinesCheckbox = new CheckBox(); addRow(advancedTable, skipDifferingLinesCheckbox, "Skip Lines With Differing Length"); setDefaultAdvancedSettings(); this.setWidget(2, 0, new Button("Save", new ClickHandler() { @Override public void onClick(ClickEvent event) { saveFileInput(); } })); }
From source file:de.metanome.frontend.client.input_fields.IntegerInput.java
License:Apache License
/** * @param optional If true, a remove button will be rendered, to remove this widget from its * parent./*from w w w . j a v a 2 s . c om*/ */ public IntegerInput(boolean optional) { super(optional); this.textbox = new IntegerBox(); this.add(this.textbox); }
From source file:gwt.material.design.client.ui.MaterialIntegerBox.java
License:Apache License
public MaterialIntegerBox() { super(new IntegerBox()); }
From source file:org.jboss.wise.gwt.client.view.EndpointConfigView.java
License:Open Source License
private Widget getWidget(TreeElement pNode) { if ("java.lang.String".endsWith(pNode.getClassType()) || "char".equals(pNode.getClassType()) || "java.lang.Object".equals(pNode.getClassType())) { return new TextBox(); } else if ("java.lang.Integer".equals(pNode.getClassType()) || "java.lang.Long".equals(pNode.getClassType()) || "long".equals(pNode.getClassType()) || "int".equals(pNode.getClassType())) { IntegerBox iBox = new IntegerBox(); iBox.setValue(0);/*w ww . java2s .co m*/ return iBox; } else if ("java.lang.Double".equals(pNode.getClassType()) || "java.lang.Float".equals(pNode.getClassType()) || "float".equals(pNode.getClassType()) || "double".equals(pNode.getClassType())) { DoubleBox dBox = new DoubleBox(); dBox.setValue(new Double(0.0)); return dBox; } return new Label("UNKNOWN TYPE: " + pNode.getClassType()); }
From source file:org.kaaproject.kaa.server.admin.client.mvp.view.endpoint.EndpointGroupViewImpl.java
License:Apache License
@Override protected void initDetailsTable() { if (!create) { detailsTable.getColumnFormatter().setWidth(2, "200px"); }// ww w. ja v a 2s .c o m int row = 0; Label authorLabel = new Label(Utils.constants.author()); createdUsername = new KaaAdminSizedTextBox(-1, false); createdUsername.setWidth("100%"); detailsTable.setWidget(row, 0, authorLabel); detailsTable.setWidget(row, 1, createdUsername); authorLabel.setVisible(!create); createdUsername.setVisible(!create); row++; Label dateTimeCreatedLabel = new Label(Utils.constants.dateTimeCreated()); createdDateTime = new KaaAdminSizedTextBox(-1, false); createdDateTime.setWidth("100%"); detailsTable.setWidget(row, 0, dateTimeCreatedLabel); detailsTable.setWidget(row, 1, createdDateTime); dateTimeCreatedLabel.setVisible(!create); createdDateTime.setVisible(!create); row++; name = new KaaAdminSizedTextBox(DEFAULT_TEXTBOX_SIZE); name.setWidth("100%"); nameLabel = new Label(Utils.constants.name()); detailsTable.setWidget(row, 0, nameLabel); detailsTable.setWidget(row, 1, name); name.addInputHandler(this); row++; weight = new IntegerBox(); weight.setWidth("100%"); weightLabel = new Label(Utils.constants.weight()); detailsTable.setWidget(row, 0, weightLabel); detailsTable.setWidget(row, 1, weight); weight.addChangeHandler(this); row++; description = new SizedTextArea(1024); description.setWidth("100%"); description.getTextArea().getElement().getStyle().setPropertyPx("minHeight", 100); description.getTextArea().getElement().getStyle().setPropertyPx("maxWidth", 487); Label descriptionLabel = new Label(Utils.constants.description()); detailsTable.setWidget(row, 0, descriptionLabel); detailsTable.setWidget(row, 1, description); detailsTable.getFlexCellFormatter().setColSpan(row, 1, 2); description.addInputHandler(this); detailsTable.getCellFormatter().setVerticalAlignment(row, 0, HasVerticalAlignment.ALIGN_TOP); row++; profileFiltersGrid = new ProfileFilterStructGrid(); profileFiltersGrid.setSize("700px", "200px"); profileFiltersLabel = new Label(Utils.constants.profileFilters()); profileFiltersLabel.addStyleName(Utils.kaaAdminStyle.bAppContentTitleLabel()); includeDeprecatedProfileFilters = new CheckBox(Utils.constants.includeDeprecated()); setCheckBoxStyle(includeDeprecatedProfileFilters); addProfileFilterButton = new Button(Utils.constants.addProfileFilter()); addProfileFilterButton.addStyleName(Utils.kaaAdminStyle.bAppButtonSmall()); detailsTable.setWidget(row, 0, profileFiltersLabel); profileFiltersLabel.getElement().getParentElement().getStyle().setPropertyPx("paddingBottom", 10); detailsTable.setWidget(row, 1, includeDeprecatedProfileFilters); row++; detailsTable.setWidget(row, 0, profileFiltersGrid); detailsTable.getFlexCellFormatter().setColSpan(row, 0, 3); row++; detailsTable.setWidget(row, 2, addProfileFilterButton); addProfileFilterButton.getElement().getParentElement().getStyle().setPropertyPx("paddingTop", 15); detailsTable.getCellFormatter().setHorizontalAlignment(row, 2, HasHorizontalAlignment.ALIGN_RIGHT); profileFiltersLabel.setVisible(!create); includeDeprecatedProfileFilters.setVisible(!create); profileFiltersGrid.setVisible(!create); row++; configurationsGrid = new ConfigurationStructGrid(); configurationsGrid.setSize("700px", "200px"); Label configurationsLabel = new Label(Utils.constants.configurations()); configurationsLabel.addStyleName(Utils.kaaAdminStyle.bAppContentTitleLabel()); includeDeprecatedConfigurations = new CheckBox(Utils.constants.includeDeprecated()); setCheckBoxStyle(includeDeprecatedConfigurations); addConfigurationButton = new Button(Utils.constants.addConfiguration()); addConfigurationButton.addStyleName(Utils.kaaAdminStyle.bAppButtonSmall()); detailsTable.setWidget(row, 0, configurationsLabel); configurationsLabel.getElement().getParentElement().getStyle().setPropertyPx("paddingBottom", 10); detailsTable.setWidget(row, 1, includeDeprecatedConfigurations); row++; detailsTable.setWidget(row, 0, configurationsGrid); detailsTable.getFlexCellFormatter().setColSpan(row, 0, 3); row++; detailsTable.setWidget(row, 2, addConfigurationButton); addConfigurationButton.getElement().getParentElement().getStyle().setPropertyPx("paddingTop", 15); detailsTable.getCellFormatter().setHorizontalAlignment(row, 2, HasHorizontalAlignment.ALIGN_RIGHT); configurationsLabel.setVisible(!create); includeDeprecatedConfigurations.setVisible(!create); configurationsGrid.setVisible(!create); row++; topicsGrid = new TopicGrid(true); topicsGrid.setSize("700px", "200px"); Label topicsLabel = new Label(Utils.constants.notificationTopics()); topicsLabel.addStyleName(Utils.kaaAdminStyle.bAppContentTitleLabel()); addTopicButton = new Button(Utils.constants.addNotificationTopic()); addTopicButton.addStyleName(Utils.kaaAdminStyle.bAppButtonSmall()); detailsTable.setWidget(row, 0, topicsLabel); topicsLabel.getElement().getParentElement().getStyle().setPropertyPx("paddingBottom", 10); row++; detailsTable.setWidget(row, 0, topicsGrid); detailsTable.getFlexCellFormatter().setColSpan(row, 0, 3); row++; detailsTable.setWidget(row, 2, addTopicButton); addTopicButton.getElement().getParentElement().getStyle().setPropertyPx("paddingTop", 15); detailsTable.getCellFormatter().setHorizontalAlignment(row, 2, HasHorizontalAlignment.ALIGN_RIGHT); topicsLabel.setVisible(!create); topicsGrid.setVisible(!create); name.setFocus(true); }
From source file:org.roda.wui.client.ingest.process.PluginParameterPanel.java
private void createIntegerLayout() { Label parameterName = new Label(parameter.getName()); IntegerBox parameterBox = new IntegerBox(); if (parameter.getDefaultValue() != null) { parameterBox.setText(parameter.getDefaultValue()); value = parameter.getDefaultValue(); }// w ww. j a va 2s .co m parameterBox.setTitle("parameter box"); layout.add(parameterName); layout.add(parameterBox); addHelp(); parameterName.addStyleName("form-label"); parameterBox.addStyleName("form-textbox"); // binding change parameterBox.addChangeHandler(new ChangeHandler() { @Override public void onChange(ChangeEvent event) { value = ((IntegerBox) event.getSource()).getValue().toString(); } }); }