Java 类com.google.gwt.user.client.ui.DockLayoutPanel 实例源码

项目:ephesoft    文件:ValidatePanel.java   
/**
 * @param eventBus
 */
private void addAnimationCompleteEventHandler(HandlerManager eventBus) {
    eventBus.addHandler(AnimationCompleteEvent.type, new AnimationCompleteEventHandler() {

        @Override
        public void onAnimationComplete(AnimationCompleteEvent event) {
            if (event.getIndex() == 1) {
                ((Button) ((HorizontalPanel) ((DockLayoutPanel) event.getWidget()).getWidget(0)).getWidget(0)).setFocus(true);
            } else {
                presenter.setFocus();
            }

        }
    });
}
项目:ephesoft    文件:FolderManagementView.java   
public void setInitialFolderManagementView(FolderManagementController controller, String parentFolderPath, String baseFolderUrl,
        Map<String, String> batchClassesMap) {
    Label footer = new Label();
    folderTableView = new FolderTableView(footer);

    folderTablePresenter = new FolderTablePresenter(controller, folderTableView, parentFolderPath, baseFolderUrl);

    folderSystemTreeView = new FolderSystemTreeView();

    folderSystemTreePresenter = new FolderSystemTreePresenter(controller, folderSystemTreeView, parentFolderPath, footer);

    SplitLayoutPanel mainContentPanel = new SplitLayoutPanel();
    DockLayoutPanel leftLayoutPanel = new DockLayoutPanel(Unit.PCT);
    ScrollPanel treeScrollPanel = new ScrollPanel();
    treeScrollPanel.add(folderSystemTreeView);
    FolderSelectionWidget folderSelectionWidget = new FolderSelectionWidget(batchClassesMap, controller.getEventBus());
    leftLayoutPanel.addNorth(folderSelectionWidget, 10);
    leftLayoutPanel.add(treeScrollPanel);
    mainContentPanel.addWest(leftLayoutPanel, 200);
    DockLayoutPanel contentMainPanel = new DockLayoutPanel(Unit.PCT);
    contentMainPanel.add(folderTableView);
    contentMainPanel.addStyleName(FolderManagementConstants.WHITE_BACKGROUND);
    mainContentPanel.add(contentMainPanel);
    mainPanel.add(mainContentPanel);
    ScreenMaskUtility.unmaskScreen();
}
项目:che    文件:WorkBenchPartControllerImpl.java   
@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);
  }
}
项目:che    文件:OpenLocationViewImpl.java   
public OpenLocationViewImpl() {
  DockLayoutPanel panel = new DockLayoutPanel(Style.Unit.PX);

  NodeStorage storage =
      new NodeStorage(
          new NodeUniqueKeyProvider() {
            @Override
            public String getKey(@NotNull Node item) {
              return String.valueOf(item.hashCode());
            }
          });
  NodeLoader loader = new NodeLoader(Collections.<NodeInterceptor>emptySet());
  tree = new Tree(storage, loader);
  panel.add(tree);
  setContentWidget(panel);
  panel.ensureDebugId("LS-open-location-panel");
}
项目:che    文件:GitHubAuthenticatorViewImpl.java   
@Inject
public GitHubAuthenticatorViewImpl(
    DialogFactory dialogFactory,
    GitHubLocalizationConstant locale,
    ProductInfoDataProvider productInfoDataProvider) {
  this.dialogFactory = dialogFactory;
  this.locale = locale;

  isGenerateKeys = new CheckBox(locale.authGenerateKeyLabel());
  isGenerateKeys.setValue(true);

  contentPanel = new DockLayoutPanel(Style.Unit.PX);
  contentPanel.addNorth(
      new InlineHTML(locale.authorizationDialogText(productInfoDataProvider.getName())), 20);
  contentPanel.addNorth(isGenerateKeys, 20);
}
项目:che    文件:FindUsagesViewImpl.java   
@Inject
public FindUsagesViewImpl(
    NodeFactory nodeFactory, JavaLocalizationConstant localizationConstant) {
  this.nodeFactory = nodeFactory;
  setTitle(localizationConstant.findUsagesPartTitle());
  DockLayoutPanel panel = new DockLayoutPanel(Style.Unit.PX);

  NodeStorage storage =
      new NodeStorage(
          new NodeUniqueKeyProvider() {
            @Override
            public String getKey(@NotNull Node item) {
              return String.valueOf(item.hashCode());
            }
          });
  NodeLoader loader = new NodeLoader(Collections.<NodeInterceptor>emptySet());
  tree = new Tree(storage, loader);
  panel.add(tree);
  setContentWidget(panel);
  panel.ensureDebugId("findUsages-panel");
}
项目:firefly    文件:PopupContainerForRegion.java   
public void show() {

        LayoutManager lm= Application.getInstance().getLayoutManager();
        _layout.clear();

        lm.getRegion(LayoutManager.POPOUT_REGION).setDisplay(GwtUtil.wrap(_layout,4,4,4,4,true));
//        lm.getRegion(LayoutManager.POPOUT_REGION).setDisplay(_layout);
//        lm.getRegion(LayoutManager.POPOUT_REGION).show();
        _layout.addNorth(headerBar, TOOLBAR_HEIGHT);
        DockLayoutPanel p= new DockLayoutPanel(Style.Unit.PX);
//        _layout.add(GwtUtil.wrap(_popout.getToplevelExpandRoot(), 1,4,1,4));
        _layout.add(GwtUtil.wrap(_popout.getToplevelExpandRoot(), 1,4,1,4));

        _showing= true;
        GwtUtil.setHidden(_close, !isCloseShowing());

        _close.setDesc("Close");
    }
