Example usage for com.vaadin.ui HorizontalLayout setDefaultComponentAlignment

List of usage examples for com.vaadin.ui HorizontalLayout setDefaultComponentAlignment

Introduction

In this page you can find the example usage for com.vaadin.ui HorizontalLayout setDefaultComponentAlignment.

Prototype

@Override
    public void setDefaultComponentAlignment(Alignment defaultAlignment) 

Source Link

Usage

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);
}