List of usage examples for com.google.gwt.user.client.ui DoubleBox DoubleBox
public DoubleBox()
From source file:com.bearsoft.gwt.ui.widgets.grid.cells.DoubleEditorCell.java
public DoubleEditorCell() { super(new DoubleBox()); }
From source file:com.dawg6.web.dhcalc.client.DoubleSpinner.java
License:Open Source License
public DoubleSpinner(String text) { super(new DoubleBox(), text, 0.0, Double.MAX_VALUE, 1.0); }
From source file:com.googlecode.mgwt.ui.client.widget.MDoubleBox.java
License:Apache License
/** * Construct a double box with a given css * * @param css the css to use// ww w . ja v a 2 s. c o m */ public MDoubleBox(InputCss css) { super(css, new DoubleBox()); 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);//from ww w . java 2 s .com 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:edu.oswego.csc480_hci521_2013.client.ui.RfParametersViewImpl.java
License:Apache License
public void setClassWeights(String selectedVariableName) { Column selected = null;/*from www . j a va 2s . c om*/ int columnNumber = 0; for (Column col : columns) { if (col.getName().equals(selectedVariableName)) { selected = col; break; } columnNumber++; } if (selected != null) { classWeights = new FlexTable(); classWeightsScrollPanel.clear(); classWeightsScrollPanel.add(classWeights); classWeights.setText(0, 0, "Class"); classWeights.setText(0, 1, "Weight"); ColumnEnumValuesBuilder builder; builder = new ColumnEnumValuesBuilder(presenter.getDataKey(), columnNumber); //Call the GWT RPC service to get the column values. presenter.getH2OService().getColumnEnumValues(builder, new AsyncCallback<ColumnEnumValues>() { @Override public void onFailure(Throwable thrwbl) { logger.log(Level.SEVERE, thrwbl.toString()); setError(thrwbl.getMessage()); } @Override public void onSuccess(final ColumnEnumValues vals) { String[] values = vals.getValues(); for (int i = 0; i < values.length; i++) { classWeights.setText(i, 0, values[i]); DoubleBox inputBox = new DoubleBox(); inputBox.setValue(1.0); inputBox.setWidth("50px"); classWeights.setWidget(i, 1, inputBox); } } }); } else { throw new NullPointerException("Could not find selected classification variable column."); } }
From source file:gwt.material.design.client.ui.MaterialDoubleBox.java
License:Apache License
public MaterialDoubleBox() { super(new DoubleBox()); }
From source file:lh.api.showcase.client.referencedata.nearestairports.NearestAirportsView.java
License:Apache License
public NearestAirportsView() { super(Messages.Util.INSTANCE.get().nearestAirports(), new NearestAirportsGrid()); final MultiWordSuggestOracle langList = new MultiWordSuggestOracle(); for (LanguageCode lc : LanguageCode.values()) { langList.add(lc.toString());//from w ww. j av a 2 s .c o m } langs = new SuggestBox(langList); latitude = new DoubleBox(); longitude = new DoubleBox(); latitude.setValue(0.0); latitude.setMaxLength(5); latitude.addKeyPressHandler(new UiUtils.DoublesOnlyKeyPressHandler()); longitude.setValue(0.0); longitude.setMaxLength(5); longitude.addKeyPressHandler(new UiUtils.DoublesOnlyKeyPressHandler()); init(); }
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);/*from w w w . j a v a 2s. com*/ 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.jbpm.form.builder.ng.model.client.form.items.NumberFieldFormItem.java
License:Apache License
@Override public Widget cloneDisplay(Map<String, Object> formData) { DoubleBox tb = new DoubleBox(); populate(tb);//from w w w .ja v a 2 s. c o m Object input = getInputValue(formData); if (input != null) { String s = input.toString(); tb.setValue(s.equals("") ? null : Double.valueOf(s)); } if (getOutput() != null && getOutput().get("name") != null) { tb.setName(String.valueOf(getOutput().get("name"))); } super.populateActions(tb.getElement()); return tb; }
From source file:org.jbpm.formbuilder.client.form.items.NumberFieldFormItem.java
License:Apache License
@Override public Widget cloneDisplay(Map<String, Object> formData) { DoubleBox tb = new DoubleBox(); populate(tb);// w ww. ja va 2 s .c o m Object input = getInputValue(formData); if (input != null) { String s = input.toString(); tb.setValue(s.equals("") ? null : Double.valueOf(s)); } if (getOutput() != null && getOutput().getName() != null) { tb.setName(getOutput().getName()); } super.populateActions(tb.getElement()); return tb; }