@SuppressWarnings("unchecked") @BeforeClass public static void setup() { binder.buildAndBind("flightId"); form.airline = (TextField) binder.getFieldForProperty("flightId.airline").get(); form.flightNumber = (TextField) binder.getFieldForProperty("flightId.flightNumber").get(); form.flightSuffix = (TextField) binder.getFieldForProperty("flightId.flightSuffix").get(); form.date = (DateField) binder.getFieldForProperty("flightId.date").get(); form.legType = (AbstractSingleSelect<LegType>) binder.getFieldForProperty("flightId.legType").get(); form.sbt = (DateTimeField) binder.getFieldForProperty("sbt").get(); form.ebt = (DateTimeField) binder.getFieldForProperty("ebt").get(); form.abt = (DateTimeField) binder.getFieldForProperty("abt").get(); form.gate = (TextField) binder.getFieldForProperty("gate").get(); form.canceled = (CheckBox) binder.getFieldForProperty("canceled").get(); }
public DateTimeField getField() { return field; }
@Override protected AbstractDateField<LocalDateTime, ?> buildInternalField(Class<? extends LocalDateTime> type) { return isInline() ? new InlineDateTimeField() : new DateTimeField(); }
private DateTimeField createStartDateField() { DateTimeField f = new DateTimeField("Start date"); f.setResolution(DateTimeResolution.SECOND); startDateValueChangeRegistration = Optional.of(f.addValueChangeListener(startDateValueChangeListener)); return f; }
private DateTimeField createEndDateField() { DateTimeField f = new DateTimeField("End date"); f.setResolution(DateTimeResolution.SECOND); endDateValueChangeRegistration = Optional.of(f.addValueChangeListener(endDateValueChangeListener)); return f; }
/** * Set a description that explains the usage of the Widget for users of * assistive devices. * * @param description * String with the description * @return this for method chaining * @see DateTimeField#setAssistiveText(String) */ @SuppressWarnings("unchecked") public default THIS withAssistiveText(String description) { ((DateTimeField) this).setAssistiveText(description); return (THIS) this; }
/** * Sets the placeholder text. The placeholder is text that is displayed when * the field would otherwise be empty, to prompt the user for input. * * @param placeholder * the placeholder text to set * @return this for method chaining * @see DateTimeField#setPlaceholder(String) */ @SuppressWarnings("unchecked") public default THIS withPlaceholder(String placeholder) { ((DateTimeField) this).setPlaceholder(placeholder); return (THIS) this; }
/** * Enables or disables the text field. By default the text field is enabled. * Disabling it causes only the button for date selection to be active, thus * preventing the user from entering invalid dates. * * @param state * <b>true</b> to enable text field, <b>false</b> to disable it. * @return this for method chaining * @see DateTimeField#setTextFieldEnabled(boolean) */ @SuppressWarnings("unchecked") public default THIS withTextFieldEnabled(boolean state) { ((DateTimeField) this).setTextFieldEnabled(state); return (THIS) this; }
/** * Constructs an empty <code>DateTimeField</code> with no caption. * * @since 0.1 */ // Copied from Vaadin Framework public DateTimeFieldGroup() { this(new DateTimeField()); }
/** * Constructs an empty <code>DateTimeField</code> with caption. * * @param caption the caption of the field. * @since 0.1 */ // Copied from Vaadin Framework public DateTimeFieldGroup(String caption) { this(new DateTimeField(caption)); }
/** * Constructs a new <code>DateTimeField</code> with the given caption and * initial text contents. * * @param caption the caption <code>String</code> for the field. * @param value the LocalDateTime value. * @since 0.1 */ // Copied from Vaadin Framework public DateTimeFieldGroup(String caption, LocalDateTime value) { this(new DateTimeField(caption, value)); }
/** * Uses the given <code>DateTimeField</code> as base for the component. * * @param field the <code>DateTimeField</code> used in the component, not {@code null} * @since 0.1 */ public DateTimeFieldGroup(DateTimeField field) { super(field); }