Example usage for com.vaadin.ui AbstractComponent getHeight

List of usage examples for com.vaadin.ui AbstractComponent getHeight

Introduction

In this page you can find the example usage for com.vaadin.ui AbstractComponent getHeight.

Prototype

@Override
    public float getHeight() 

Source Link

Usage

From source file:eu.lod2.LOD2Demo.java

License:Apache License

private void resetSize(AbstractComponentContainer comp) {

    System.err.println("reset sizing");

    Iterator<Component> it = comp.getComponentIterator();
    while (it.hasNext()) {
        Component c = it.next();// ww w.  ja  v a  2s  .  c om
        if (c instanceof AbstractComponent) {
            AbstractComponent ac = (AbstractComponent) c;
            ac.setSizeUndefined();
            System.err.println("Size:" + ac.getHeight());
        }
        ;
        if (c instanceof AbstractComponentContainer) {
            AbstractComponentContainer acc = (AbstractComponentContainer) c;
            resetSize(acc);
        }
        ;
    }
    ;

}

From source file:eu.lod2.LOD2Demo.java

License:Apache License

private void resetSizeFull(AbstractComponentContainer comp) {

    Iterator<Component> it = comp.getComponentIterator();
    while (it.hasNext()) {
        Component c = it.next();//from  ww  w .j a  v  a 2s .co m
        if (c instanceof AbstractComponent) {
            AbstractComponent ac = (AbstractComponent) c;
            ac.setSizeFull();
            if (ac.getHeight() < 0) {
                ac.setHeight("100%");
            }
            ;
        }
        ;
        if (c instanceof AbstractComponentContainer) {
            AbstractComponentContainer acc = (AbstractComponentContainer) c;
            resetSizeFull(acc);
        }
        ;
    }
    ;

}

From source file:eu.lod2.LOD2Demo.java

License:Apache License

private void printSize(AbstractComponentContainer comp) {

    System.err.println("PrintSizing");
    System.err.println("Container Start");

    Iterator<Component> it = comp.getComponentIterator();
    while (it.hasNext()) {
        Component c = it.next();/*from   w w w .  j  a v  a 2  s .co  m*/
        if (c instanceof AbstractComponent) {
            AbstractComponent ac = (AbstractComponent) c;
            System.err.println("Size: Height: " + ac.getHeight() + " Width: " + ac.getWidth());
        }
        ;
        if (c instanceof AbstractComponentContainer) {
            AbstractComponentContainer acc = (AbstractComponentContainer) c;
            printSize(acc);
        }
        ;
    }
    ;
    System.err.println("Container end");

}