项目:firefly    文件:PopupPane.java   
protected Widget makeTopHeader(String title) {
        setTitleLabel(title);
        titleLabel.setWidth("100%");
        DOM.setStyleAttribute(titleLabel.getElement(),"cursor", "default");

        Widget close = makeCloseButton(true);

        DockLayoutPanel header = new DockLayoutPanel(Style.Unit.PX);

        header.setStyleName("title-bar");
//        header.addStyleName(_ffCss.titleBgColor());
        header.addStyleName(_ffCss.titleColor());
        header.addStyleName(_ffCss.popupTitleHorizontalBackground());
        titleLabel.addStyleName("title-label");

        header.addEast(close, 12);
        header.add(titleLabel);
        header.setHeight("14px");
        header.setWidth("100%");
        return header;
    }
项目:firefly    文件:LSSTCatalogSearchUI.java   
public Widget makeUI() {
    spacialArea= new SpacialSelectUI(new SpacialSelectUI.TabChange() {
                public void onTabChange() {
                    adjustSpacialHeight();
                }
            });
    spacialArea.setSpacialOptions(new HashSet<SpacialType>(Arrays.asList(SpacialType.Cone, SpacialType.Box)), DataSetInfo.DataTypes.CATALOGS);
    spacialArea.updateSearchMax(3600);
    mainPanel.setSize("100%", "100%");

    topArea= new DockLayoutPanel(Style.Unit.PX);
    Widget spacialAreaWrap= new SimplePanel(spacialArea);
    topArea.add(spacialAreaWrap);
    mainPanel.addNorth(topArea, spacialArea.getHeightRequired());
    DOM.getParent(topArea.getElement()).addClassName("change-height-transition");
    return mainPanel;
}
项目:firefly    文件:PopoutControlsUI.java   
void reinit(PopoutWidget.ViewType viewType, DockLayoutPanel expandRoot) {
        expandRoot.clear();
        doBlink(false);
        _expandGrid.clear();
        _expandDeck.clear();
        if (_topBar!=null) expandRoot.addNorth(_topBar, PopoutWidget.CONTROLS_HEIGHT_LARGE);
//        if (!AllPlots.getInstance().isMenuBarPopup()) {
//            expandRoot.addSouth(AllPlots.getInstance().getMenuBarInlineStatusLine(),25);
//        }
        if (viewType== PopoutWidget.ViewType.GRID) {
            expandRoot.add(_expandGrid);
            _expandGrid.setPixelSize(expandRoot.getOffsetWidth(), expandRoot.getOffsetHeight());
//            GwtUtil.setHidden(oneImageFillStyle, true);
        }
        else if (viewType== PopoutWidget.ViewType.ONE) {
            expandRoot.add(_expandDeck);
//            GwtUtil.setHidden(oneImageFillStyle, false);
        }
        GwtUtil.setHidden(_controlPanel, _originalExpandedList.size() <= 1);

    }
项目:firefly    文件:TableViewListenerCreator.java   
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));
                    }
                }
            }
        }
项目:gef-gwt    文件:GwtRulerComposite.java   
/**
 * Constructor
 * 
 * @param parent
 *            a widget which will be the parent of the new instance (cannot
 *            be null)
 * @param style
 *            the style of widget to construct
 * @see Composite#Composite(org.eclipse.swt.widgets.Composite, int)
 */
// public GwtRulerComposite(Composite parent, int style) {
// super(parent, style);
// addDisposeListener(new DisposeListener() {
// public void widgetDisposed(DisposeEvent e) {
// disposeResources();
// }
// });
// }

