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


Java DockPanel类代码示例

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


DockPanel类属于com.google.gwt.user.client.ui包,在下文中一共展示了DockPanel类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: NavBar

import com.google.gwt.user.client.ui.DockPanel; //导入依赖的package包/类
public NavBar(CalendarWidget calendar) {
	super();
	this.calendar = calendar;

	setWidget(bar);
	bar.setStyleName("navbar");
	title.setStyleName("header");

	HorizontalPanel prevButtons = new HorizontalPanel();
	prevButtons.add(prevMonth);
	prevButtons.add(prevYear);

	HorizontalPanel nextButtons = new HorizontalPanel();
	nextButtons.add(nextYear);
	nextButtons.add(nextMonth);

	bar.add(prevButtons, DockPanel.WEST);
	bar.setCellHorizontalAlignment(prevButtons, DockPanel.ALIGN_LEFT);
	bar.add(nextButtons, DockPanel.EAST);
	bar.setCellHorizontalAlignment(nextButtons, DockPanel.ALIGN_RIGHT);
	bar.add(title, DockPanel.CENTER);
	bar.setVerticalAlignment(DockPanel.ALIGN_MIDDLE);
	bar.setCellHorizontalAlignment(title, HasAlignment.ALIGN_CENTER);
	bar.setCellVerticalAlignment(title, HasAlignment.ALIGN_MIDDLE);
	bar.setCellWidth(title, "100%");
}
 
开发者ID:kuzavas,项目名称:ephesoft,代码行数:27,代码来源:CalendarWidget.java

示例2: LASAnnotationsPanel

import com.google.gwt.user.client.ui.DockPanel; //导入依赖的package包/类
public LASAnnotationsPanel() {
	super();
	layoutPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);
	borderPanel.add(layoutPanel, DockPanel.CENTER);
	layoutPanel.setSize("100%", "100%");
	initWidget(borderPanel);
	borderPanel.setBorderWidth(1);
	layoutPanel.setBorderWidth(0);
	// setWidth(CONSTANTS.DEFAULT_ANNOTATION_PANEL_WIDTH());
	layoutPanel.setTitle(DEFAULT_TOOLTIP);
	closeButton.setTitle(DEFAULT_CLOSE_BUTTON_TOOLTIP);
	closeButton.getElement().getStyle().setProperty("textAlign", "center");
	closeButton.addClickHandler(new ClickHandler() {
		public void onClick(ClickEvent event) {
			setOpenAndPublish(false);
		}
	});
	layoutPanel.add(closeButton, DockPanel.EAST);
	layoutPanel.setCellHeight(closeButton, "1em");
	layoutPanel.setCellWidth(closeButton, "1em");
	closeButton.setSize("1em", "1em");
	layoutPanel.setCellHorizontalAlignment(closeButton,
			HasHorizontalAlignment.ALIGN_RIGHT);
}
 
开发者ID:NOAA-PMEL,项目名称:LAS,代码行数:25,代码来源:LASAnnotationsPanel.java

示例3: BaseScreen

import com.google.gwt.user.client.ui.DockPanel; //导入依赖的package包/类
/**
 * Constructor
 * 
 */
public BaseScreen() {
	
	lblTitleText.setWordWrap(false);
    lblTitle.add(lblTitleText);
    lblTitle.setSpacing(8);
	dockPanel.setStyleName("mdv-form");
    lblTitle.setStyleName("mdv-form-title");
    lblTitle.setWidth("100%");
    dockPanel.add(lblTitle, DockPanel.NORTH);
    dockPanel.setCellWidth(lblTitle, "100%");
    lblError.setStyleName(errorStyle);
    lblLoading.setStyleName(loadingStyle);

    lblLoading.setVisible(false);
    HorizontalPanel hp = new HorizontalPanel();
    // hp.setStyleName("");
    hp.add(lblError);
    hp.add(lblLoading);
    dockPanel.add(hp, DockPanel.NORTH);

}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:26,代码来源:BaseScreen.java

