本文整理汇总了Java中com.google.gwt.user.client.ui.LayoutPanel.setWidgetTopHeight方法的典型用法代码示例。如果您正苦于以下问题:Java LayoutPanel.setWidgetTopHeight方法的具体用法?Java LayoutPanel.setWidgetTopHeight怎么用?Java LayoutPanel.setWidgetTopHeight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.LayoutPanel
的用法示例。
在下文中一共展示了LayoutPanel.setWidgetTopHeight方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: TabLayoutPanelCopy
import com.google.gwt.user.client.ui.LayoutPanel; //导入方法依赖的package包/类
/**
* Creates an empty tab panel.
*
* @param barHeight the size of the tab bar
* @param barUnit the unit in which the tab bar size is specified
*/
public TabLayoutPanelCopy(double barHeight, Unit barUnit) {
LayoutPanel panel = new LayoutPanel();
initWidget(panel);
// Add the tab bar to the panel.
panel.add(tabBar);
panel.setWidgetLeftRight(tabBar, 0, Unit.PX, 0, Unit.PX);
panel.setWidgetTopHeight(tabBar, 0, Unit.PX, barHeight, barUnit);
panel.setWidgetVerticalPosition(tabBar, Alignment.END);
// Add the deck panel to the panel.
// CHANGE4: styles again: deckPanel.addStyleName(CONTENT_CONTAINER_STYLE);
panel.add(deckPanel);
panel.setWidgetLeftRight(deckPanel, 0, Unit.PX, 0, Unit.PX);
panel.setWidgetTopBottom(deckPanel, barHeight, barUnit, 0, Unit.PX);
// Make the tab bar extremely wide so that tabs themselves never wrap.
// (Its layout container is overflow:hidden)
// CHANGE5: Adapt the TabBar Style element to our needs
Style tabBarStyle = tabBar.getElement().getStyle();
tabBarStyle.setHeight(barHeight, barUnit);
tabBarStyle.setWidth(BIG_ENOUGH_TO_NOT_WRAP, Unit.PX);
// CHANGE6: We don't want the standard GWT styles
// tabBar.setStyleName("gwt-TabLayoutPanelTabs");
// setStyleName("gwt-TabLayoutPanel");
}
示例2: DialogBoxForLayoutWidget
import com.google.gwt.user.client.ui.LayoutPanel; //导入方法依赖的package包/类
public DialogBoxForLayoutWidget( String title, IsWidget content )
{
int m = 50;
ImageResource closeImage = ImageResources.INSTANCE.close();
int titleSize = Math.max( closeImage.getHeight(), closeImage.getWidth() ) + 5;
dock = new LayoutPanel();
Glass glass = new Glass();
dock.add( glass );
DivWidget backGround = new DivWidget();
backGround.addStyleName( ResizablePanel.CSS.bkgnd() );
dock.add( backGround );
dock.setWidgetLeftRight( backGround, m, Unit.PX, m, Unit.PX );
dock.setWidgetTopBottom( backGround, m, Unit.PX, m, Unit.PX );
DivWidget titleWidget = new DivWidget();
titleWidget.addStyleName( ResizablePanel.CSS.title() );
titleWidget.getElement().setInnerText( title );
dock.add( titleWidget );
dock.setWidgetLeftRight( titleWidget, m, Unit.PX, m + titleSize, Unit.PX );
dock.setWidgetTopHeight( titleWidget, m, Unit.PX, titleSize, Unit.PX );
closeWidget = new Image( closeImage );
dock.add( closeWidget );
dock.setWidgetRightWidth( closeWidget, m, Unit.PX, titleSize, Unit.PX );
dock.setWidgetTopHeight( closeWidget, m, Unit.PX, titleSize, Unit.PX );
SimpleLayoutPanel contentPanel = new SimpleLayoutPanel();
contentPanel.setWidget( content.asWidget() );
contentPanel.addStyleName( ResizablePanel.CSS.content() );
dock.add( contentPanel );
dock.setWidgetLeftRight( contentPanel, m, Unit.PX, m, Unit.PX );
dock.setWidgetTopBottom( contentPanel, m + titleSize, Unit.PX, m, Unit.PX );
closeWidget.addClickHandler( new ClickHandler()
{
@Override
public void onClick( ClickEvent event )
{
if( isAutoHide )
hide();
}
} );
}
示例3: DefaultIneFrameMasterPageView
import com.google.gwt.user.client.ui.LayoutPanel; //导入方法依赖的package包/类
@Inject
DefaultIneFrameMasterPageView(
IneFrameHeader.View header,
MenuRenderer.View menu,
MessagePanelWidget messagePanel,
NavigationDrawer navigationDrawer) {
this.header = header;
this.menu = menu;
this.navigationDrawer = navigationDrawer;
this.messagePanel = messagePanel;
messagePanel.getElement().setId("MessagePanel");
messagePanel.addStyleName(Res.INST.get().style().MessagePanel());
getElement().setId("MasterPage");
setSize("100%", "100%");
setStyleName(Res.INST.get().style().MasterPage());
clickHandlerLayout = new ClickableFlowPanel();
clickHandlerLayout.getElement().setId("ClickHandler");
clickHandlerLayout.setSize("100%", "100%");
clickHandlerLayout.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
closeNavigationDrawer();
}
});
headerAndPageRoot = new ResizeLayoutPanel();
headerAndPageRoot.getElement().setId("HeaderAndPageRoot");
headerAndPageRoot.setSize("100%", "100%");
headerAndPageRoot.setStyleName(Res.INST.get().style().HeaderAndPageRoot());
headerAndPage = new LayoutPanel();
headerAndPage.getElement().setId("HeaderAndPage");
headerAndPage.setStyleName(Res.INST.get().style().HeaderAndPage());
headerAndPage.add(header.asWidget());
headerAndPage.add(menu.asWidget());
header.asWidget().asWidget().getElement().setId("Header");
menu.asWidget().asWidget().getElement().setId("Menu");
headerAndPage.setWidgetTopHeight(
header.asWidget(),
0,
Unit.PX,
DesignConstants.base() + borderWidth,
Unit.PX);
headerAndPage.setWidgetTopBottom(
menu.asWidget(),
DesignConstants.base() + borderWidth,
Unit.PX,
0,
Unit.PX);
headerAndPageRoot.setWidget(headerAndPage);
navigationDrawer.asWidget().setSize(DesignConstants.b5WithUnit(), "100%");
navigationDrawer.asWidget().getElement().setId("NavigationDrawer");
navigationDrawer.asWidget().addStyleName(Res.INST.get().style().NavigationDrawer());
add(messagePanel);
add(navigationDrawer);
add(headerAndPageRoot);
}
示例4: VisualCellContainer
import com.google.gwt.user.client.ui.LayoutPanel; //导入方法依赖的package包/类
public VisualCellContainer(ViewContext viewContext, ViewConfig config)
{
m_viewContext = viewContext;
m_scrollContainer.addStyleName("sm_cell_scroll_container");
m_magnifier = new Magnifier(viewContext, config.magnifierTickCount, config.magFadeInTime_seconds);
m_splashGlass.addStyleName("sm_splash_glass");
m_cellContainerInner.addStyleName("sm_cell_container_inner");
this.addStyleName("sm_cell_container");
E_ZIndex.CELL_SPLASH_GLASS.assignTo(m_splashGlass);
Window.addResizeHandler(this);
//smU_UI.toggleSelectability(this.getElement(), false);
final LayoutPanel magnifierContainer = new LayoutPanel();
magnifierContainer.setSize("100%", "100%");
magnifierContainer.add(m_magnifier);
magnifierContainer.setWidgetRightWidth(m_magnifier, 8, Unit.PX, 34, Unit.PX);
magnifierContainer.setWidgetTopHeight(m_magnifier, 8, Unit.PX, 196, Unit.PX);
for( int i = 0; i < m_cropper.length; i++ )
{
m_cropper[i] = new VisualCellCropper();
m_cellContainerInner.add(m_cropper[i]);
}
this.add(magnifierContainer);
m_scrollContainer.add(m_cellContainerInner);
m_scrollContainer.add(m_splashGlass);
this.add(m_scrollContainer);
m_statusAlignment.setPosition(E_AlignmentType.MASTER_ANCHOR_HORIZONTAL, E_AlignmentPosition.RIGHT_OR_BOTTOM);
m_statusAlignment.setPosition(E_AlignmentType.MASTER_ANCHOR_VERTICAL, E_AlignmentPosition.RIGHT_OR_BOTTOM);
m_statusAlignment.setPosition(E_AlignmentType.SLAVE_ANCHOR_HORIZONTAL, E_AlignmentPosition.RIGHT_OR_BOTTOM);
m_statusAlignment.setPosition(E_AlignmentType.SLAVE_ANCHOR_VERTICAL, E_AlignmentPosition.RIGHT_OR_BOTTOM);
m_statusAlignment.setPadding(E_AlignmentType.SLAVE_ANCHOR_HORIZONTAL, S_UI.ADDRESS_STATUS_TOOL_TIP_PADDING);
m_statusAlignment.setPadding(E_AlignmentType.SLAVE_ANCHOR_VERTICAL, S_UI.ADDRESS_STATUS_TOOL_TIP_PADDING);
m_snapTargetAlignment.setPosition(E_AlignmentType.MASTER_ANCHOR_HORIZONTAL, E_AlignmentPosition.LEFT_OR_TOP);
m_snapTargetAlignment.setPosition(E_AlignmentType.MASTER_ANCHOR_VERTICAL, E_AlignmentPosition.RIGHT_OR_BOTTOM);
m_snapTargetAlignment.setPosition(E_AlignmentType.SLAVE_ANCHOR_HORIZONTAL, E_AlignmentPosition.LEFT_OR_TOP);
m_snapTargetAlignment.setPosition(E_AlignmentType.SLAVE_ANCHOR_VERTICAL, E_AlignmentPosition.RIGHT_OR_BOTTOM);
m_snapTargetAlignment.setPadding(E_AlignmentType.SLAVE_ANCHOR_HORIZONTAL, S_UI.ADDRESS_STATUS_TOOL_TIP_PADDING);
m_snapTargetAlignment.setPadding(E_AlignmentType.SLAVE_ANCHOR_VERTICAL, S_UI.ADDRESS_STATUS_TOOL_TIP_PADDING);
}