public GwtRulerComposite(LayoutPanel element) {
    super(null, SWT.NONE);
    this.rootElement = element;
    // create dock panel here with rulers
    dockLayoutPanel = new DockLayoutPanel(Unit.PX);
    dockLayoutPanel.getElement().setId("INNER_DOCK_LAYOUT_PANEL");
    rootElement.add(dockLayoutPanel);

    northPanel = new DockLayoutPanel(Unit.PX);
    northPanel.getElement().setId("NORTH_DOCK_LAYOUT_PANEL");
    dockLayoutPanel.addNorth(northPanel, 19);

    northPanel.addWest(createPickle(), 19);

    topPartInDockPanel = new Composite(null, SWT.NONE);
    LayoutPanel topPanel = (LayoutPanel) topPartInDockPanel
            .getNativeWidget();
    topPanel.getElement().setId("TOP_RULER");
    northPanel.add(topPanel);
    northPanel.forceLayout();

    westPartInDockPanel = new Composite(null, SWT.NONE);
    westPanel = (LayoutPanel) westPartInDockPanel.getNativeWidget();
    westPanel.getElement().setId("LEFT_RULER");
    dockLayoutPanel.addWest(westPanel, 19);

    view = (LayoutPanel) getGwtWidget();
    dockLayoutPanel.add(view);
    dockLayoutPanel.forceLayout();
}
项目:incubator-wave    文件:WebClient.java   
private void setupUi() {
  // Set up UI
  DockLayoutPanel self = BINDER.createAndBindUi(this);
  RootPanel.get("app").add(self);
  // DockLayoutPanel forcibly conflicts with sensible layout control, and
  // sticks inline styles on elements without permission. They must be
  // cleared.
  self.getElement().getStyle().clearPosition();
  splitPanel.setWidgetMinSize(searchPanel, 300);
  AttachmentManagerProvider.init(AttachmentManagerImpl.getInstance());

  if (LogLevel.showDebug()) {
    logPanel.enable();
  } else {
    logPanel.removeFromParent();
  }

  setupSearchPanel();
  setupWavePanel();

  FocusManager.init();
}
项目:plugin-datasource    文件:ViewWithToolbar.java   
public ViewWithToolbar(final PartStackUIResources resources) {
    container = new DockLayoutPanel(Style.Unit.PX);
    initWidget(container);
    container.setSize("100%", "100%");
    toolBar = new LayoutPanel();
    toolBar.addStyleName(resources.partStackCss().ideBasePartToolbar());
    container.addNorth(toolBar, 20);

    // this hack used for adding box shadow effect to toolbar
    toolBar.getElement().getParentElement().getStyle().setOverflow(Style.Overflow.VISIBLE);
}
项目:gwtmockito    文件:GwtMockitoWidgetBaseClassesTest.java   
@Test
public void testPanels() throws Exception {
  invokeAllAccessibleMethods(new AbsolutePanel() {});
  invokeAllAccessibleMethods(new CellPanel() {});
  invokeAllAccessibleMethods(new ComplexPanel() {});
  invokeAllAccessibleMethods(new DeckLayoutPanel() {});
  invokeAllAccessibleMethods(new DeckPanel() {});
  invokeAllAccessibleMethods(new DecoratorPanel() {});
  invokeAllAccessibleMethods(new DockLayoutPanel(Unit.PX) {});
  invokeAllAccessibleMethods(new DockPanel() {});
  invokeAllAccessibleMethods(new FlowPanel() {});
  invokeAllAccessibleMethods(new FocusPanel() {});
  invokeAllAccessibleMethods(new HorizontalPanel() {});
  invokeAllAccessibleMethods(new HTMLPanel("") {});
  invokeAllAccessibleMethods(new LayoutPanel() {});
  invokeAllAccessibleMethods(new PopupPanel() {});
  invokeAllAccessibleMethods(new RenderablePanel("") {});
  invokeAllAccessibleMethods(new ResizeLayoutPanel() {});
  invokeAllAccessibleMethods(new SimpleLayoutPanel() {});
  invokeAllAccessibleMethods(new SimplePanel() {});
  invokeAllAccessibleMethods(new SplitLayoutPanel() {});
  invokeAllAccessibleMethods(new StackPanel() {});
  invokeAllAccessibleMethods(new VerticalPanel() {});
}
项目:essence    文件:AnalyzerAndReportUI.java   
public void setupAnalyzerAndReportPanel2(ScrollPanel analyzerPanel, DockLayoutPanel dPanel) {
    // Create a CellTable.
    final CellTable<AnalyzerResultDTO> table = new CellTable<AnalyzerResultDTO>();
    setupAnalyzeResultDisplayPanel(table, dataProvider);

    SimplePager.Resources pagerResources = GWT.create(SimplePager.Resources.class);
    SimplePager pager = new SimplePager(TextLocation.CENTER, pagerResources, false, 10, true);
    pager.setDisplay(table);
    dataProvider.addDataDisplay(table);

    // Set the width of each column.
    // table.setColumnWidth(nameColumn, 35.0, Unit.PCT);
    final Label errorLabelDisplay = new Label();

    VerticalPanel displayPanel = new VerticalPanel();
    displayPanel.add(pager);
    displayPanel.add(table);
    displayPanel.add(errorLabelDisplay);
    displayPanel.setHorizontalAlignment(VerticalPanel.ALIGN_RIGHT);
    analyzerPanel.add(displayPanel);

    // DoS detector panel
    // Any detector error message
    VerticalPanel vPanel = new VerticalPanel();
    final Label errorLabelActivateDetector = new Label();

    HorizontalPanel detectorPanel = new HorizontalPanel();
    detectorPanel.addStyleName("essencePanel");
    detectorPanel.setSpacing(10);
    setupDetectorPanel(detectorPanel, errorLabelActivateDetector, dataProvider);
    vPanel.add(detectorPanel);  

    vPanel.add(errorLabelActivateDetector);
    dPanel.addNorth(vPanel, 10);
}
项目:Wiab.pro    文件:WebClient.java   
private void setupRootPanel() {
  DockLayoutPanel self = BINDER.createAndBindUi(this);
  RootPanel.get(APP_ELEMENT_ID).add(self);
  // DockLayoutPanel forcibly conflicts with sensible layout control, and
  // sticks inline styles on elements without permission. They must be
  // cleared.
  self.getElement().getStyle().clearPosition();
}
项目:ontobrowser    文件:OntoBrowser.java   
private void layoutViews() {
    TermDetailsView termView = new TermDetailsView(eventBus, service);
    TermSynonymsView synonymsView = new TermSynonymsView(eventBus, service);
    RelatedTermsView relationshipsView = new RelatedTermsView(eventBus, service);
    SearchInputView searchInputView = new SearchInputView(eventBus, service);
    SearchOptionsView searchOptionsView = new SearchOptionsView(eventBus, service);
    SearchResultsView searchResultsView = new SearchResultsView(eventBus, service, searchOptionsView);
    SVGView svgView = new SVGView(eventBus, service);
    //CodeListView codelistView = new CodeListView(eventBus, service);

    DockLayoutPanel layoutPanel = new DockLayoutPanel(Unit.PX);
    HorizontalPanel southPanel = new HorizontalPanel(); 
    southPanel.add(termView);
    southPanel.add(synonymsView);
    southPanel.add(relationshipsView);

    southPanel.setCellWidth(termView, "33.33%");
    southPanel.setCellWidth(synonymsView, "33.33%");
    southPanel.setCellWidth(relationshipsView, "33.33%");
    southPanel.setWidth("100%");

    FlowPanel eastPanel = new FlowPanel();                                      
    eastPanel.add(searchInputView);
    eastPanel.add(searchOptionsView);
    eastPanel.add(searchResultsView);

    layoutPanel.addNorth(menuBar, 30);
    layoutPanel.addSouth(southPanel, 197);      
    layoutPanel.addEast(eastPanel, 300);    
    layoutPanel.add(svgView);

    RootLayoutPanel.get().add(layoutPanel);
}
项目:che    文件:BaseView.java   
public BaseView() {
  container = new DockLayoutPanel(Style.Unit.PX);
  container.getElement().setAttribute("role", "part");
  container.setSize("100%", "100%");
  container.getElement().getStyle().setOutlineStyle(Style.OutlineStyle.NONE);
  initWidget(container);
}
项目:che    文件:FindResultViewImpl.java   
@Inject
public FindResultViewImpl(
    FindResultViewImplUiBinder uiBinder,
    FindResultNodeFactory findResultNodeFactory,
    CoreLocalizationConstant localizationConstant) {
  NodeStorage nodeStorage = new NodeStorage();
  NodeLoader loader = new NodeLoader(emptySet());
  tree = new Tree(nodeStorage, loader);

  Widget contentWidget = uiBinder.createAndBindUi(this);
  setContentWidget(contentWidget);

  setTitle(localizationConstant.actionFullTextSearch());
  this.findResultNodeFactory = findResultNodeFactory;

  nextBtn.setHTML("<i class=\"fa fa-angle-right\" aria-hidden=\"true\"></i>");
  previousBtn.setHTML("<i class=\"fa fa-angle-left\" aria-hidden=\"true\"></i>");

  // do not remove debug id; it's needed for selenium tests
  tree.ensureDebugId("result-search-tree");
  ensureDebugId("find-info-panel");

  DockLayoutPanel dockLayoutPanel = (DockLayoutPanel) contentWidget;
  dockLayoutPanel.add(tree);

  tree.getSelectionModel()
      .addSelectionChangedHandler(event -> delegate.onSelectionChanged(event.getSelection()));

  tree.setAutoSelect(true);
}
项目:che    文件:FindActionViewImpl.java   
@Inject
public FindActionViewImpl(
    Resources resources,
    KeyBindingAgent keyBindingAgent,
    ActionManager actionManager,
    AutoCompleteResources autoCompleteResources,
    ToolbarResources toolbarResources,
    FindActionViewImplUiBinder uiBinder) {
  this.resources = resources;
  this.keyBindingAgent = keyBindingAgent;
  this.actionManager = actionManager;
  this.toolbarResources = toolbarResources;
  this.presentationFactory = new PresentationFactory();

  css = autoCompleteResources.autocompleteComponentCss();
  css.ensureInjected();

  DockLayoutPanel rootElement = uiBinder.createAndBindUi(this);
  setWidget(rootElement);
  setAutoHideEnabled(true);
  setAnimationEnabled(true);

  layoutPanel.setWidgetHidden(actionsPanel, true);
  layoutPanel.setHeight("60px");

  addCloseHandler(event -> delegate.onClose());

  includeNonMenu.addValueChangeHandler(
      event -> {
        includeNonMenu.getElement().setAttribute("checked", Boolean.toString(event.getValue()));
        delegate.nameChanged(nameField.getText(), event.getValue());
      });
}
项目:che    文件:QuickOpenViewImpl.java   
@Inject
public QuickOpenViewImpl(
    Resources resources,
    AutoCompleteResources autoCompleteResources,
    QuickOpenViewImplUiBinder uiBinder,
    LanguageServerResources languageServerResources) {
  this.resources = resources;
  this.languageServerResources = languageServerResources;

  css = autoCompleteResources.autocompleteComponentCss();
  css.ensureInjected();

  DockLayoutPanel rootElement = uiBinder.createAndBindUi(this);
  setWidget(rootElement);
  setAutoHideEnabled(true);
  setAnimationEnabled(true);

  layoutPanel.setWidgetHidden(actionsPanel, true);

  addCloseHandler(
      new CloseHandler<PopupPanel>() {
        @Override
        public void onClose(CloseEvent<PopupPanel> event) {
          delegate.onClose(event.isAutoClosed());
        }
      });
}
项目:firefly    文件:TitlePanel.java   
public TitlePanel(String title, Widget body, boolean showTitle) {
        titleWrapper = new HorizontalPanel();
        makeTitleLabel(titleWrapper);
        titleWrapper.add(titleLabel);
        titleWrapper.add(titleBar);
        titleWrapper.add(GwtUtil.getFiller(10, 1));
        titleWrapper.setCellWidth(titleBar, "100%");
        titleWrapper.setCellHorizontalAlignment(titleBar, HorizontalPanel.ALIGN_RIGHT);

        dlp = new DockLayoutPanel(Style.Unit.PX);
        if (showTitle) {
            dlp.addNorth(titleWrapper, 23);
            dlp.addNorth(GwtUtil.getFiller(1,2), 2);
        }
        dlp.add(body);
        dlp.setSize("100%", "100%");
//
//
//        FlowPanel vp = new FlowPanel();
//        vp.add(titleWrapper);
//        vp.add(body);
//        vp.setSize("100%", "100%");
        initWidget(dlp);
        this.body = body;

//        dlp.setStyleName("standard-border");
        setTitle(title);
        if (BrowserUtil.isIE()) {
            DOM.setStyleAttribute(titleLabel.getElement(), "whiteSpace", "nowrap");
        }
    }
