Java Code Examples for com.google.gwt.user.client.ui.DockLayoutPanel#addNorth()

The following examples show how to use com.google.gwt.user.client.ui.DockLayoutPanel#addNorth() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ExtendedDockPanel.java    From document-management-system with GNU General Public License v2.0 4 votes vote down vote up
/**
 * 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);
}
 
Example 2
Source File: MainLayoutViewImpl.java    From core with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Inject
public MainLayoutViewImpl(final Header header, Footer footer, MessageCenter messageCenter, PlaceManager placeManager) {

    this.messageCenter = messageCenter;
    this.header = header;
    this.placeManager = placeManager;

    mainContentPanel = new LayoutPanel();
    mainContentPanel.setStyleName("main-content-panel");
    mainContentPanel.addStyleName("animated");

    // see http://www.w3.org/TR/wai-aria/states_and_properties#aria-live
    mainContentPanel.getElement().setAttribute("role", "region");
    mainContentPanel.getElement().setAttribute("aria-live", "polite");
    mainContentPanel.getElement().setId("main-content-area");

    headerPanel = new LayoutPanel();
    headerPanel.setStyleName("header-panel");
    headerPanel.getElement().setId("header");

    footerPanel = new LayoutPanel();
    footerPanel.setStyleName("footer-panel");
    footerPanel.getElement().setId("footer");

    panel = new DockLayoutPanel(Style.Unit.PX);
    panel.getElement().setAttribute("id", "container");

    panel.addNorth(headerPanel, 80);
    panel.addSouth(footerPanel, 42);
    panel.add(mainContentPanel);

    getHeaderPanel().add(header.asWidget());
    getFooterPanel().add(footer.asWidget());

    // the application window
    window = new DefaultWindow("");
   // window.addStyleName("animated");

    window.addCloseHandler(new CloseHandler<PopupPanel>() {
        @Override
        public void onClose(CloseEvent<PopupPanel> event) {

            Console.getPlaceManager().revealRelativePlace(-1);
            // clearing the slot:
            // this is necessary to signal GWTP that the slot is not used
            // without subsequent attempts to reveal the same place twice would not succeed
            Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() {
                @Override
                public void execute() {
                    presenter.clearSlot(MainLayoutPresenter.TYPE_Popup);
                }
            });

           /* window.removeStyleName(ACTIVE_CSS);
            window.addStyleName(INACTIVE_CSS);*/
        }
    });

    window.setWidth(640);
    window.setHeight(480);
    window.setAutoHideOnHistoryEventsEnabled(true);
    //window.setGlassStyleName("application-panel-glass");
    window.setGlassEnabled(true);
}
 
Example 3
Source File: MonitorView.java    From EasyML with Apache License 2.0 3 votes vote down vote up
@Override
public Widget asWidget() {

	DockLayoutPanel dockLayout = new DockLayoutPanel(Unit.PX);

	dockLayout.addNorth(headerView, 35);
	dockLayout.add(mainLayout);

	return dockLayout;
}