package test;

import com.google.gwt.core.client.EntryPoint;
import com.smartgwt.client.widgets.layout.Layout;

public class MyTest implements EntryPoint {

    public enum Direction {
        HORIZONTAL,
        VERTICAL
    };

    public void onModuleLoad() {

    	MyLayout l = new MyLayout(Direction.HORIZONTAL);

    	l.setWidth(400);
        l.setHeight(300);
        l.setBorder("2px solid green");
        l.getDirection();

        l.draw();
    }

    public class MyLayout extends Layout
    {
        public MyLayout(Direction direction) {
            setVertical(direction == Direction.VERTICAL);
        }

        public Direction getDirection() {
            return getVertical() ? Direction.VERTICAL : Direction.HORIZONTAL;
        }
    }
}