项目:firefly    文件:GwtUtil.java   
public static void hideWidget(DockLayoutPanel splitPanel, Widget widget) {
    if (!isHidden(widget)) {
        hide(widget);
        setSplitterVisible(splitPanel, widget, false);
        splitPanel.forceLayout();
    }
}
项目:firefly    文件:GwtUtil.java   
public static void hideWidget(SplitLayoutPanel splitPanel, Widget widget) {
    hideWidget((DockLayoutPanel) splitPanel, widget);
}
项目:firefly    文件:GwtUtil.java   
public static void showWidget(DockLayoutPanel splitPanel, Widget widget) {
    if (isHidden(widget)) {
        show(widget);
        setSplitterVisible(splitPanel, widget, true);
        splitPanel.forceLayout();
    }
}
项目:firefly    文件:GwtUtil.java   
private static void setSplitterVisible(DockLayoutPanel splitPanel, Widget widget, boolean isVisible) {
    int idx = splitPanel.getWidgetIndex(widget);
    Widget splitter = splitPanel.getWidget(idx + 1);  // this should be the splitter
    if (splitter != null) {
        splitter.setVisible(isVisible);
    }
}
项目:firefly    文件:TableViewListenerCreator.java   
public void handleEvent(WebEvent ev) {

            if (!(ev.getSource() instanceof TablePanel)) return;

            TablePanel table = (TablePanel) ev.getSource();
            String view = StringUtils.isEmpty(ev.getData()) ? table.getActiveView().getName() : ev.getData().toString();

            if (!this.getQuerySources().contains(table.getName())){
                return;
            }

            List<String> showList = new ArrayList<String>();
            List<String> hideList = new ArrayList<String>();

            addToList(showList, ".show");
            addToList(hideList, ".hide");
            addToList(showList, view + ".show");
            addToList(hideList, view + ".hide");

            for(DockLayoutPanel p : getEventHub().getLayoutPanels()) {
                for(Region r : Region.values()) {
                    if (showList.indexOf("." + r.name()) >=0 ||
                        showList.indexOf(p.getTitle() + "." + r.name()) >= 0 ) {
                        processRegion(p, r.name(), true);
                    }
                    if (hideList.indexOf("." + r.name()) >=0 ||
                        hideList.indexOf(p.getTitle() + "." + r.name()) >= 0 ) {
                        processRegion(p, r.name(), false);
                    }
                }
            }

        }
