Example usage for com.google.gwt.user.client.ui DockLayoutPanel iterator

List of usage examples for com.google.gwt.user.client.ui DockLayoutPanel iterator

Introduction

In this page you can find the example usage for com.google.gwt.user.client.ui DockLayoutPanel iterator.

Prototype

public Iterator<Widget> iterator() 

Source Link

Usage

From source file:cc.alcina.framework.gwt.client.util.WidgetUtils.java

License:Apache License

private static boolean isDirectionalLayoutPanel(Widget panel, boolean horizontal) {
    if (panel instanceof DockLayoutPanel) {
        DockLayoutPanel dlp = (DockLayoutPanel) panel;
        Iterator<Widget> itr = dlp.iterator();
        for (Widget widget : dlp) {
            Direction dir = dlp.getWidgetDirection(widget);
            if (horizontal && (dir == Direction.NORTH || dir == Direction.SOUTH)) {
                return false;
            }/*from w w w  . j  a  v  a  2s. com*/
            if (!horizontal && (dir == Direction.WEST || dir == Direction.EAST)) {
                return false;
            }
        }
        return true;
    }
    return false;
}