@Override public String getMessage() { return this.message.getText(); } }
private void createTextBox( String label ) { textBox = new TextBox(); textBox.setText( label ); textBox.setAlternateSize( AlternateSize.SMALL ); move.add( textBox ); }
private void createComponentWidget( String label ) { textBox = new TextBox(); textBox.setPlaceholder( label ); textBox.setReadOnly( true ); textBox.setAlternateSize( AlternateSize.MEDIUM ); move.add( textBox ); }
public static TextBox textBox( String placeholder ) { TextBox textBox = new TextBox(); textBox.setPlaceholder( placeholder ); return textBox; }
public TimeBoxBase() { box = new TextBox(); box.setStyleName("input-mini"); setElement(box.getElement()); setFormat("HH:mm:ss a"); setValue(new Date()); }
/** * Get un-transformed text * @return text box value */ public String getOriginalValue() { return box.getValue(); }
public DateTimeBoxBase() { this.box = new TextBox(); this.language = LocaleUtil.getLanguage(); setElement(box.getElement()); setFormat("yyyy/mm/dd hh:ii"); setWeekStart(LocaleInfo.getCurrentLocale().getDateTimeFormatInfo().firstDayOfTheWeek()); setValue(new Date()); }
/** * Creates a TextBox widget that wraps an existing <input type='text'> * element. * * This element must already be attached to the document. If the element is * removed from the document, you must call * {@link RootPanel#detachNow(Widget)}. * * @param element * the element to be wrapped */ public static TextBox wrap(Element element) { // Assert that the element is attached. assert Document.get().getBody().isOrHasChild(element); TextBox textBox = new TextBox(element); // Mark it attached and remember it for cleanup. textBox.onAttach(); RootPanel.detachOnWindowClose(textBox); return textBox; }
/** * Sets a placeholder in the the TextBox. * <p> * A placeholder is a piece of text in the TextBox that disappears when the * TextBox receives focus. * * @param placeholder * the placeholder text */ public void setPlaceholder(String placeholder) { input.setPlaceholder(placeholder); } }
/** * @see com.google.gwt.user.client.ui.ValueBoxBase#setReadOnly(boolean) */ public void setReadOnly(boolean readonly) { box.setReadOnly(readonly); }
public NumberBox( String placeholder, boolean allowDecimal, boolean allowNegative ) { allowedChars = "0123456789"; this.allowDecimal = allowDecimal; this.allowNegative = allowNegative; textBox = UiUtils.textBox( placeholder ); textBox.addKeyPressHandler( keyPressHandler ); initWidget( textBox ); }
public static TextBox textBox( String placeHolder, AlternateSize alternateSize ) { TextBox textBox = textBox( placeHolder ); textBox.setAlternateSize( alternateSize ); return textBox; }
/** * Get un-tranceform text * @return text box value */ public String getOriginalValue() { return box.getValue(); }
public DateBoxBase() { this.box = new TextBox(); this.language = LocaleUtil.getLanguage(); setElement(box.getElement()); setFormat(DateTimeFormat.getFormat(DateTimeFormat.PredefinedFormat.DATE_SHORT).getPattern().toLowerCase()); setWeekStart(LocaleInfo.getCurrentLocale().getDateTimeFormatInfo().firstDayOfTheWeek()); setValue(new Date()); }
/** * @see com.google.gwt.user.client.ui.ValueBoxBase#setReadOnly(boolean) */ public void setReadOnly(boolean readonly) { box.setReadOnly(readonly); }
public AddOrganizationalUnitPopup() { setTitle( OrganizationalUnitManagerConstants.INSTANCE.AddOrganizationalUnitPopupTitle() ); setBackdrop( BackdropType.STATIC ); setKeyboard( true ); setAnimation( true ); setDynamicSafe( true ); add( uiBinder.createAndBindUi( this ) ); add( footer ); nameTextBox.addKeyPressHandler( new KeyPressHandler() { @Override public void onKeyPress( final KeyPressEvent event ) { nameGroup.setType( ControlGroupType.NONE ); nameHelpInline.setText( "" ); } } ); }