项目:firefly    文件:AlertManager.java   
protected Widget makeAniIcon() {
    final DockLayoutPanel flyer = new DockLayoutPanel(Style.Unit.PCT);
    Label header = new Label("Alerts");
    Label body = new Label("Click on top left corner to re-open this dialog");
    body.setStyleName("popup-background");
    body.addStyleName("standard-border");
    header.addStyleName("title-bg-color");
    header.addStyleName("title-color");

    flyer.addNorth(header, 20);
    flyer.add(body);
    GwtUtil.setStyle(flyer, "zIndex", "10");
    return flyer;
}
项目:mvp4g-examples    文件:ShellView.java   
public ShellView() {
  shell = new DockLayoutPanel(Style.Unit.PX);

  header = new SimpleLayoutPanel();
  navigation = new SimpleLayoutPanel();
  content = new SimpleLayoutPanel();

  shell.addNorth(header, 75);
  shell.addWest(navigation, 275);
  shell.add(content);

  initWidget(shell);
}
项目:GWTMarkdownEditor    文件:MarkdownEditor.java   
private void createRightPanels() {
    DockLayoutPanel rightPanel=new DockLayoutPanel(Unit.PX);
    rightPanel.setSize("100%", "100%");
    this.add(rightPanel);

    createOptionArea(rightPanel);

    rightTabPanel = new TabLayoutPanel(40,Unit.PX);
    rightPanel.add(rightTabPanel);
    rightTabPanel.setSize("100%","100%");
    createPreviewArea(rightTabPanel);
    createHtmlArea(rightTabPanel);
    rightTabPanel.selectTab(0);
}
项目:GWTMarkdownEditor    文件:MarkdownEditor.java   
private void createLeftPanels() {
    DockLayoutPanel leftPanel=new DockLayoutPanel(Unit.PX);

    leftPanel.setSize("100%", "100%");
    this.addWest(leftPanel,560);
    createToolbars(leftPanel);
    createTextAreas(leftPanel);

}
项目:Peergos    文件:Mail.java   
/**
 * This method constructs the application user interface by instantiating
 * controls and hooking up event handler.
 */
