本文整理汇总了Java中com.google.gwt.user.client.ui.DockPanel.setHorizontalAlignment方法的典型用法代码示例。如果您正苦于以下问题:Java DockPanel.setHorizontalAlignment方法的具体用法?Java DockPanel.setHorizontalAlignment怎么用?Java DockPanel.setHorizontalAlignment使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.DockPanel
的用法示例。
在下文中一共展示了DockPanel.setHorizontalAlignment方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: PhoneBar
import com.google.gwt.user.client.ui.DockPanel; //导入方法依赖的package包/类
PhoneBar() {
phoneBarImage = new Image(images.phonebar());
bar = new DockPanel();
bar.setHorizontalAlignment(HorizontalPanel.ALIGN_RIGHT);
bar.add(phoneBarImage, DockPanel.EAST);
initWidget(bar);
setStylePrimaryName("ode-SimpleMockFormPhoneBar");
setSize("100%", HEIGHT + "px");
}
示例2: NavigationBar
import com.google.gwt.user.client.ui.DockPanel; //导入方法依赖的package包/类
NavigationBar() {
navigationBarImage = new Image(images.navigationbar());
bar = new DockPanel();
bar.setHorizontalAlignment(HorizontalPanel.ALIGN_CENTER);
bar.add(navigationBarImage, DockPanel.CENTER);
initWidget(bar);
setStylePrimaryName("ode-SimpleMockFormPhoneBar"); //reuse the css for the phone
setSize("100%", HEIGHT + "px");
}
示例3: onInitialize
import com.google.gwt.user.client.ui.DockPanel; //导入方法依赖的package包/类
/**
* Initialize this example.
*/
@ShowcaseSource
@Override
public Widget onInitialize() {
// Create a Dock Panel
DockPanel dock = new DockPanel();
dock.setStyleName("cw-DockPanel");
dock.setSpacing(4);
dock.setHorizontalAlignment(DockPanel.ALIGN_CENTER);
// Add text all around
dock.add(new HTML(constants.cwDockPanelNorth1()), DockPanel.NORTH);
dock.add(new HTML(constants.cwDockPanelSouth1()), DockPanel.SOUTH);
dock.add(new HTML(constants.cwDockPanelEast()), DockPanel.EAST);
dock.add(new HTML(constants.cwDockPanelWest()), DockPanel.WEST);
dock.add(new HTML(constants.cwDockPanelNorth2()), DockPanel.NORTH);
dock.add(new HTML(constants.cwDockPanelSouth2()), DockPanel.SOUTH);
// Add scrollable text in the center
HTML contents = new HTML(constants.cwDockPanelCenter());
ScrollPanel scroller = new ScrollPanel(contents);
scroller.setSize("400px", "100px");
dock.add(scroller, DockPanel.CENTER);
// Return the content
dock.ensureDebugId("cwDockPanel");
return dock;
}
示例4: YaFormEditor
import com.google.gwt.user.client.ui.DockPanel; //导入方法依赖的package包/类
/**
* Creates a new YaFormEditor.
*
* @param projectEditor the project editor that contains this file editor
* @param formNode the YoungAndroidFormNode associated with this YaFormEditor
*/
YaFormEditor(ProjectEditor projectEditor, YoungAndroidFormNode formNode) {
super(projectEditor, formNode);
this.formNode = formNode;
COMPONENT_DATABASE = SimpleComponentDatabase.getInstance(getProjectId());
// Get reference to the source structure explorer
sourceStructureExplorer =
SourceStructureBox.getSourceStructureBox().getSourceStructureExplorer();
// Create UI elements for the designer panels.
nonVisibleComponentsPanel = new SimpleNonVisibleComponentsPanel();
componentDatabaseChangeListeners.add(nonVisibleComponentsPanel);
visibleComponentsPanel = new SimpleVisibleComponentsPanel(this, nonVisibleComponentsPanel);
componentDatabaseChangeListeners.add(visibleComponentsPanel);
DockPanel componentsPanel = new DockPanel();
componentsPanel.setHorizontalAlignment(DockPanel.ALIGN_CENTER);
componentsPanel.add(visibleComponentsPanel, DockPanel.NORTH);
componentsPanel.add(nonVisibleComponentsPanel, DockPanel.SOUTH);
componentsPanel.setSize("100%", "100%");
// Create palettePanel, which will be used as the content of the PaletteBox.
palettePanel = new YoungAndroidPalettePanel(this);
palettePanel.loadComponents(new DropTargetProvider() {
@Override
public DropTarget[] getDropTargets() {
// TODO(markf): Figure out a good way to memorize the targets or refactor things so that
// getDropTargets() doesn't get called for each component.
// NOTE: These targets must be specified in depth-first order.
List<DropTarget> dropTargets = form.getDropTargetsWithin();
dropTargets.add(visibleComponentsPanel);
dropTargets.add(nonVisibleComponentsPanel);
return dropTargets.toArray(new DropTarget[dropTargets.size()]);
}
});
palettePanel.setSize("100%", "100%");
componentDatabaseChangeListeners.add(palettePanel);
// Create designProperties, which will be used as the content of the PropertiesBox.
designProperties = new PropertiesPanel();
designProperties.setSize("100%", "100%");
initWidget(componentsPanel);
setSize("100%", "100%");
}
示例5: GuiFactory
import com.google.gwt.user.client.ui.DockPanel; //导入方法依赖的package包/类
/**
* Creates the GUI consisting of various panels
*/
public GuiFactory() {
// I18N strings
strings = (Strings) GWT.create(Strings.class);
notifications = (Notifications) GWT.create(Notifications.class);
// disallow scrolling
Window.enableScrolling(false);
// resize the panels on main window resize
Window.addWindowResizeListener(this);
// main application
dockPanel = new DockPanel();
dockPanel.setStyleName("restDescribe-mainApplicationPanel");
dockPanel.setWidth("99.7%");
dockPanel.setHeight("99.7%");
dockPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_TOP);
dockPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
// main menu
MainMenuPanel mainMenuPanel = new MainMenuPanel();
dockPanel.add(mainMenuPanel, DockPanel.NORTH);
dockPanel.setCellHeight(mainMenuPanel, "10%");
// rest compile panel
RestCompilePanel restCompilePanel = new RestCompilePanel();
dockPanel.add(restCompilePanel, DockPanel.NORTH);
// request sample panel
RequestUriPanel requestUriPanel = new RequestUriPanel();
dockPanel.add(requestUriPanel, DockPanel.NORTH);
dockPanel.setCellHeight(requestUriPanel, "10%");
// navigation panel
ParameterPanel parameterPanel = new ParameterPanel();
dockPanel.add(parameterPanel, DockPanel.WEST);
dockPanel.setCellHeight(parameterPanel, "80%");
dockPanel.setCellWidth(parameterPanel, "45%");
dockPanel.setCellVerticalAlignment(parameterPanel, HasVerticalAlignment.ALIGN_TOP);
// wadl panel
WadlPanel wadlPanel = new WadlPanel();
dockPanel.add(wadlPanel, DockPanel.EAST);
dockPanel.setCellHeight(wadlPanel, "80%");
dockPanel.setCellWidth(wadlPanel, "55%");
dockPanel.setCellVerticalAlignment(wadlPanel, HasVerticalAlignment.ALIGN_TOP);
toggleMode(restDescribe);
RootPanel.get().add(dockPanel);
// semi-transparent screen blocker for dialogs
blockScreen = new DockPanel();
HTML semiTransparentDiv = getBlockedScreenDiv(Window.getClientWidth(), Window.getClientHeight());
blockScreen.add(semiTransparentDiv, DockPanel.SOUTH);
blockScreen.setVisible(false);
RootPanel.get().add(blockScreen);
onWindowResized(Window.getClientWidth(), Window.getClientHeight());
// reset the application
GuiFactory.resetApplication(GuiFactory.strings.newRequestUri());
}