当前位置: 首页>>代码示例>>Java>>正文


Java DockLayoutPanel.Direction方法代码示例

本文整理汇总了Java中com.google.gwt.user.client.ui.DockLayoutPanel.Direction方法的典型用法代码示例。如果您正苦于以下问题:Java DockLayoutPanel.Direction方法的具体用法?Java DockLayoutPanel.Direction怎么用?Java DockLayoutPanel.Direction使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.gwt.user.client.ui.DockLayoutPanel的用法示例。


在下文中一共展示了DockLayoutPanel.Direction方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: maximize

import com.google.gwt.user.client.ui.DockLayoutPanel; //导入方法依赖的package包/类
@Override
public void maximize() {
  DockLayoutPanel.Direction direction = splitLayoutPanel.getWidgetDirection(widget);

  if (DockLayoutPanel.Direction.NORTH == direction
      || DockLayoutPanel.Direction.SOUTH == direction) {
    int maxHeight = splitLayoutPanel.getOffsetHeight() - splitLayoutPanel.getSplitterSize();
    splitLayoutPanel.setWidgetSize(widget, maxHeight);
    splitLayoutPanel.animate(DURATION);

  } else if (DockLayoutPanel.Direction.WEST == direction
      || DockLayoutPanel.Direction.EAST == direction) {
    int maxWidth = splitLayoutPanel.getOffsetWidth() - splitLayoutPanel.getSplitterSize();
    splitLayoutPanel.setWidgetSize(widget, maxWidth);
    splitLayoutPanel.animate(DURATION);
  }
}
 
开发者ID:eclipse,项目名称:che,代码行数:18,代码来源:WorkBenchPartControllerImpl.java

示例2: processRegion

import com.google.gwt.user.client.ui.DockLayoutPanel; //导入方法依赖的package包/类
private static void processRegion(DockLayoutPanel p, String region, boolean show) {

            DockLayoutPanel.Direction dir = region.equals("north") ? DockLayoutPanel.Direction.NORTH :
                                            region.equals("south") ? DockLayoutPanel.Direction.SOUTH :
                                            region.equals("east") ? DockLayoutPanel.Direction.EAST :
                                            region.equals("west") ? DockLayoutPanel.Direction.WEST : DockLayoutPanel.Direction.CENTER;
            for(int i = 0; i < p.getWidgetCount(); i++) {
                DockLayoutPanel.Direction wd = p.getWidgetDirection(p.getWidget(i));
                if (wd == dir) {
                    if (show) {
                        GwtUtil.DockLayout.showWidget(p, p.getWidget(i));
                    } else {
                        GwtUtil.DockLayout.hideWidget(p, p.getWidget(i));
                    }
                }
            }
        }
 
开发者ID:lsst,项目名称:firefly,代码行数:18,代码来源:TableViewListenerCreator.java


注:本文中的com.google.gwt.user.client.ui.DockLayoutPanel.Direction方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。