public void onModuleLoad() {
  // Inject global styles.
  GWT.<GlobalResources>create(GlobalResources.class).css().ensureInjected();

  // Create the UI defined in Mail.ui.xml.
  DockLayoutPanel outer = binder.createAndBindUi(this);

  // Get rid of scrollbars, and clear out the window's built-in margin,
  // because we want to take advantage of the entire client area.
  Window.enableScrolling(false);
  Window.setMargin("0px");

  // Special-case stuff to make topPanel overhang a bit.
  Element topElem = outer.getWidgetContainerElement(topPanel);
  topElem.getStyle().setZIndex(2);
  topElem.getStyle().setOverflow(Overflow.VISIBLE);

  // Listen for item selection, displaying the currently-selected item in
  // the detail area.
  mailList.setListener(new MailList.Listener() {
    public void onItemSelected(MailItem item) {
      mailDetail.setItem(item);
    }
  });

  // Add the outer panel to the RootLayoutPanel, so that it will be
  // displayed.
  RootLayoutPanel root = RootLayoutPanel.get();
  root.add(outer);
}
项目:swarm    文件:Mail.java   
/**
 * This method constructs the application user interface by instantiating
 * controls and hooking up event handler.
 */
public void onModuleLoad() {
  // Inject global styles.
  GWT.<GlobalResources>create(GlobalResources.class).css().ensureInjected();

  // Create the UI defined in Mail.ui.xml.
  DockLayoutPanel outer = binder.createAndBindUi(this);

  // Get rid of scrollbars, and clear out the window's built-in margin,
  // because we want to take advantage of the entire client area.
  Window.enableScrolling(false);
  Window.setMargin("0px");

  // Special-case stuff to make topPanel overhang a bit.
  Element topElem = outer.getWidgetContainerElement(topPanel);
  topElem.getStyle().setZIndex(2);
  topElem.getStyle().setOverflow(Overflow.VISIBLE);

  // Listen for item selection, displaying the currently-selected item in
  // the detail area.
  mailList.setListener(new MailList.Listener() {
    public void onItemSelected(MailItem item) {
      mailDetail.setItem(item);
    }
  });

  // Add the outer panel to the RootLayoutPanel, so that it will be
  // displayed.
  RootLayoutPanel root = RootLayoutPanel.get();
  root.add(outer);
}
项目:CAVilLag    文件:CAVilLag.java   
protected void addPreviewTab() {
    DockLayoutPanel p = new DockLayoutPanel(Unit.EM);
    Button b = new Button("Save!", new ClickHandler() {
          public void onClick(ClickEvent event) {
            Window.alert("This will save...");
          }
        });
    p.addNorth(new HTML("header"), 2);
    p.addSouth(new HTML("footer"), 2);
    p.addWest(b, 10);
    p.add(new HTML("Here we will display the preview"));
    p.setWidth(Window.getClientWidth()/5*4+"px");
    p.setHeight(Window.getClientHeight()/5*4+"px");
    main.add(p, "preview & save");
}
项目:GWT-Multi-Activities    文件:RegionVisibilityVisitor.java   
public RegionVisibilityVisitor(RegionContainer northRegionContainer, RegionContainer southRegionContainer, RegionContainer eastRegionContainer,
        RegionContainer westRegionContainer, RegionContainer centerRegionContainer, DockLayoutPanel rootContainer)
{
    this.northRegionContainer = northRegionContainer;
    this.southRegionContainer = southRegionContainer;
    this.westRegionContainer = westRegionContainer;
    this.eastRegionContainer = eastRegionContainer;
    this.centerRegionContainer = centerRegionContainer;
    this.rootContainer = rootContainer;
}
项目:essence    文件:DecisionUI.java   
public void setupDecisionPanels(ScrollPanel decisionPanel, DockLayoutPanel dPanel) {
    // Create a CellTable.
    final CellTable<DecisionDTO> table = new CellTable<DecisionDTO>();
    setupDecisionDisplayPanel(table, dataProvider);

    SimplePager.Resources pagerResources = GWT.create(SimplePager.Resources.class);
    SimplePager pager = new SimplePager(TextLocation.CENTER, pagerResources, false, 10, true);
    pager.setDisplay(table);
    dataProvider.addDataDisplay(table);

    final SingleSelectionModel<DecisionDTO> selectionModel = new SingleSelectionModel<DecisionDTO>();
    table.setSelectionModel(selectionModel);

    // Set the width of each column.
    // table.setColumnWidth(nameColumn, 35.0, Unit.PCT);
    final Label errorLabelDisplay = new Label();

    greetingService.getDecisions(new AsyncCallbackAdapter<List<DecisionDTO>>() {
        /*
        public void onFailure(Throwable caught) {
            errorLabelDisplay.setText(SERVER_ERROR);
        }
        */
        // Called by onFailure if the session is still valid
        public void doFailureAction() {
            errorLabelDisplay.setText(SERVER_ERROR);
        }

        public void onSuccess(List<DecisionDTO> result) {
            dataProvider.setList(result);
        }
    });

    VerticalPanel displayPanel = new VerticalPanel();
    displayPanel.add(pager);
    displayPanel.add(table);
    displayPanel.add(errorLabelDisplay);
    displayPanel.setHorizontalAlignment(VerticalPanel.ALIGN_RIGHT);
    decisionPanel.add(displayPanel);

    VerticalPanel vPanel = new VerticalPanel();
    final Label errorLabelControl = new Label();
    HorizontalPanel controlPanel = new HorizontalPanel();
    controlPanel.addStyleName("essencePanel");
    controlPanel.setSpacing(10);
    setupControlPanel(controlPanel, errorLabelControl, dataProvider);
    vPanel.add(controlPanel);   

    vPanel.add(errorLabelControl);
    dPanel.addNorth(vPanel, 10);
}
项目:essence    文件:ActionUI.java   
public void setupActionPanels(ScrollPanel ActionPanel, DockLayoutPanel dPanel) {


    // Create a CellTable.
    final CellTable<ActionDTO> table = new CellTable<ActionDTO>();
    setupActionDisplayPanel(table, dataProvider);

    SimplePager.Resources pagerResources = GWT.create(SimplePager.Resources.class);
    SimplePager pager = new SimplePager(TextLocation.CENTER, pagerResources, false, 10, true);
    pager.setDisplay(table);
    dataProvider.addDataDisplay(table);

    final SingleSelectionModel<ActionDTO> selectionModel = new SingleSelectionModel<ActionDTO>();
    table.setSelectionModel(selectionModel);

    // Set the width of each column.
    // table.setColumnWidth(nameColumn, 35.0, Unit.PCT);
    final Label errorLabelDisplay = new Label();

    greetingService.getActions(new AsyncCallbackAdapter<List<ActionDTO>>() {
        /*
        public void onFailure(Throwable caught) {
            errorLabelDisplay.setText(SERVER_ERROR);
        }
        */

        // Called by onFailure if the session is still valid
        public void doFailureAction() {
            errorLabelDisplay.setText(SERVER_ERROR);
        }

        public void onSuccess(List<ActionDTO> result) {
            dataProvider.setList(result);
        }
    });

    VerticalPanel displayPanel = new VerticalPanel();
    displayPanel.add(pager);
    displayPanel.add(table);
    displayPanel.add(errorLabelDisplay);
    displayPanel.setHorizontalAlignment(VerticalPanel.ALIGN_RIGHT);
    ActionPanel.add(displayPanel);

    VerticalPanel vPanel = new VerticalPanel();
    final Label errorLabelControl = new Label();
    HorizontalPanel controlPanel = new HorizontalPanel();
    controlPanel.addStyleName("essencePanel");
    controlPanel.setSpacing(10);
    setupControlPanel(controlPanel, errorLabelControl, dataProvider);
    vPanel.add(controlPanel);   

    vPanel.add(errorLabelControl);
    dPanel.addNorth(vPanel, 10);
}
项目:essence    文件:DecisionRuleUI.java   
public void setupDecisionRulePanel(ScrollPanel analyzerPanel, DockLayoutPanel dPanel) {


    final Label errorLabelDisplay = new Label();

    // Create a CellTable.
    final CellTable<DecisionRuleDTO> table = new CellTable<>();
    setupDecisionRuleDisplayPanel(table, errorLabelDisplay);

    SimplePager.Resources pagerResources = GWT.create(SimplePager.Resources.class);
    SimplePager pager = new SimplePager(TextLocation.CENTER, pagerResources, false, 10, true);
    pager.setDisplay(table);
    dataProvider.addDataDisplay(table);

    final SingleSelectionModel<DecisionRuleDTO> selectionModel = new SingleSelectionModel<>();
    table.setSelectionModel(selectionModel);

    greetingService.getDecisionRules(new AsyncCallbackAdapter<List<DecisionRuleDTO>>() {
        // Called by onFailure if the session is still valid
        public void doFailureAction() {
            errorLabelDisplay.setText(SERVER_ERROR);
        }

        public void onSuccess(List<DecisionRuleDTO> result) {
            dataProvider.setList(result);
        }
    });

    VerticalPanel displayPanel = new VerticalPanel();
    displayPanel.add(pager);
    displayPanel.add(table);
    displayPanel.add(errorLabelDisplay);
    displayPanel.setHorizontalAlignment(VerticalPanel.ALIGN_RIGHT);
    analyzerPanel.add(displayPanel);

    VerticalPanel vPanel = new VerticalPanel();
    final Label errorLabelActivateDetector = new Label();
    HorizontalPanel addRuleAndFilterPanel = new HorizontalPanel();
    addRuleAndFilterPanel.addStyleName("essencePanel");
    addRuleAndFilterPanel.setSpacing(10);
    setupControlPanel(addRuleAndFilterPanel, errorLabelActivateDetector, dataProvider);
    vPanel.add(addRuleAndFilterPanel);  

    vPanel.add(errorLabelActivateDetector);
    dPanel.addNorth(vPanel, 10);
}
项目:document-management-system    文件:ExtendedDockPanel.java   
/**
 * Extended dock panel
 */
