List of usage examples for com.vaadin.ui HorizontalLayout setDefaultComponentAlignment
@Override public void setDefaultComponentAlignment(Alignment defaultAlignment)
From source file:sph.vaadin.ui.videojs.VideojsSeekToController.java
License:Apache License
/** * Creates and sets up all UI components. *//*w ww . j a va 2s.co m*/ private void doLayout() { HorizontalLayout compositionRoot = new HorizontalLayout(); compositionRoot.setMargin(true); compositionRoot.setSpacing(true); compositionRoot.setDefaultComponentAlignment(Alignment.BOTTOM_CENTER); hoursField = createTextField("00", 2); minutesField = createTextField("00", 2); secondsField = createTextField("00", 2); //hoursField.addValidator(new IntegerRangeValidator("Virheellinen aika tunnit", 0, 2)); minutesField.addValidator(new IntegerRangeValidator("Requires an integer between 0-59", 0, 59)); secondsField.addValidator(new IntegerRangeValidator("Requires an integer between 0-59", 0, 59)); compositionRoot.addComponents(hoursField, new Label(":"), minutesField, new Label(":"), secondsField, seekBtn); compositionRoot.setCaption("Seekto"); this.setCompositionRoot(compositionRoot); }