當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。