public ExtendedDockPanel() {
    dockPanel = new DockLayoutPanel(Unit.PX);
    folderSelectPopup = new FolderSelectPopup();
    enableKeyShorcuts();

    // Object initialization
    topPanel = new TopPanel();
    leftBorderPanel = new VerticalBorderPanel();
    rightBorderPanel = new VerticalBorderPanel();
    bottomPanel = new BottomPanel();

    // Desktop panels initialization
    desktop = new Desktop();

    // Search panels initialization
    search = new Search();

    // Dashboard panel initialization
    dashboard = new Dashboard();

    // Administration panel initialization
    administration = new Administration();

    // set inner component's size
    setWidgetsSize();

    actualView = UIDockPanelConstants.DESKTOP;

    // Creates the dockPanel
    dockPanel.addNorth(topPanel, TopPanel.PANEL_HEIGHT);
    dockPanel.addSouth(bottomPanel, BottomPanel.PANEL_HEIGHT);
    dockPanel.addWest(leftBorderPanel, VERTICAL_BORDER_PANEL_WIDTH);
    dockPanel.addEast(rightBorderPanel, VERTICAL_BORDER_PANEL_WIDTH);
    dockPanel.add(desktop);

    Window.addResizeHandler(new ResizeHandler() {
        @Override
        public void onResize(ResizeEvent event) {
            setWidgetsSize();
            Main.get().mainPanel.topPanel.toolBar.windowResized(); // splitter changes
        }
    });

    initWidget(dockPanel);
}