示例4: ConfirmNewProblemtScreen

import com.google.gwt.user.client.ui.DockPanel; //导入依赖的package包/类
public ConfirmNewProblemtScreen() {
	super();
	setTitleText("New Problem Confirmation");
	vPanel = new VerticalPanel();
	vPanel.setHeight("100%");
	dockPanel.add(vPanel, DockPanel.CENTER);
	dockPanel.setCellHeight(vPanel, "100%");
	initWidget(this.dockPanel);
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:10,代码来源:ConfirmNewProblemtScreen.java

示例5: RolePropertyPage

import com.google.gwt.user.client.ui.DockPanel; //导入依赖的package包/类
public RolePropertyPage() {
	HorizontalPanel toolbar = new HorizontalPanel();
	toolbar.add( new Button( "Add User", new ClickHandler() {
		@Override
		public void onClick( ClickEvent event ) {
			onNewUserClicked();
		}
	} ) );
	
	userList = new UserList("");
	
	DockPanel dock = new DockPanel();
	dock.add( toolbar,DockPanel.NORTH );
	dock.add( userList, DockPanel.CENTER );
	
	tabPanel.add( new SimplePanel(), "Role Properties" );
	tabPanel.add( dock, "Users" );
	
	panel.setWidget( tabPanel );
}
 
开发者ID:RISCOSS,项目名称:riscoss-corporate,代码行数:21,代码来源:RolePropertyPage.java

示例6: MissingDataDialog

import com.google.gwt.user.client.ui.DockPanel; //导入依赖的package包/类
public MissingDataDialog( JMissingData md, String ras ) {
	
	this.ras = ras;
	
	dialog.setText( "Enter Missing Data Information" );
	
	inputForm.load( md );
	
	DockPanel dock = new DockPanel();
	dock.add( inputForm, DockPanel.CENTER );
	dock.add( new Button( "Done", new ClickHandler() {
		@Override
		public void onClick( ClickEvent event ) {
			onDone();
		}
	} ), DockPanel.SOUTH );
	dialog.setWidget( dock );
	
}
 
开发者ID:RISCOSS,项目名称:riscoss-corporate,代码行数:20,代码来源:MissingDataDialog.java

示例7: layout

import com.google.gwt.user.client.ui.DockPanel; //导入依赖的package包/类
private void layout() {

        formPanel.clear();
        navPanel.clear();

        if (lists.size()==1 && lists.get(0).getWidgetCount()==1) {
            navPanel.setVisible(false);
            if (navPanel.getParent() instanceof DockPanel) {
                DockPanel dp = (DockPanel)navPanel.getParent();
                dp.remove(navPanel);
            }
        }
        else {
            for (int i = 0; i < lists.size(); i++) {
                if (i != 0) {
                    SimplePanel spacer = new SimplePanel();
                    spacer.setPixelSize(1,10);
                    navPanel.add(spacer);
                }
                LinksPanel.ULList l = lists.get(i);
                if (l != null) {
                    navPanel.add(l);
                }
            }
        }        
    }
 
开发者ID:lsst,项目名称:firefly,代码行数:27,代码来源:SearchPanel.java

示例8: layout

import com.google.gwt.user.client.ui.DockPanel; //导入依赖的package包/类
public void layout() {
//        clearHeaderBar();
        mainPanel.add(content.getDisplay(), DockPanel.CENTER);
        mainPanel.add(footer.getDisplay(), DockPanel.SOUTH);
        footer.getDisplay().setStyleName("footer");
        footer.getDisplay().setVisible(showFooter);
        mainPanel.setCellHeight(content.getDisplay(), "100%");
        dpanel.setContent(mainPanel);
        GwtUtil.setStyles(mainPanel.getParent(), "width", "100%");
        if (content.getContent() != null) {
            if (showFooter) {
                content.getContent().addStyleName("shadow");
            } else {
                content.getContent().removeStyleName("shadow");
            }
        }
        updateCloseVisibility();

    }
 
开发者ID:lsst,项目名称:firefly,代码行数:20,代码来源:ToolbarDropdown.java

示例9: ResizableLayoutManager

import com.google.gwt.user.client.ui.DockPanel; //导入依赖的package包/类
public ResizableLayoutManager(int minWidth, int minHeight) {
        super(minWidth, minHeight);
        mainPanel = new DockPanel();
//        resizer = new Resizer();

        Window.addResizeHandler(new ResizeHandler(){
                public void onResize(ResizeEvent event) {
                    Application.getInstance().resize();
                }
            });

//        WebEventManager.getAppEvManager().addListener(Name.REGION_SHOW,
//                            new WebEventListener(){
//                                public void eventNotify(WebEvent ev) {
//                                    resizer.setVisible(Application.getInstance().hasSearchResult());
//                                }
//                            });
        setupStatusRegion(this);

    }
 
开发者ID:lsst,项目名称:firefly,代码行数:21,代码来源:ResizableLayoutManager.java

示例10: layout

import com.google.gwt.user.client.ui.DockPanel; //导入依赖的package包/类
public void layout(String loadToDiv) {

        init();
        Region loginRegion = Application.getInstance().getLoginManager().makeLoginRegion();
        if (loginRegion != null) {
            RootPanel.get("user-info").add(loginRegion.getDisplay());
        }

        Widget north = makeNorth();
        mainPanel.add(north, DockPanel.NORTH);

        Widget content = makeCenter();
        mainPanel.add(content, DockPanel.CENTER);

        RootPanel root = getRoot(loadToDiv);
        root.add(mainPanel);

        mainPanel.setCellHeight(content, "100%");

//        // now.. add the menu to the top
        getMenu().setDisplay(Application.getInstance().getToolBar().getWidget());

    }
 
开发者ID:lsst,项目名称:firefly,代码行数:24,代码来源:FixedLayoutManager.java

示例11: addMenu

import com.google.gwt.user.client.ui.DockPanel; //导入依赖的package包/类
public static void addMenu(ComponentGVO vo, UIObject ui, String uuid, String parent) {
	if (vo != null && ui != null) {
		if (vo.getMenu() != null) {
			MenuBar menu = new MenuBar();
			menu.setAutoOpen(true);
			menu.setWidth("100%");
			UIObject renderedComponent = new MenuItemRenderer().render(vo.getMenu(), uuid, parent, vo.getContext());
			if (renderedComponent instanceof MenuBar) {
				menu.addItem(vo.getMenu().getDisplayname(), (MenuBar) renderedComponent);
			} else if (renderedComponent instanceof MenuItem) {
				menu.addItem((MenuItem) renderedComponent);
			}
			if (ui instanceof DockPanel) {
				((DockPanel) ui).add(menu, DockPanel.NORTH);
			} else if (ui instanceof Grid || ui instanceof VerticalPanel || ui instanceof HorizontalPanel)
				((Panel) ui).add(menu);
		}
	}

}
 
开发者ID:qafedev,项目名称:qafe-platform,代码行数:21,代码来源:RendererHelper.java

示例12: performCommonTasks

import com.google.gwt.user.client.ui.DockPanel; //导入依赖的package包/类
protected void performCommonTasks(PanelGVO component, UIObject panel, String uuid, String parent) {
	if (component != null && panel != null) {
		panel.setTitle(component.getTooltip());
		UIObject[] children = renderChildComponents(component.getLayout().getComponents(), uuid, parent, component.getContext());
		if (children != null) {
			for (int i = 0; i < children.length; i++) {
				if (children[i] != null) {
					if (children[i] instanceof Widget) {
						if (panel instanceof DockPanel) {
							((DockPanel) panel).add((Widget) children[i], DockPanel.NORTH);
						} else if (panel instanceof HasWidgets) {
							((HasWidgets) panel).add((Widget) children[i]);
						}
						RendererHelper.setStyleForElement(children[i].getElement(), component.getLayout().getComponents()[i].getStyleProperties());
					}
				}
			}
		}
	}
}
 
开发者ID:qafedev,项目名称:qafe-platform,代码行数:21,代码来源:PanelRenderer.java

示例13: addChecksum

import com.google.gwt.user.client.ui.DockPanel; //导入依赖的package包/类
private void addChecksum(UIObject panel) {
	QHidden qafeChecksum = new QHidden();
	DOM.setElementAttribute(qafeChecksum.getElement(), "fn", DataContainerGVO.QAFE_CHECKSUM);
	if (panel instanceof FlexTable) {
		FlexTable flexTable = (FlexTable)panel;
		int rowCount = flexTable.getRowCount();
		flexTable.setWidget(rowCount, 0, qafeChecksum);
	} else if (panel instanceof AbsolutePanel) {
		AbsolutePanel absolutePanel = (AbsolutePanel)panel;
		absolutePanel.add(qafeChecksum, 0, 0);
	} else if (panel instanceof DockPanel) {
		DockPanel dockPanel = (DockPanel)panel;
		//dockPanel.add(qafeChecksum);
	} else if (panel instanceof CellPanel) {
		CellPanel cellPanel = (CellPanel)panel;
		cellPanel.add(qafeChecksum);
	}
}
 
开发者ID:qafedev,项目名称:qafe-platform,代码行数:19,代码来源:PanelRenderer.java

示例14: addMenu

import com.google.gwt.user.client.ui.DockPanel; //导入依赖的package包/类
public static void addMenu(ComponentGVO vo, UIObject ui, String uuid, String parent) {
	if (vo != null && ui != null) {
		if (vo.getMenu() != null) {
			MenuBar menu = new MenuBar();
			menu.setAutoOpen(true);
			menu.setWidth("100%");
			UIObject renderedComponent = new MenuItemRenderer().render(vo.getMenu(), null, uuid, parent, vo.getContext(), null);
			if (renderedComponent instanceof MenuBar) {
				menu.addItem(vo.getMenu().getDisplayname(), (MenuBar) renderedComponent);
			} else if (renderedComponent instanceof MenuItem) {
				menu.addItem((MenuItem) renderedComponent);
			}
			if (ui instanceof DockPanel) {
				((DockPanel) ui).add(menu, DockPanel.NORTH);
			} else if (ui instanceof Grid || ui instanceof VerticalPanel || ui instanceof HorizontalPanel)
				((Panel) ui).add(menu);
		}
	}

}
 
开发者ID:qafedev,项目名称:qafe-platform,代码行数:21,代码来源:RendererHelper.java

示例15: onWindowResized

import com.google.gwt.user.client.ui.DockPanel; //导入依赖的package包/类
public void onWindowResized(int width, int height) {    
  RequestUriPanel.requestSampleArea.setHeight(Math.floor(0.1 * height) + "px");    
  RequestUriPanel.containerPanel.setWidth(Math.floor(0.97 * width) + "px");
  
  int panelHeight = height - RequestUriPanel.requestSamplePanel.getOffsetHeight() - MainMenuPanel.menuPanel.getOffsetHeight() - WadlPanel.wadlHeader.getOffsetHeight() - 80;    
  ParameterPanel.parameterPanel.setHeight("100%");
  ParameterPanel.parameterPanel.setWidth("100%");
  ParameterPanel.requestArea.setHeight(panelHeight + "px");
  ParameterPanel.requestArea.setWidth(Math.floor(0.28 * width) + "px");
              
  WadlPanel.wadlPanel.setHeight("100%");
  WadlPanel.wadlPanel.setWidth("95%");    
  
  WadlPanel.wadlArea.setHeight(panelHeight + "px");
  WadlPanel.wadlArea.setWidth(Math.floor(0.58 * width) + "px");    
  
  GuiFactory.blockScreen.clear();
  GuiFactory.blockScreen.add(getBlockedScreenDiv(width, height), DockPanel.NORTH);    
}
 
开发者ID:tomayac,项目名称:rest-describe-and-compile,代码行数:20,代码来源:GuiFactory.java


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